Modified hinge loss model for binary classification. This loss is
particularly for classification problems with outliers. This class gives
first order information (gradient and loss) for this model and can be passed
to any solver through the solver’s set_model method.
Given training data \((x_i, y_i) \in \mathbb R^d \times \{ -1, 1 \}\) for \(i=1, \ldots, n\), this model considers a goodness-of-fit
where \(w \in \mathbb R^d\) is a vector containing the model-weights,
\(b \in \mathbb R\) is the intercept (used only whenever
fit_intercept=True) and
\(\ell : \mathbb R^2 \rightarrow \mathbb R\) is the loss given by
for \(y \in \{ -1, 1\}\) and \(y' \in \mathbb R\). Data is passed
to this model through the fit(X, y) method where X is the features
matrix (dense or sparse) and y is the vector of labels.
fit_intercept : bool
If
True, the model uses an intercept
features : {numpy.ndarray, scipy.sparse.csr_matrix}, shape=(n_samples, n_features)
The features matrix, either dense or sparse
labels : numpy.ndarray, shape=(n_samples,) (read-only)
The labels vector
n_samples : int (read-only)
Number of samples
n_features : int (read-only)
Number of features
n_coeffs : int (read-only)
Total number of coefficients of the model
n_threads : int, default=1 (read-only)
Number of threads used for parallel computation.
if
int <= 0: the number of threads available on the CPUotherwise the desired number of threads
tick.robust.ModelModifiedHuber¶