Usage
h2o.pcr(x, y, data, key = "", ncomp, family, nfolds = 10, alpha = 0.5, lambda = 1e-05,
epsilon = 1e-05, tweedie.p)
Arguments
x
A vector containing the names of the predictors in the model.
y
The name of the response variable in the model.
data
An H2OParsedData
object containing the variables in the model.
key
(Optional) The unique hex key assigned to the resulting model. If none is given, a key will automatically be generated.
ncomp
A number indicating the number of principal components to use in the regression model.
family
A description of the error distribution and corresponding link function to be used in the model. Currently, Gaussian, binomial, Poisson, gamma, and Tweedie are supported.
nfolds
(Optional) Number of folds for cross-validation. The default is 10.
alpha
(Optional) The elastic-net mixing parameter, which must be in [0,1]. The penalty is defined to be $$P(\alpha,\beta) = (1-\alpha)/2||\beta||_2^2 + \alpha||\beta||_1 = \sum_j [(1-\alpha)/2 \beta_j^2 + \alpha|\beta_j|]$$ so alpha=1
is the lasso
lambda
(Optional) The shrinkage parameter, which multiples $P(\alpha,\beta)$ in the objective. The larger lambda
is, the more the coefficients are shrunk toward zero (and each other).
epsilon
(Optional) Number indicating the cutoff for determining if a coefficient is zero.
tweedie.p
The index of the power variance function for the tweedie distribution. Only used if family = "tweedie"