Reference#
- class Workspace(create_key, workspace: Workspace)#
-
- create_parser(format_type: Literal[FormatType.VwText]) TextParser #
- create_parser(format_type: Union[Literal[FormatType.DsJson], Literal[FormatType.Json]]) JsonParser
- property entry_reduction_types: ReductionTypesDescription#
- learn(features: Union[SparseFeatures, CbAdfFeatures], label: Union[SimpleLabel, CbLabel]) None #
- predict(features: Union[SparseFeatures, CbAdfFeatures]) Union[ScalarPred, ActionScoresPred, ActionProbsPred] #
- predict_then_learn(features: Union[SparseFeatures, CbAdfFeatures], label: Union[SimpleLabel, CbLabel]) Union[ScalarPred, ActionScoresPred, ActionProbsPred] #
- class JsonParser#
- parse(input: Union[Dict[str, Any], str]) Tuple[Union[SparseFeatures, CbAdfFeatures], Optional[Union[SimpleLabel, CbLabel]]] #
- class TextParser#
- parse(input: str) Tuple[Union[SparseFeatures, CbAdfFeatures], Optional[Union[SimpleLabel, CbLabel]]] #
- class ReductionTypesDescription(self, input_label_type: LabelType, output_prediction_type: PredictionType, input_features_type: FeaturesType, output_label_type: Optional[LabelType] = None, input_prediction_type: Optional[PredictionType] = None, output_features_type: Optional[FeaturesType] = None)#
- input_features_type#
The features type expected as input for this reduction
- Return type:
- input_prediction_type#
The prediction type expected as input for this reduction. If this is a base reduction, this will be None
- Return type:
Optional[PredictionType]
- output_features_type#
The features type expected as output for this reduction. If this is a base reduction, this will be None
- Return type:
Optional[FeaturesType]
- output_label_type#
The label type expected as output for this reduction. If this is a base reduction, this will be None
- Return type:
Optional[LabelType]
- output_prediction_type#
The prediction type expected as output for this reduction
- Return type:
Configuration#
- class Config#
While this shows up as a class, it is actually a TypedDict. So it can be instantiated as a dict or as a class.
- entryReduction: EntryReductionConfig#
- globalConfig: GlobalConfig#
- class GlobalConfig#
While this shows up as a class, it is actually a TypedDict. So it can be instantiated as a dict or as a class.
- constantFeatureEnabled: NotRequired[bool]#
- hashSeed: NotRequired[int]#
- interactions: NotRequired[List[Union[Literal['Default'], NameInteraction]]]#
- numBits: NotRequired[int]#
- class EntryReductionConfig#
While this shows up as a class, it is actually a TypedDict. So it can be instantiated as a dict or as a class.
- config: NotRequired[Dict[str, Any]]#
- Interaction#
alias of
Union
[Literal
[‘Default’],NameInteraction
]
Labels#
- class LabelType#
Type of label
Simple - Corresponds with
reductionml.SimpleLabel
CB - Corresponds with
reductionml.CbLabel
Binary - not implemented
- Binary = LabelType.Binary#
- CB = LabelType.CB#
- Simple = LabelType.Simple#
Predictions#
- class PredictionType#
Type of prediction
Scalar - Corresponds with
reductionml.ScalarPred
ActionScores - Corresponds with
reductionml.ActionScoresPred
ActionProbs - Corresponds with
reductionml.ActionProbsPred
Binary - not implemented
- ActionProbs = PredictionType.ActionProbs#
- ActionScores = PredictionType.ActionScores#
- Binary = PredictionType.Binary#
- Scalar = PredictionType.Scalar#
Features#
- class FeaturesType#
Type of features
SparseSimple - Corresponds with
reductionml.SparseFeatures
SparseCbAdf - Corresponds with
reductionml.CbAdfFeatures
- SparseCbAdf = FeaturesType.SparseCbAdf#
- SparseSimple = FeaturesType.SparseSimple#
- class CbAdfFeatures#
- class SparseFeatures#
- class typing_extensions.NotRequired#