xgboost
XGBoostClassifierLearner(threshold=0.5, callbacks=None, **kwargs)
Bases: SupervisedLearner
Wrapper for XGBoost classifiers.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
threshold
|
float
|
Decision threshold for binary classification (default: 0.5). |
0.5
|
callbacks
|
list[LearnerCallback] | LearnerCallback | None
|
Optional callbacks for progress feedback. Use |
None
|
**kwargs
|
Any
|
Arguments passed to XGBClassifier (n_estimators, max_depth, etc.) |
{}
|
Source code in src/flowcean/xgboost/learner.py
84 85 86 87 88 89 90 91 92 93 | |
XGBoostRegressorLearner(callbacks=None, **kwargs)
Bases: SupervisedLearner
Wrapper for XGBoost regressor.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
callbacks
|
list[LearnerCallback] | LearnerCallback | None
|
Optional callbacks for progress feedback. Use |
None
|
**kwargs
|
Any
|
Arguments passed to XGBRegressor (n_estimators, max_depth, etc.) |
{}
|
Source code in src/flowcean/xgboost/learner.py
162 163 164 165 166 167 168 169 | |
XGBoostClassifierModel(classifier, *, input_features, output_features, threshold=0.5)
Bases: Model
Wrapper for an XGBoost classifier model with threshold support.
Source code in src/flowcean/xgboost/model.py
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | |
predict_proba(input_features)
Predict class probabilities, applying preprocessing transforms.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
input_features
|
LazyFrame
|
The inputs for which to predict probabilities. |
required |
Returns:
| Type | Description |
|---|---|
LazyFrame
|
The predicted probabilities for the positive class. |
Source code in src/flowcean/xgboost/model.py
47 48 49 50 51 52 53 54 55 56 57 | |
__getstate__()
Remove callbacks when pickling (they contain unpickleable locks).
Source code in src/flowcean/xgboost/model.py
59 60 61 62 63 64 65 66 67 68 69 | |
__setstate__(state)
Restore state after unpickling.
Source code in src/flowcean/xgboost/model.py
71 72 73 | |
XGBoostRegressorModel(regressor, *, input_features, output_features)
Bases: Model
Wrapper for an XGBoost regressor model.
Source code in src/flowcean/xgboost/model.py
110 111 112 113 114 115 116 117 118 119 120 | |
__getstate__()
Remove callbacks when pickling (they contain unpickleable locks).
Source code in src/flowcean/xgboost/model.py
122 123 124 125 126 127 128 129 130 131 132 | |
__setstate__(state)
Restore state after unpickling.
Source code in src/flowcean/xgboost/model.py
134 135 136 | |