nemos.regularizer.UnRegularized#
- class nemos.regularizer.UnRegularized[source]#
Bases:
Regularizer
Regularizer class for unregularized models.
This class equips models with the identity proximal operator (no shrinkage) and the unpenalized loss function.
Attributes
Methods
__init__
()get_params
([deep])From scikit-learn, get parameters by inspecting init.
Returns the identity operator.
penalized_loss
(loss, regularizer_strength)Returns the original loss function unpenalized.
set_params
(**params)Set the parameters of this estimator.
- property allowed_solvers: Tuple[str]#
- property default_solver: str#
- get_params(deep=True)#
From scikit-learn, get parameters by inspecting init.
- Parameters:
deep
- Return type:
dict
- Returns:
- out:
A dictionary containing the parameters. Key is the parameter name, value is the parameter value.
- get_proximal_operator()[source]#
Returns the identity operator.
Unregularized method corresponds to an identity proximal operator, since no shrinkage factor is applied.
- Return type:
Callable
[[Any
,float
,float
],Tuple
[Array
,Array
]]
- penalized_loss(loss, regularizer_strength)[source]#
Returns the original loss function unpenalized.
Unregularized regularization method does not add any penalty.
- Parameters:
loss (Callable)
regularizer_strength (float)
- set_params(**params)#
Set the parameters of this estimator.
The method works on simple estimators as well as on nested objects (such as
Pipeline
). The latter have parameters of the form<component>__<parameter>
so that it’s possible to update each component of a nested object.- Parameters:
**params (dict) – Estimator parameters.
- Returns:
self – Estimator instance.
- Return type:
estimator instance