【PYTHON PYTORCH】metric auc

 from pandas import read_csv

from sklearn.model_selection import KFold
from sklearn.model_selection import cross_val_score
from sklearn.linear_model import LogisticRegression

filename = 'pima-indians-diabetes.csv'
names = ['preg''plas''pres''skin''test''mass''pedi''age''class']
dataframe = read_csv(filename, names=names)

array = dataframe.values

#splitting the array to input and output
X = array[:,0:8]
Y = array[:,8]



kfold = KFold(n_splits=10, random_state = 7)
model = LogisticRegression(solver='liblinear')
scoring = 'roc_auc'

results = cross_val_score(model, X, Y, cv=kfold, scoring=scoring)
print("AUC : %.3f (%.3f) " % (results.mean(), results.std()))

No comments:

New T-shirt Design Contest!

I know you Intel Weebs can draw... ͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­...

Contact Form

Name

Email *

Message *