前言
前面的文章我有写bartmachine函数所有参数详解,帮助读者朋友建立自己的模型。同时在建模后也有一些问题,例如建模结果不怎么能看懂,所以有了这篇文章,大致讲一下模型结果的解读
R bartMachine包下载
R 所有包下载地址 :
https://cran.r-project.org/web/packages/available_packages_by_name.html
R bartMachine包下载地址 :
https://cran.r-project.org/web/packages/bartMachine/index.html
建模结果参数原文
参数 | 解释 |
---|---|
y | The values of the response for the training data. |
y_levels | The levels of the response (for classification only). |
pred_type | Whether the model was build for regression of classification. |
model_matrix_training_data | The training data with factors converted to dummies. |
num_cores | The number of cores used to build the BART model. |
sig_sq_est | The data-based estimate of σ^2 used to create the prior on the error variance for the BART model. |
time_to_build | Total time to build the BART model. |
y_hat_train | The posterior means of \hat{f}(x) for each observation. Only returned if run_in_sample = TRUE. |
residuals | The model residuals given by y - y_hat_train. Only returned if run_in_sample = TRUE. |
L1_err_train | L1 error on the training set. Only returned if run_in_sample = TRUE. |
L2_err_train | L2 error on the training set. Only returned if run_in_sample = TRUE. |
PseudoRsq | Calculated as 1 - SSE / SST where SSE is the sum of square errors in the training data and SST is the sample variance of the response times n-1. Only returned if run_in_sample = TRUE. |
rmse_train | Root mean square error on the training set. Only returned if run_in_sample = TRUE. |
建模结果参数中文解析
参数 | 解释 |
---|---|
x | 训练数据集的自变量。 |
y | 训练数据集的响应变量。 |
y_levels | 响应变量的类别值(仅用于分类)。 |
pred_type | 是否建立的是分类回归模型。 |
model_matrix_training_data | 包含了自变量和因变量的数据集。 |
num_cores | 用于建立模型的核心数。 |
sig_sq_est | .计算σ2估计值,用于建立BART模型误差方差时的先验估计。 |
time_to_build | 建立BART模型总共用时时长。 |
y_hat_train | f ^ ( x ) \hat{f}(x) f^(x) 后验分布预测值均值。只有当run_in_sample = TRUE时返回。 |
residuals | 模型残差值,,计算公式为( y - y_hat_train)。 只有当run_in_sample = TRUE时返回。 |
L1_err_train | L1范数,也就是差值绝对值之和,计算公式为( |