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

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
主站蜘蛛池模板: 沙雅县| 普陀区| 陆河县| 平顶山市| 涟源市| 阜康市| 澜沧| 灵丘县| 余干县| 永泰县| 沈丘县| 邵阳县| 南通市| 封丘县| 繁昌县| 扎囊县| 芒康县| 冕宁县| 临邑县| 海伦市| 夏河县| 楚雄市| 蓬莱市| 定襄县| 化州市| 福清市| 民勤县| 德庆县| 长阳| 丹江口市| 汤阴县| 小金县| 武乡县| 商河县| 台山市| 望谟县| 门头沟区| 襄樊市| 徐闻县| 长宁县| 墨玉县|