Interface IClassifierEvaluatorMapping<TInstanceSource, TInstance, TLabelSource, TLabel>
A mapping used by the ClassifierEvaluator<TInstanceSource, TInstance, TLabelSource, TLabel> class.
Namespace: Microsoft.ML.Probabilistic.Learners.Mappings
Assembly: Microsoft.ML.Probabilistic.Learners.Classifier.dll
Syntax
public interface IClassifierEvaluatorMapping<in TInstanceSource, TInstance, in TLabelSource, out TLabel>
Type Parameters
Name | Description |
---|---|
TInstanceSource | The type of a source of instances. |
TInstance | The type of an instance. |
TLabelSource | The type of a source of labels. |
TLabel | The type of a label. |
Methods
GetClassLabels(TInstanceSource, TLabelSource)
Gets all class labels.
Declaration
IEnumerable<TLabel> GetClassLabels(TInstanceSource instanceSource = null, TLabelSource labelSource = null)
Parameters
Type | Name | Description |
---|---|---|
TInstanceSource | instanceSource | An optional instance source. |
TLabelSource | labelSource | An optional label source. |
Returns
Type | Description |
---|---|
IEnumerable<TLabel> | All possible values of a label. |
GetInstances(TInstanceSource)
Provides the instances for a given instance source.
Declaration
IEnumerable<TInstance> GetInstances(TInstanceSource instanceSource)
Parameters
Type | Name | Description |
---|---|---|
TInstanceSource | instanceSource | The source of instances. |
Returns
Type | Description |
---|---|
IEnumerable<TInstance> | The instances provided by the instance source. |
Remarks
Assumes that the same instance source always provides the same instances.
GetLabel(TInstance, TInstanceSource, TLabelSource)
Provides the label for a given instance.
Declaration
TLabel GetLabel(TInstance instance, TInstanceSource instanceSource = null, TLabelSource labelSource = null)
Parameters
Type | Name | Description |
---|---|---|
TInstance | instance | The instance to provide the label for. |
TInstanceSource | instanceSource | An optional source of instances. |
TLabelSource | labelSource | An optional source of labels. |
Returns
Type | Description |
---|---|
TLabel | The label of the given instance. |
Remarks
Assumes that the same sources always provide the same label for a given instance.