An implementation of L2-regularized logistic regression for two-class classification. Uses a trained model to classify new points.
# S3 method for mlpack_logistic_regression
predict(object, newdata, type = c("predictions", "probabilities"), ...)logistic_regression_classify(
input_model,
test,
decision_boundary = 0.5,
verbose = getOption("mlpack.verbose", FALSE)
)
A list with several components defining the class attributes:
If test data is specified, this matrix is where the predictions for the test set will be saved (integer row).
An instantiated model object for which prediction is desired
A test data set
A character value selection predictions or probabilities
Additional optional arguments affecting the prediction
Existing model (parameters) (LogisticRegression).
Matrix containing test dataset (numeric matrix).
Decision boundary for prediction; if the logistic function for a point is less than the boundary, the class is taken to be 0; otherwise, the class is 1. Default value "0.5" (numeric).
Display informational messages and the full list of parameters and timers at the end of execution. Default value "getOption("mlpack.verbose", FALSE)" (logical).
mlpack developers
# \dontrun{ pred <- predict(model, newdata=X_test) }
Run the code above in your browser using DataLab