官术网_书友最值得收藏!

How it works...

The performance of the model can be evaluated using AUC:

# Performance on Train
library(pROC)
ypred <- sess$run(tf$nn$sigmoid(multilayer_perceptron(x, weights, biases)))
roc_obj <- roc(occupancy_train[, yFeatures], as.numeric(ypred))

# Performance on Test
nRowt<-nrow(occupancy_test)
xt <- tf$constant(unlist(occupancy_test[, xFeatures]), shape=c(nRowt, nFeatures), dtype=np$float32) #
ypredt <- sess$run(tf$nn$sigmoid(multilayer_perceptron(xt, weights, biases)))
roc_objt <- roc(occupancy_test[, yFeatures], as.numeric(ypredt))

AUC can be visualized using the plot.auc function from the pROC package, as shown in the image following the next command. The performance of train and test (hold out) is very similar.

plot.roc(roc_obj, col = "green", lty=2, lwd=2)
plot.roc(roc_objt, add=T, col="red", lty=4, lwd=2)
Performance of multilayer perceptron using TensorFlow
主站蜘蛛池模板: 天台县| 台中市| 正安县| 定安县| 安顺市| 龙陵县| 桓仁| 东乌珠穆沁旗| 肃宁县| 彭泽县| 嘉禾县| 铜梁县| 天峨县| 嵊州市| 平阳县| 呼和浩特市| 陆河县| 海盐县| 江安县| 庆元县| 贵定县| 屏南县| 特克斯县| 桃源县| 清河县| 福安市| 毕节市| 绥芬河市| 长白| 金华市| 开江县| 梧州市| 万荣县| 洪湖市| 岚皋县| 嘉荫县| 临高县| 库车县| 宕昌县| 惠安县| 辰溪县|