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

  • R Deep Learning Cookbook
  • Dr. PKS Prakash Achyutuni Sri Krishna Rao
  • 137字
  • 2021-07-02 20:49:15

How it works...

The following is the performance of the grid-searched model on both the training and cross-validation datasets. We can observe that the AUC has increased by one unit in both training and cross-validation scenarios, after performing a grid search. The training and cross validation AUC after the grid search is 0.996 and 0.997 respectively.

# Performance on Training data after grid search
> train_performance.grid <- h2o.performance(best_dl_model,train = T)
> train_performance.grid@metrics$AUC
[1] 0.9965881

# Performance on Cross validation data after grid search
> xval_performance.grid <- h2o.performance(best_dl_model,xval = T)
> xval_performance.grid@metrics$AUC
[1] 0.9979131

Now, let's assess the performance of the best grid-searched model on the test dataset. We can observe that the AUC has increased by 0.25 units after performing the grid search. The AUC on the test data is 0.993.

# Predict the outcome on test dataset
yhat <- h2o.predict(best_dl_model, occupancy_test.hex)

# Performance of the best grid-searched model on the Test dataset
> yhat$pmax <- pmax(yhat$p0, yhat$p1, na.rm = TRUE)
> roc_obj <- pROC::roc(c(as.matrix(occupancy_test.hex$Occupancy)), c(as.matrix(yhat$pmax)))
> pROC::auc(roc_obj)
Area under the curve: 0.9932
主站蜘蛛池模板: 萝北县| 卫辉市| 贡嘎县| 郑州市| 湟源县| 禄丰县| 丹寨县| 泗水县| 荣昌县| 马公市| 泰安市| 西青区| 屏东市| 普宁市| 沁阳市| 淮阳县| 抚顺市| 麻栗坡县| 永吉县| 湘潭市| 岑溪市| 永济市| 建平县| 台州市| 永清县| 鄂尔多斯市| 浪卡子县| 黑河市| 温宿县| 哈尔滨市| 新和县| 陆河县| 政和县| 许昌市| 逊克县| 潼关县| 全南县| 繁昌县| 阳原县| 蓬溪县| 玉门市|