Skip to content

DummyClassifier

DummyClassifierMLArgs dataclass

Bases: MLModelArgs

Model arguments for the Dummy Classifier model.

Attributes:

Name Type Description
batch_size int

The batch size for training.

use_fixation_report bool

Whether to use the fixation report.

backbone str

The backbone model to use.

item_level_features_modes list[ItemLevelFeaturesModes]

The item-level features to use.

sklearn_pipeline tuple

The scikit-learn pipeline for the model.

sklearn_pipeline_param_clf__strategy str

Strategy for the dummy classifier ("stratified", "most_frequent", etc.).

sklearn_pipeline_param_clf__random_state int

Random seed for the dummy classifier.

Source code in src/configs/models/ml/DummyClassifier.py
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
@register_model_config
@dataclass
class DummyClassifierMLArgs(MLModelArgs):
    """
    Model arguments for the Dummy Classifier model.

    Attributes:
        batch_size (int): The batch size for training.
        use_fixation_report (bool): Whether to use the fixation report.
        backbone (str): The backbone model to use.
        item_level_features_modes (list[ItemLevelFeaturesModes]): The item-level features to use.
        sklearn_pipeline (tuple): The scikit-learn pipeline for the model.
        sklearn_pipeline_param_clf__strategy (str): Strategy for the dummy classifier
            ("stratified", "most_frequent", etc.).
        sklearn_pipeline_param_clf__random_state (int): Random seed for the dummy classifier.
    """

    base_model_name: MLModelNames = MLModelNames.DUMMY_CLASSIFIER
    item_level_features_modes: list[ItemLevelFeaturesModes] = field(
        default_factory=lambda: [ItemLevelFeaturesModes.READING_SPEED]
    )
    sklearn_pipeline: tuple = (('clf', 'sklearn.dummy.DummyClassifier'),)
    sklearn_pipeline_param_clf__strategy: str = 'most_frequent'
    sklearn_pipeline_param_clf__random_state: int = 1

    batch_size: int = 1024
    use_fixation_report: bool = True
    backbone: BackboneNames = BackboneNames.ROBERTA_LARGE

DummyRegressorMLArgs dataclass

Bases: MLModelArgs

Model arguments for the Dummy Regressor model.

Attributes:

Name Type Description
batch_size int

The batch size for training.

use_fixation_report bool

Whether to use the fixation report.

backbone str

The backbone model to use.

item_level_features_modes list[ItemLevelFeaturesModes]

The item-level features to use.

sklearn_pipeline list

The scikit-learn pipeline for the model.

sklearn_pipeline_param_reg__strategy str

Strategy for the dummy regressor ("mean", "median", etc.).

sklearn_pipeline_param_reg__random_state int

Random seed for the dummy regressor.

Source code in src/configs/models/ml/DummyClassifier.py
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
@register_model_config
@dataclass
class DummyRegressorMLArgs(MLModelArgs):
    """
    Model arguments for the Dummy Regressor model.

    Attributes:
        batch_size (int): The batch size for training.
        use_fixation_report (bool): Whether to use the fixation report.
        backbone (str): The backbone model to use.
        item_level_features_modes (list[ItemLevelFeaturesModes]): The item-level features to use.
        sklearn_pipeline (list): The scikit-learn pipeline for the model.
        sklearn_pipeline_param_reg__strategy (str): Strategy for the dummy regressor ("mean", "median", etc.).
        sklearn_pipeline_param_reg__random_state (int): Random seed for the dummy regressor.
    """

    base_model_name: MLModelNames = MLModelNames.DUMMY_REGRESSOR
    item_level_features_modes: list[ItemLevelFeaturesModes] = field(
        default_factory=lambda: [ItemLevelFeaturesModes.READING_SPEED]
    )
    sklearn_pipeline: tuple = (('reg', 'sklearn.dummy.DummyRegressor'),)
    sklearn_pipeline_param_reg__strategy: str = 'mean'

    batch_size: int = 1024
    use_fixation_report: bool = True
    backbone: BackboneNames = BackboneNames.ROBERTA_LARGE