p-value在elasticnet中是否被弃用?下面的参考显示了系数http://docs.h2o.ai/h2o/latest-stable/h2o-docs/data-science/glm.html中的p值
但是当我执行下面的命令时,我看不到p值
head(elastic_net_best_model@model$coefficients_table)
Coefficients: glm coefficients
names coefficients standardized_coefficients发布于 2017-07-23 05:50:24
只有当compute_p_values设置为true时,才会计算p值,而且这也仅在没有正则化时才有效,这需要lambda=0
举个例子,
library(h2o)
h2o.init()
x<-as.h2o(iris)
xg<-h2o.glm(y="Sepal.Length",training_frame=x,compute_p_values=TRUE,lambda=0)
head(xg@model$coefficients_table)这将作为输出:
Coefficients: glm coefficients
names coefficients std_error z_value p_value standardized_coefficients
1 Intercept 2.171266 0.279794 7.760227 0.000000 6.425687
2 Species.versicolor -0.723562 0.240169 -3.012721 0.003060 -0.723562
3 Species.virginica -1.023498 0.333726 -3.066878 0.002584 -1.023498
4 Sepal.Width 0.495889 0.086070 5.761466 0.000000 0.216141
5 Petal.Length 0.829244 0.068528 12.100867 0.000000 1.463863
6 Petal.Width -0.315155 0.151196 -2.084418 0.038888 -0.240223https://stackoverflow.com/questions/45258952
复制相似问题