# Ridge

### *class* cuml.dask.linear_model.Ridge(, client=None, verbose=False, \*\*kwargs)[[source]](https://github.com/NVIDIA/cuml/blob/93418baf5/python/cuml/cuml/dask/linear_model/ridge.py#L16)

Ridge extends LinearRegression by providing L2 regularization on the
coefficients when predicting response y with a linear combination of the
predictors in X. It can reduce the variance of the predictors, and improves
the conditioning of the problem.

cuML’s Dask Ridge (multi-node multi-GPU) expects Dask cuDF DataFrame and
provides an eigendecomposition-based algorithm (Eig) to fit a linear model.
The Eig algorithm is usually preferred when X is a tall and skinny matrix.
As the number of features in X increases, the accuracy of the Eig algorithm
may decrease.

* **Parameters:**
  **alpha**
  : Regularization strength - must be a positive float. Larger values
    specify stronger regularization.

  **solver**
  : Eig uses an eigendecomposition of the covariance matrix.

  **fit_intercept**
  : If True, Ridge adds an additional term c to correct for the global
    mean of y, modeling the response as “x \* beta + c”.
    If False, the model expects that you have centered the data.
* **Attributes:**
  **coef_**
  : The estimated coefficients for the linear regression model.

  **intercept_**
  : The independent term. If `fit_intercept` is False, will be 0.

### Methods

| [`fit`](#cuml.dask.linear_model.Ridge.fit)(X, y)             | Fit the model with X and y.                           |
|------------------------------------------------------------------------|-------------------------------------------------------|
| [`predict`](#cuml.dask.linear_model.Ridge.predict)(X[, delayed]) | Make predictions for X and returns a dask collection. |
<!-- !! processed by numpydoc !! -->

#### fit(X, y)[[source]](https://github.com/NVIDIA/cuml/blob/93418baf5/python/cuml/cuml/dask/linear_model/ridge.py#L58)

Fit the model with X and y.

* **Parameters:**
  **X**
  : Features for regression

  **y**
  : Labels (outcome values)

<!-- !! processed by numpydoc !! -->

#### get_combined_model()[[source]](https://github.com/NVIDIA/cuml/blob/93418baf5/python/cuml/cuml/dask/common/base.py#L57)

Return single-GPU model for serialization

* **Returns:**
  **model**
  : yet been trained.

<!-- !! processed by numpydoc !! -->

#### predict(X, delayed=True)[[source]](https://github.com/NVIDIA/cuml/blob/93418baf5/python/cuml/cuml/dask/linear_model/ridge.py#L75)

Make predictions for X and returns a dask collection.

* **Parameters:**
  **X**
  : Distributed dense matrix (floats or doubles) of shape
    (n_samples, n_features).

  **delayed**
  : Whether to do a lazy prediction (and return Delayed objects) or an
    eagerly executed one.
* **Returns:**
  **y**

<!-- !! processed by numpydoc !! -->
