Module 3- boosting algorithms with PyCaret (XGBoost, Catboost and lightGBM)

แชร์
ฝัง
  • เผยแพร่เมื่อ 8 ก.พ. 2025

ความคิดเห็น • 2

  • @stefaniebabiolakis2724
    @stefaniebabiolakis2724 3 หลายเดือนก่อน +1

    Thank you for such an insightful and helpful video tutorial! Do you have any tips on how to set a custom probability threshold for XGBoost in PyCaret (i.e. metrics, plots, tuning, and predictions)? I have approximately 30% of my dataset in the positive class, so would expect my XGBoost to perform best with a threshold close to 0.3, not the default 0.5.

    • @pedramjahangiry
      @pedramjahangiry  3 หลายเดือนก่อน

      you should be able to do it by adjusting the "probability_threshold" inside the predict_model function. After you created your xgboost model, do something like this:
      xgb = create_model('xgboost')
      predictions = predict_model(xgb, data=data, probability_threshold=0.3)
      always check out the source code to figure out how you can play with these parameters inside each function: github.com/pycaret/pycaret/blob/master/pycaret/classification/functional.py