Interface IClassifier

Interface for online/incremental classification models. Maps input vectors to discrete class labels.

Namespace: MOSAIC.Components.MachineLearning.Interfaces
Assembly: MOSAIC.dll
Syntax
public interface IClassifier : ISupervisedLearner, IOnlineLearner

Properties

NumClasses

Number of classes the classifier can distinguish.

Declaration
int NumClasses { get; }
Property Value
Type Description
int

OutputDimension

Dimensionality of output (same as NumClasses).

Declaration
int OutputDimension { get; }
Property Value
Type Description
int

Methods

Confidence(Vector<double>)

Evaluates prediction confidence for a given input. Typically the maximum class probability.

Declaration
double Confidence(Vector<double> x)
Parameters
Type Name Description
Vector<double> x

Input vector.

Returns
Type Description
double

Confidence score between 0 and 1.

Predict(Vector<double>)

Predicts the most likely class for a given input.

Declaration
int Predict(Vector<double> x)
Parameters
Type Name Description
Vector<double> x

Input vector.

Returns
Type Description
int

Predicted class label.

PredictProbabilities(Vector<double>)

Predicts class probabilities for a given input.

Declaration
double[] PredictProbabilities(Vector<double> x)
Parameters
Type Name Description
Vector<double> x

Input vector.

Returns
Type Description
double[]

Array of probabilities, one per class (sums to 1).

Update(Vector<double>, int)

Updates the model with a single labeled sample.

Declaration
void Update(Vector<double> x, int label)
Parameters
Type Name Description
Vector<double> x

Input vector (features).

int label

Class label (0 to NumClasses-1).

Search documentation

Start typing to search the documentation.