I have data of 200 persons with 2 variables:
1. C_level: Blood level of a chemical C (a numeric value) 2. Disease: Yes or No
I want to know if C_level can be used to predict the presence of Disease and what is the area under ROC curve. So Disease is y and C_level is X. However, I am not clear about proper method to achieve this. I see following options:
To take Disease variable as y_true and C_level as X or y_score and create an ROC curve with some software like: roc_auc_score function using code similar to following:
AUC = roc_auc_score(y, X, multi_class='ovr')
Take the data; fit a classifier (e.g. Logistic regression) and find AUC of ROC curve with predicted probabilities of X using code similar to following (from here):
clf = LogisticRegression(solver="liblinear").fit(X, y)
AUC = roc_auc_score(y, clf.predict_proba(X), multi_class='ovr')
Take the data; split it in train and test parts; fit a classifier (e.g. Logistic regression) with train part of data; and finally find AUC of ROC curve with test parts of data with code as in option 2.
Which of these is the correct method for finding area under the ROC curve (AUC)?
Edit: I found another option:
- Get cross validation score as given here. However, I am not sure the value given by cross_val_score function is same as area under ROC curve.