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

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
主站蜘蛛池模板: 林州市| 黎川县| 本溪| 时尚| 鄂尔多斯市| 理塘县| 喀喇沁旗| 怀仁县| 岐山县| 会泽县| 牟定县| 沐川县| 黔江区| 正阳县| 新干县| 太康县| 神农架林区| 红安县| 通道| 雷波县| 凤台县| 玛纳斯县| 湘潭市| 宿松县| 吴川市| 柯坪县| 锡林郭勒盟| 乐东| 翼城县| 公安县| 衡水市| 临城县| 秭归县| 融水| 锡林浩特市| 龙川县| 孟村| 育儿| 绵阳市| 襄城县| 桂东县|