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.
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
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.
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