August 2017
Intermediate to advanced
288 pages
8h 6m
English
The performance of the model can be evaluated using AUC:
# Performance on Trainlibrary(pROC) ypred <- sess$run(tf$nn$sigmoid(tf$matmul(x, W) + b))roc_obj <- roc(occupancy_train[, yFeatures], as.numeric(ypred))# Performance on testnRowt<-nrow(occupancy_test)xt <- tf$constant(unlist(occupancy_test[, xFeatures]), shape=c(nRowt, nFeatures), dtype=np$float32)ypredt <- sess$run(tf$nn$sigmoid(tf$matmul(xt, W) + b))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 screenshot following this command. The performance for training and testing (hold-out) is very similar.
plot.roc(roc_obj, col = "green", lty=2, lwd=2)plot.roc(roc_objt, ...
Read now
Unlock full access