Hi all,
I training my xboost model and used predict_proba to get probabilities for my binary classification problem, but the output score is between 0.19 and 0.76, so I wonder what does it mean that I did not get score from (0,1) but narrower range?
Here is my code, which is rather super standard:
from xgboost import XGBClassifier
clf = XGBClassifier(seed=42)
max_depth = range(3, 15, 1)
min_child_weight = range(5, 12, 1)
subsample = [i / 10.0 for i in range(6, 10)]
colsample_bytree = [i / 10.0 for i in range(6, 10)]
learning_rate = [0.0001, 0.01, 0.1, 0.2]
# Create the random grid
random_grid = {'max_depth': max_depth, 'min_child_weight': min_child_weight,
'subsample': subsample, 'colsample_bytree': colsample_bytree, 'learning_rate': learning_rate}
clf = random_grid_search_for_clasiffier(clf, random_grid, scoring_function,
X_train, y_train, X_test, y_test, n_iter=1500)
y_results = clf.predict_proba(X_test)
Cheers,
Michal