Table of Contents

Interface IMultiLabelClassifier<T>

Namespace
AiDotNet.Interfaces
Assembly
AiDotNet.dll

Interface for multi-label classifiers that can predict multiple labels per sample.

public interface IMultiLabelClassifier<T> : IClassifier<T>, IFullModel<T, Matrix<T>, Vector<T>>, IModel<Matrix<T>, Vector<T>, ModelMetadata<T>>, IModelSerializer, ICheckpointableModel, IParameterizable<T, Matrix<T>, Vector<T>>, IFeatureAware, IFeatureImportance<T>, ICloneable<IFullModel<T, Matrix<T>, Vector<T>>>, IGradientComputable<T, Matrix<T>, Vector<T>>, IJitCompilable<T>

Type Parameters

T

The numeric data type used for calculations.

Inherited Members
Extension Methods

Remarks

Multi-label classification differs from multi-class classification: - Multi-class: One label per sample (mutually exclusive) - Multi-label: Zero, one, or many labels per sample (not mutually exclusive)

For Beginners: In multi-label classification, each sample can have multiple labels:

Examples:

  • An article tagged with "politics", "economy", and "international"
  • A movie classified as "action", "comedy", and "romance"
  • An image containing "dog", "person", and "outdoor"

The output is a binary matrix where each column is a label indicator.

Properties

NumLabels

Gets the number of labels that can be predicted.

int NumLabels { get; }

Property Value

int

Methods

PredictMultiLabel(Matrix<T>)

Predicts binary indicators for each label for each sample.

Matrix<T> PredictMultiLabel(Matrix<T> input)

Parameters

input Matrix<T>

The input feature matrix.

Returns

Matrix<T>

A binary matrix where each row is a sample and each column is a label indicator (1=present, 0=absent).

PredictMultiLabelProbabilities(Matrix<T>)

Predicts probabilities for each label for each sample.

Matrix<T> PredictMultiLabelProbabilities(Matrix<T> input)

Parameters

input Matrix<T>

The input feature matrix.

Returns

Matrix<T>

A probability matrix where each row is a sample and each column is the probability of that label.