predict.glm() 函数中的 's' 参数是什么?
What is the 's' argument for in predict.glm() function?
在使用 glmnet()
定义的模型时,我无法解析 predict()
函数的帮助文件。我在任何地方都没有看到提到 's' 参数。但是,在下面的示例代码中,它似乎是一种提供正则化参数(通常标记为 lambda)的方法。
y_lasso = predict(lasso, X, s = lambda)
s
参数的用途是什么,它记录在何处?
我曾尝试在 predict
、glm.predict
、glm.SafePrediction
上查找帮助,但没有成功。
我想你想要 the documentation predict.glmnet
。
s - Value(s) of the penalty parameter lambda at which predictions are required. Default is the entire sequence used to create the model.
在使用 glmnet()
定义的模型时,我无法解析 predict()
函数的帮助文件。我在任何地方都没有看到提到 's' 参数。但是,在下面的示例代码中,它似乎是一种提供正则化参数(通常标记为 lambda)的方法。
y_lasso = predict(lasso, X, s = lambda)
s
参数的用途是什么,它记录在何处?
我曾尝试在 predict
、glm.predict
、glm.SafePrediction
上查找帮助,但没有成功。
我想你想要 the documentation predict.glmnet
。
s - Value(s) of the penalty parameter lambda at which predictions are required. Default is the entire sequence used to create the model.