- R Deep Learning Cookbook
- Dr. PKS Prakash Achyutuni Sri Krishna Rao
- 99字
- 2021-07-02 20:49:12
How it works...
The performance of the model can be evaluated using AUC:
# Performance on Train
library(pROC)
ypred <- sess$run(tf$nn$sigmoid(tf$matmul(x, W) + b))
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(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, add=T, col="red", lty=4, lwd=2)

Performance of logistic regression using TensorFlow
推薦閱讀
- Node.js Design Patterns
- Learn to Create WordPress Themes by Building 5 Projects
- 控糖控脂健康餐
- Visual Basic編程:從基礎到實踐(第2版)
- Java高手真經(高級編程卷):Java Web高級開發技術
- HTML5游戲開發案例教程
- Java:High-Performance Apps with Java 9
- 從零開始學Linux編程
- Vue.js光速入門及企業項目開發實戰
- 從零開始學Selenium自動化測試:基于Python:視頻教學版
- C語言程序設計
- Python第三方庫開發應用實戰
- Access數據庫應用教程(2010版)
- 小學生C++趣味編程從入門到精通
- JavaScript Mobile Application Development