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

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
主站蜘蛛池模板: 富源县| 建瓯市| 大荔县| 长宁县| 浦江县| 彝良县| 建阳市| 张家川| 闽清县| 璧山县| 米脂县| 西安市| 康马县| 昌都县| 沈丘县| 南通市| 台安县| 依安县| 秀山| 广南县| 五莲县| 红桥区| 鄄城县| 松阳县| 台南市| 黄冈市| 芷江| 民县| 东乡族自治县| 台东县| 万山特区| 浦城县| 丽江市| 临漳县| 呼伦贝尔市| 宾川县| 新乐市| 革吉县| 朝阳区| 霍邱县| 武穴市|