ddl.linear.IdentityLinearEstimator

class ddl.linear.IdentityLinearEstimator[source]

Bases: sklearn.base.BaseEstimator

Identity linear projection.

Attributes:
coef_ : array-like, shape (n_features, n_features)

Just sets the identity matrix

Methods

fit(self, X[, y]) Fit estimator to X.
get_params(self[, deep]) Get parameters for this estimator.
set_params(self, \*\*params) Set the parameters of this estimator.
__init__(self)[source]

Initialize self. See help(type(self)) for accurate signature.

fit(self, X, y=None, **fit_params)[source]

Fit estimator to X.

Parameters:
X : array-like, shape (n_samples, n_features)

Training data, where n_samples is the number of samples and n_features is the number of features.

y : None, default=None

Not used in the fitting process but kept for compatibility.

fit_params : dict, optional

Optional extra fit parameters.

Returns:
self : estimator

Returns the instance itself.

get_params(self, deep=True)

Get parameters for this estimator.

Parameters:
deep : boolean, optional

If True, will return the parameters for this estimator and contained subobjects that are estimators.

Returns:
params : mapping of string to any

Parameter names mapped to their values.

set_params(self, **params)

Set the parameters of this estimator.

The method works on simple estimators as well as on nested objects (such as pipelines). The latter have parameters of the form <component>__<parameter> so that it’s possible to update each component of a nested object.

Returns:
self