A classifier that predicts a discrete target value as a function of data features.
SDKs
- macOS 10.14+
- Xcode 10.0+
Framework
- Create ML
Declaration
struct MLLogisticRegressionClassifier
A classifier that predicts a discrete target value as a function of data features.
SDKs
Framework
struct MLLogisticRegressionClassifier
init(training Data: MLData Table, target Column: String, feature Columns: [String]?, parameters: MLLogistic Regression Classifier .Model Parameters)
Creates a Logistic Regression Classifier from the feature columns in the training data to predict the categories in the target column.
struct MLLogistic Regression Classifier .Model Parameters
Parameters that affect the process of training a model.
let model Parameters: MLLogistic Regression Classifier .Model Parameters
The underlying parameters used when training the model.
var target Column: String
The name of the column you selected at initialization to define which categories the classifier predicts.
var feature Columns: [String]
The names of the columns you selected at initialization to train the classifier.
var training Metrics: MLClassifier Metrics
Measurements of the classifier’s performance on the training data set.
var validation Metrics: MLClassifier Metrics
Measurements of the classifier’s performance on the validation data set.
func evaluation(on: MLData Table) -> MLClassifier Metrics
Evaluates the classifier on the provided labeled data.
func predictions(from: MLData Table) -> MLUntyped Column
Classifies the provided data into the target categories.
func write(to: URL, metadata: MLModel Metadata?)
Exports a Core ML model file for use in your app.
func write(to File: String, metadata: MLModel Metadata?)
Exports a Core ML model file for use in your app.
var model: MLModel
The underlying Core ML model stored in memory.
var description: String
A text representation of the logistic regression classifier.
var debug Description: String
A text representation of the logistic regression classifier that’s suitable for output during debugging.
var playground Description: Any
A description of the logistic regression classifier shown in a playground.
struct MLDecision Tree Classifier
A classifier that predicts the target by creating rules to split the data.
struct MLRandom Forest Classifier
A classifier based on a collection of decision trees trained on subsets of the data.
struct MLBoosted Tree Classifier
A classifier based on a collection of decision trees combined with gradient boosting.
struct MLSupport Vector Classifier
A classifier that predicts a binary target value by maximizing the separation between categories.