Skip to content

xgboost

XGBoostClassifierLearner(**kwargs)

Bases: SupervisedLearner

Wrapper for XGBoost classifiers.

Source code in src/flowcean/xgboost/learner.py
14
15
16
17
18
def __init__(self, **kwargs: Any) -> None:
    self.classifier = XGBClassifier(
        **kwargs,
    )
    super().__init__()

XGBoostRegressorLearner(**kwargs)

Bases: SupervisedLearner

Wrapper for XGBoost regressor.

Source code in src/flowcean/xgboost/learner.py
46
47
48
49
50
def __init__(self, **kwargs: Any) -> None:
    self.regressor = XGBRegressor(
        **kwargs,
    )
    super().__init__()

XGBoostClassifierModel(classifier, *, input_features, output_features)

Bases: Model

Wrapper for an XGBoost classifier model.

Source code in src/flowcean/xgboost/model.py
18
19
20
21
22
23
24
25
26
27
28
def __init__(
    self,
    classifier: XGBClassifier,
    *,
    input_features: list[str],
    output_features: list[str],
) -> None:
    super().__init__()
    self.classifier = classifier
    self.input_features = input_features
    self.output_features = output_features

XGBoostRegressorModel(regressor, *, input_features, output_features)

Bases: Model

Wrapper for an XGBoost regressor model.

Source code in src/flowcean/xgboost/model.py
82
83
84
85
86
87
88
89
90
91
92
def __init__(
    self,
    regressor: XGBRegressor,
    *,
    input_features: list[str],
    output_features: list[str],
) -> None:
    super().__init__()
    self.regressor = regressor
    self.input_features = input_features
    self.output_features = output_features