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: SparseFeatures | CbAdfFeatures, label: SimpleLabel | CbLabel) None¶
- predict(features: SparseFeatures | CbAdfFeatures) ScalarPred | ActionScoresPred | ActionProbsPred¶
- predict_then_learn(features: SparseFeatures | CbAdfFeatures, label: SimpleLabel | CbLabel) ScalarPred | ActionScoresPred | ActionProbsPred¶
- class JsonParser¶
- parse(input: Union[Dict[str, Any], str]) Tuple[Union[SparseFeatures, CbAdfFeatures], Optional[SimpleLabel | CbLabel]]¶
- class TextParser¶
- parse(input: str) Tuple[Union[SparseFeatures, CbAdfFeatures], Optional[SimpleLabel | CbLabel]]¶
- class ReductionTypesDescription(self, input_label_type: LabelType, output_prediction_type: PredictionType, input_features_type: FeaturesType, output_label_type: LabelType | None = None, input_prediction_type: PredictionType | None = None, output_features_type: FeaturesType | None = 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:
- class FormatType¶
- DsJson = FormatType.DsJson¶
- Json = FormatType.Json¶
- VwText = FormatType.VwText¶
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[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
Literal[‘Default’] |NameInteraction
Labels¶
- class LabelType¶
Type of label
Simple - Corresponds with
reductionml.SimpleLabelCB - Corresponds with
reductionml.CbLabelBinary - not implemented
- Binary = LabelType.Binary¶
- CB = LabelType.CB¶
- Simple = LabelType.Simple¶
Predictions¶
- class PredictionType¶
Type of prediction
Scalar - Corresponds with
reductionml.ScalarPredActionScores - Corresponds with
reductionml.ActionScoresPredActionProbs - Corresponds with
reductionml.ActionProbsPredBinary - not implemented
- ActionProbs = PredictionType.ActionProbs¶
- ActionScores = PredictionType.ActionScores¶
- Binary = PredictionType.Binary¶
- Scalar = PredictionType.Scalar¶
- class ScalarPred(prediction: float, raw_prediction: float)¶
- Parameters:
- prediction¶
- raw_prediction¶
Features¶
- class FeaturesType¶
Type of features
SparseSimple - Corresponds with
reductionml.SparseFeaturesSparseCbAdf - Corresponds with
reductionml.CbAdfFeatures
- SparseCbAdf = FeaturesType.SparseCbAdf¶
- SparseSimple = FeaturesType.SparseSimple¶
- class CbAdfFeatures¶
- class SparseFeatures¶
- class typing_extensions.NotRequired¶