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

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

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
主站蜘蛛池模板: 濉溪县| 克拉玛依市| 定边县| 鄂托克旗| 塘沽区| 翁源县| 宣武区| 电白县| 瑞丽市| 宁安市| 神农架林区| 湘乡市| 枣强县| 沅陵县| 武定县| 穆棱市| 定南县| 六盘水市| 健康| 兴安盟| 武功县| 唐海县| 龙岩市| 墨玉县| 阳城县| 香河县| 穆棱市| 迁安市| 达尔| 中宁县| 彰化县| 北流市| 永嘉县| 贵德县| 青神县| 万州区| 施秉县| 保康县| 静乐县| 洱源县| 荆州市|