Elastic Net Regressor
h2o4gpu.elastic_net_regressor(alpha = 1, l1_ratio = 0.5,
fit_intercept = TRUE, normalize = FALSE, precompute = FALSE,
max_iter = 5000L, copy_X = TRUE, tol = 0.01, warm_start = FALSE,
positive = FALSE, random_state = NULL, selection = "cyclic",
n_gpus = -1L, lambda_stop_early = TRUE, glm_stop_early = TRUE,
glm_stop_early_error_fraction = 1, verbose = FALSE, n_threads = NULL,
gpu_id = 0L, lambda_min_ratio = 1e-07, n_lambdas = 100L, n_folds = 5L,
tol_seek_factor = 0.1, store_full_path = 0L, lambda_max = NULL,
lambdas = NULL, double_precision = NULL, order = NULL,
backend = "h2o4gpu")
Constant that multiplies the penalty terms. Defaults to 1.0. See the notes for the exact mathematical meaning of this parameter.alpha = 0
is equivalent to an ordinary least square, solved by the :class:LinearRegressionSklearn
object. For numerical reasons, using alpha = 0
with the LassoSklearn
object is not advised. Given this, you should use the :class:LinearRegressionSklearn
object.
The ElasticNetSklearn mixing parameter, with 0 <= l1_ratio <= 1
. For l1_ratio = 0
the penalty is an L2 penalty. For l1_ratio = 1
it is an L1 penalty. For 0 < l1_ratio < 1
, the penalty is a combination of L1 and L2.
Whether the intercept should be estimated or not. If FALSE
, the data is assumed to be already centered.
This parameter is ignored when fit_intercept
is set to FALSE. If TRUE, the regressors X will be normalized before regression by subtracting the mean and dividing by the l2-norm. If you wish to standardize, please use :class:h2o4gpu.preprocessing.StandardScaler
before calling fit
on an estimator with normalize=FALSE
.
Whether to use a precomputed Gram matrix to speed up calculations. The Gram matrix can also be passed as argument. For sparse input this option is always TRUE
to preserve sparsity.
The maximum number of iterations
If TRUE
, X will be copied; else, it may be overwritten.
The tolerance for the optimization: if the updates are smaller than tol
, the optimization code checks the dual gap for optimality and continues until it is smaller than tol
.
When set to TRUE
, reuse the solution of the previous call to fit as initialization, otherwise, just erase the previous solution.
When set to TRUE
, forces the coefficients to be positive.
The seed of the pseudo random number generator that selects a random feature to update. If int, random_state is the seed used by the random number generator; If RandomState instance, random_state is the random number generator; If NULL, the random number generator is the RandomState instance used by np.random
. Used when selection
== 'random'.
If set to 'random', a random coefficient is updated every iteration rather than looping over features sequentially by default. This (setting to 'random') often leads to significantly faster convergence especially when tol is higher than 1e-4.
Number of gpu's to use in GLM solver.
Stop early when there is no more relative improvement on train or validation.
Stop early when there is no more relative improvement in the primary and dual residuals for ADMM.
Relative tolerance for metric-based stopping criterion (stop if relative improvement is not at least this much).
Print verbose information to the console if set to > 0.
Number of threads to use in the gpu. Each thread is an independent model builder.
ID of the GPU on which the algorithm should run.
Minimum lambda ratio to maximum lambda, used in lambda search.
Number of lambdas to be used in a search.
Number of cross validation folds.
Factor of tolerance to seek once below null model accuracy. Default is 1E-1, so seeks tolerance of 1E-3 once below null model accuracy for tol=1E-2.
Whether to store full solution for all alphas and lambdas. If 1, then during predict will compute best and full predictions.
Maximum Lambda value to use. Default is NULL, and then internally compute standard maximum
overrides n_lambdas, lambda_max, and lambda_min_ratio.
Internally set unless using _ptr methods. Value can either be 0 (float32) or 1(float64)
Order of data. Default is NULL, and internally determined (unless using _ptr methods) whether row 'r' or column 'c' major order.
Which backend to use. Options are 'auto', 'sklearn', 'h2o4gpu'. Saves as attribute for actual backend used.