Kaggle competition: SQL Saturday Madrid ML Challenge
lrf=learn.lr_find()
learn.recorder.plot()<define_search_space>
df_train_with_no_id = pd.read_csv('.. /input/train.csv')
 df_train_with_no_id=df_train_with_no_id.drop(['id'],1)
 X = np.array(df_train_with_no_id.drop(['diagnosis'],1))
y = np.array(df_train_with_no_id['diagnosis'])
 X.shape
model = linear_model.LogisticRegression()
model.fit(X,y)
 predictions = model.predict(X)
 model.score(X,y)
 validation_size = 0.20
seed = 7
X_train, X_validation, Y_train, Y_validation = model_selection.train_test_split(X, y, test_size=validation_size, random_state=seed)
 name='Logistic Regression'
kfold = model_selection.KFold(n_splits=10, random_state=seed)
 cv_results = model_selection.cross_val_score(model, X_train, Y_train, cv=kfold, scoring='accuracy')
 msg = "%s: %f(%f)" %(name, cv_results.mean() , cv_results.std())
 print(msg)
 predictions = model.predict(X_validation)
 print(accuracy_score(Y_validation, predictions))
print(classification_report(Y_validation, predictions))
<train_model><EOS> 
datos_submit = pd.read_csv('.. /input/dataForSubmission.csv')
 ids=datos_submit['id']
datos_submit=datos_submit.drop(['id'],1)
 predictions=model.predict(datos_submit)
 predictions
resultados=DataFrame({'Id': ids, 'Predicted': predictions})
 resultados
resultados.to_csv('resultados_1.csv', index = False )