Proper way to finding area under ROC curve (AUC) 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.


It seems like you are trying to obtain an estimate for the discriminative capability of a logistic regression model.  Let me propose a fifth method:


*The optimism corrected bootstrap estimate of the AUC for your model.

The optimism bootstrap corrected estimate is discussed in the following books: Elements of Statistical Learning, Regression Modelling Strategies, and Clinical Prediction Models. For a review, I suggest you read these.
As compared to the methods you describe, the optimism bootstrap has the benefit of using all the data to estimate the AUC and using all the data to estimate the optimism.  No data is held out per se as would be in cross validation.  Because you're using python, I will point you to my blog post on the optimism bootstrap here.
