Classifier that minimizes the quadratic loss or, equivalently, least squares regression applied to a numeric encoding of the class labels as target. Note this method minimizes quadratic loss, not the truncated quadratic loss. Optionally, L2 regularization can be applied by setting the lambda
parameter.
LeastSquaresClassifier(X, y, lambda = 0, intercept = TRUE,
x_center = FALSE, scale = FALSE, method = "inverse", y_scale = FALSE)
S4 object of class LeastSquaresClassifier with the following slots:
weight vector
the names of the classes
formula object of the model used in regression
a scaling object containing the parameters of the z-transforms applied to the data
matrix; Design matrix for labeled data
factor or integer vector; Label vector
Regularization parameter of the l2 penalty
TRUE if an intercept should be added to the model
TRUE, whether the dependent variables (features) should be centered
If TRUE, apply a z-transform to the design matrix X before running the regression
Method to use for fitting. One of c("inverse","Normal","QR","BFGS")
If True scale the target vector
Other RSSL classifiers:
EMLeastSquaresClassifier
,
EMLinearDiscriminantClassifier
,
GRFClassifier
,
ICLeastSquaresClassifier
,
ICLinearDiscriminantClassifier
,
KernelLeastSquaresClassifier
,
LaplacianKernelLeastSquaresClassifier()
,
LaplacianSVM
,
LinearDiscriminantClassifier
,
LinearSVM
,
LinearTSVM()
,
LogisticLossClassifier
,
LogisticRegression
,
MCLinearDiscriminantClassifier
,
MCNearestMeanClassifier
,
MCPLDA
,
MajorityClassClassifier
,
NearestMeanClassifier
,
QuadraticDiscriminantClassifier
,
S4VM
,
SVM
,
SelfLearning
,
TSVM
,
USMLeastSquaresClassifier
,
WellSVM
,
svmlin()