i have the same question, i have a dataset contening medical variables using to determine whether the patient have to receive outpatient care or not,
the target variable is SOURCE :
0 for outpatient care
1 otherwise
i'm using the method of supervised learning glm (logistic regression) of caret package in R, it predicts the probability that the individual belongs to the positive class, chatgpt is saying that the positive class is the second one, but i don't know how i can get sure that the model predicts p(k="1"/xi).
glm gives only probabilities as results when using the function predict, so i must converting proba to label (0 or 1) according to the threshold. so theses proba are for p(k=first level of the factor variable) ?