Created
July 2, 2020 15:42
-
-
Save pycaret/e203eee47ffed7e9910ce0bb6e8be50f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Importing dataset | |
from pycaret.datasets import get_data | |
credit = get_data('credit') | |
# Importing module and initializing setup | |
from pycaret.classification import * | |
clf1 = setup(data = credit, target = 'default') | |
# create a model | |
xgboost = create_model('xgboost') | |
# optimize threshold for trained model | |
optimize_threshold(xgboost, true_negative = 1500, false_negative = -5000) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi Moez,
what does 1500 and -5000 mean? Dollar value?
If I'd to have a high precision in the model, should I increase or decrease probability_threshold?
Thanks!