Search Results for

    Show / Hide Table of Contents

    Interface IClassifierMapping<TInstanceSource, TInstance, TLabelSource, TLabel, TFeatures>

    A mapping used by classifier implementations of the IPredictor<TInstanceSource, TInstance, TLabelSource, TResult, TResultDist> interface to convert user data to an appropriate format.

    Inherited Members
    IPredictorMapping<TInstanceSource, TInstance, TLabelSource, TLabel, TFeatures>.GetInstances(TInstanceSource)
    IPredictorMapping<TInstanceSource, TInstance, TLabelSource, TLabel, TFeatures>.GetFeatures(TInstance, TInstanceSource)
    IPredictorMapping<TInstanceSource, TInstance, TLabelSource, TLabel, TFeatures>.GetLabel(TInstance, TInstanceSource, TLabelSource)
    Namespace: Microsoft.ML.Probabilistic.Learners.Mappings
    Assembly: Microsoft.ML.Probabilistic.Learners.Classifier.dll
    Syntax
    public interface IClassifierMapping<in TInstanceSource, TInstance, in TLabelSource, TLabel, out TFeatures> : IPredictorMapping<TInstanceSource, TInstance, TLabelSource, TLabel, TFeatures>
    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.

    TFeatures

    The type of the feature values.

    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.

    LabelToString(TLabel)

    Serializes a label to a string.

    Declaration
    string LabelToString(TLabel label)
    Parameters
    Type Name Description
    TLabel label
    Returns
    Type Description
    String

    ParseLabel(String)

    Deserializes a label from a string. Reverses LabelToString(TLabel).

    Declaration
    TLabel ParseLabel(string labelString)
    Parameters
    Type Name Description
    String labelString

    The output of LabelToString(TLabel)

    Returns
    Type Description
    TLabel

    The label

    Extension Methods

    ClassifierMappingExtensions.GetClassLabelsSafe<TInstanceSource, TInstance, TLabelSource, TLabel, TFeatures>(IClassifierMapping<TInstanceSource, TInstance, TLabelSource, TLabel, TFeatures>, TInstanceSource, TLabelSource)
    ClassifierMappingExtensions.ForEvaluation<TInstanceSource, TInstance, TLabelSource, TLabel, TFeatures>(IClassifierMapping<TInstanceSource, TInstance, TLabelSource, TLabel, TFeatures>)
    In This Article
    Back to top Copyright © .NET Foundation. All rights reserved.