You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
preds = pd.concat([y_train,predictionsBasedOnKFolds.loc[:,1]], axis=1) will return the prob1, which is what we want. The "1" refers to the prob1 here.
preds would return:
index trueLabel prediction
1 0 .1
This is what we want. We want prob1 to be returned so that when the label is 1, prob1 is close to 1 (ideally), and when the label is 0, prob1 is close to 0 (ideally).
Please let me know if you still have questions about this. Happy to clarify this more.
In [32]:
preds = pd.concat([y_train,predictionsBasedOnKFolds.loc[:,1]], axis=1)
the above is wrong... it would always grab prediction for class 1
so if we had predict_proba give us something like
index prob0 prob1
1 0.9 0.1
and label is
index label
1 0
so above would produce preds as
index trueLabel prection
1 0 0.1
should be 0.9, not 0.1
The text was updated successfully, but these errors were encountered: