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

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
主站蜘蛛池模板: 包头市| 郴州市| 隆安县| 远安县| 唐河县| 湘乡市| 邹平县| 罗源县| 大英县| 大新县| 临沭县| 霍林郭勒市| 九寨沟县| 万年县| 乌鲁木齐市| 上林县| 阳新县| 株洲县| 金门县| 石屏县| 永靖县| 柳江县| 石景山区| 永吉县| 天峻县| 洛隆县| 屏东市| 沾益县| 侯马市| 察雅县| 罗山县| 土默特右旗| 临江市| 巨鹿县| 周宁县| 荔波县| 新余市| 收藏| 惠来县| 横峰县| 泾阳县|