Метод |
Описание |
|
__construct ( MCordingley\Regression\Algorithm\GradientDescent\Gradient\Gradient $gradient ) |
|
|
cost ( array $coefficients, array $features, float $outcome ) : float |
|
|
gradient ( array $coefficients, array $features, float $outcome ) : array |
|
|
ignoreFirstFeature ( boolean $ignoreFirst = true ) : self |
Ignore the first feature when regularizing, as that is usually the bias (or intercept) term. |
|
setLambda ( float $lambda ) : self |
Sets the regularization cost parameter. Default value is 1.0 |
|
setLevel ( integer $level ) : self |
Sets regularization level. e.g. L1 and L2. The default value is 2. |
|