Class ClassifierFactory
Factory for creating classifier instances.
Inherited Members
Namespace: MOSAIC.Components.MachineLearning.Factory
Assembly: MOSAIC.dll
Syntax
public static class ClassifierFactory
Methods
Create(ClassifierType, int, int, ClassifierConfig?)
Creates a classifier of the specified type.
Declaration
public static IClassifier Create(ClassifierType type, int inputDim, int numClasses, ClassifierConfig? config = null)
Parameters
| Type | Name | Description |
|---|---|---|
| ClassifierType | type | The type of classifier to create. |
| int | inputDim | Input dimension (number of features). |
| int | numClasses | Number of classes. |
| ClassifierConfig | config | Configuration (uses defaults if null). |
Returns
| Type | Description |
|---|---|
| IClassifier | A new classifier instance. |
GetDescription(ClassifierType)
Gets a description of a classifier type.
Declaration
public static string GetDescription(ClassifierType type)
Parameters
| Type | Name | Description |
|---|---|---|
| ClassifierType | type |
Returns
| Type | Description |
|---|---|
| string |
GetDisplayName(ClassifierType)
Gets the display name for a classifier type.
Declaration
public static string GetDisplayName(ClassifierType type)
Parameters
| Type | Name | Description |
|---|---|---|
| ClassifierType | type |
Returns
| Type | Description |
|---|---|
| string |
IsBatchClassifier(ClassifierType)
Returns whether the classifier type requires batch training
(call TrainBatch before prediction) vs. online-only.
Declaration
public static bool IsBatchClassifier(ClassifierType type)
Parameters
| Type | Name | Description |
|---|---|---|
| ClassifierType | type |
Returns
| Type | Description |
|---|---|
| bool |