- 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
推薦閱讀
- UI設計基礎培訓教程
- Java程序設計(慕課版)
- PostgreSQL 11從入門到精通(視頻教學版)
- FLL+WRO樂高機器人競賽教程:機械、巡線與PID
- Node.js全程實例
- Go語言從入門到精通
- Java程序設計教程
- Drupal 8 Development:Beginner's Guide(Second Edition)
- Java程序設計實用教程(第2版)
- Java EE 7 Development with WildFly
- 可視化H5頁面設計與制作:Mugeda標準教程
- Python繪圖指南:分形與數據可視化(全彩)
- Cinder:Begin Creative Coding
- PHP從入門到精通(第7版)
- Java程序性能優化實戰