XGBLearner

class pyprophet.scoring.classifiers.XGBLearner(autotune, xgb_params, threads)[source]

Bases: AbstractLearner

Implements an XGBoost-based learner for scoring.

- tune

Tune hyperparameters using RandomizedSearchCV.

- learn

Train the XGBoost model using decoy and target peaks.

- score

Score the given peaks using the XGBoost model.

- get_parameters

Retrieve the parameters of the XGBoost model.

- set_parameters

Set the parameters of the XGBoost model.

__init__(autotune, xgb_params, threads)[source]
get_parameters()[source]

Retrieve the parameters of the XGBoost model.

learn(decoy_peaks, target_peaks, use_main_score=True)[source]

Train the XGBoost model using decoy and target peaks.

score(peaks, use_main_score)[source]

Score the given peaks using the XGBoost model.

set_parameters(classifier)[source]

Set the parameters of the XGBoost model.

tune(decoy_peaks, target_peaks, use_main_score=True, cv_splits=3, n_jobs=-1)[source]

Tune hyperparameters using RandomizedSearchCV for faster optimization.

Parameters:
  • decoy_peaks (Experiment) – Decoy peaks data.

  • target_peaks (Experiment) – Target peaks data.

  • use_main_score (bool) – Whether to use the main score.

  • cv_splits (int) – Number of cross-validation splits.

  • n_jobs (int) – Number of parallel jobs.

Returns:

The tuned learner instance.

Return type:

XGBLearner