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

How it works...

Now, let's assess the performance of the model on train and test datasets. The AUC on the train data is 0.978 and on the test data is 0.982:

# Train accuracy (AUC)
> train_pred <- predict(model.nn,occupancy_train.x)
> train_yhat <- max.col(t(train_pred))-1
> roc_obj <- pROC::roc(c(occupancy_train.y), c(train_yhat))
> pROC::auc(roc_obj)
Area under the curve: 0.9786

#Test accuracy (AUC)
> test_pred <- predict(nnmodel,occupancy_test.x)
> test_yhat <- max.col(t(test_pred))-1
> roc_obj <- pROC::roc(c(occupancy_test.y), c(test_yhat))
> pROC::auc(roc_obj)
Area under the curve: 0.9824
主站蜘蛛池模板: 崇阳县| 岳阳县| 闸北区| 常山县| 吉安县| 鄂尔多斯市| 长垣县| 顺平县| 巴塘县| 尤溪县| 根河市| 崇州市| 成都市| 沙河市| 平乐县| 杭锦旗| 龙川县| 军事| 于都县| 贵州省| 神池县| 台山市| 乌兰县| 沙雅县| 时尚| 蒙城县| 贞丰县| 揭东县| 盱眙县| 韶关市| 会宁县| 唐山市| 武安市| 隆林| 军事| 田东县| 西林县| 泸西县| 贵港市| 崇义县| 辽中县|