HistGBCLearner
- class pyprophet.scoring.classifiers.HistGBCLearner(autotune=False, hgb_params=None, threads=1)[source]
Bases:
AbstractLearnerImplements a scikit-learn HistGradientBoostingClassifier-based learner for scoring.
Note
HistGradientBoostingClassifier uses internal parallelism via OpenMP. To control thread usage and avoid CPU oversubscription, set the OMP_NUM_THREADS environment variable BEFORE launching pyprophet:
export OMP_NUM_THREADS=6 pyprophet score --in data.osw --classifier HistGradientBoosting --threads 3
The CLI will automatically set OMP_NUM_THREADS if not already set, but explicit control is more reliable. Setting it after Python/NumPy/Sklearn imports will have no effect.
Use threadpoolctl within the code as a runtime fallback, but OMP_NUM_THREADS must be set before import for guaranteed effect.
- - tune
Tune hyperparameters using RandomizedSearchCV.
- - learn
Train the HistGradientBoosting model using decoy and target peaks.
- - score
Score the given peaks using the trained model.
- - get_parameters
Retrieve the parameters of the model.
- - set_parameters
Set the parameters of the model.