R Losses Regression
Huber loss
Calculate the Huber loss, a loss function used in robust regression. Thisloss function is less sensitive to outliers than rmse()
. This function isquadratic for small residual values and linear for large residual values.
Usage
Logistic Regression. If linear regression serves to predict continuous Y variables, logistic regression is used for binary classification. If we use linear regression to model a dichotomous variable (as Y), the resulting model might not restrict the predicted Ys within 0 and 1.
Arguments
A data.frame
containing the truth
and estimate
columns.
R Loess Regression
- LiblineaR can produce 10 types of (generalized) linear models, by combining several types of loss functions and regularization schemes. The regularization can be L1 or L2, and the losses can be the regular L2-loss for SVM (hinge loss), L1-loss for SVM, or the logistic loss for logistic regression. The default value for type is 0. See details below.
- Training examples. We will introduce the cross-entropy loss function. 4.An algorithm for optimizing the objective function. We introduce the stochas-tic gradient descent algorithm. Logistic regression has two phases: training: we train the system (specifically the weights w and b) using stochastic gradient descent and the cross-entropy loss.
Not currently used.
The column identifier for the true results(that is numeric
). This should be an unquoted column name althoughthis argument is passed by expression and supportsquasiquotation (you can unquote columnnames). For _vec()
functions, a numeric
vector.
The column identifier for the predictedresults (that is also numeric
). As with truth
this can bespecified different ways but the primary method is to use anunquoted variable name. For _vec()
functions, a numeric
vector.
A single numeric
value. Defines the boundary where the loss functiontransitions from quadratic to linear. Defaults to 1.
A logical
value indicating whether NA
values should be stripped before the computation proceeds.
Value
A tibble
with columns .metric
, .estimator
,and .estimate
and 1 row of values.
For grouped data frames, the number of rows returned will be the same asthe number of groups.
For huber_loss_vec()
, a single numeric
value (or NA
).
References
Huber, P. (1964). Robust Estimation of a Location Parameter.Annals of Statistics, 53 (1), 73-101.
See Also
Other numeric metrics: ccc()
,huber_loss_pseudo()
,iic()
,mae()
,mape()
,mase()
,mpe()
,rmse()
,rpd()
,rpiq()
,rsq_trad()
,rsq()
,smape()
Other accuracy metrics: ccc()
,huber_loss_pseudo()
,iic()
,mae()
,mape()
,mase()
,mpe()
,rmse()
,smape()
Aliases
- huber_loss
- huber_loss.data.frame
- huber_loss_vec