Kaggle competition: Aerial Cactus Identification
<SOS> metric: AUC Kaggle data source: aerial-cactus-identification<train_model>
import numpy as np
import pandas as pd
dt.fit(x_train,x_test)
 dt.score(y_train,y_test )<save_to_csv>
from pathlib import Path
from fastai import *
from fastai.vision import *
import torch
model14pred = SVM_all.predict(y_train)
 submission14 = pd.DataFrame(columns = ['PassengerId','Survived'])
 submission14['PassengerId'] = result['PassengerId']
submission14['Survived'] = model14pred
submission14.to_csv('DecisionTrees(HT ).csv',index = False )<train_on_grid>
data_folder = Path(".. /input")
<compute_train_metric>
train_df = pd.read_csv(".. /input/train.csv")
 test_df = pd.read_csv(".. /input/sample_submission.csv" )
mnb = MultinomialNB(alpha = 1,fit_prior = True)
 Estimator.append(( 'mnb',MultinomialNB(alpha = 1,fit_prior = True)))
 cv = cross_val_score(mnb,x_train,x_test,cv=10)
 Accuracy5 = cv.mean()
Accuracy.append(Accuracy5)
 print(cv)
 print(cv.mean() )<train_model>
learn = cnn_learner(train_img, models.densenet161, metrics=[error_rate, accuracy] )
mnb.fit(x_train,x_test)
 mnb.score(y_train,y_test )<save_to_csv>
lr = 3e-02
learn.fit_one_cycle(5, slice(lr))
model15pred = mnb.predict(y_train)
 submission15 = pd.DataFrame(columns = ['PassengerId','Survived'])
 submission15['PassengerId'] = result['PassengerId']
submission15['Survived'] = model15pred
submission15.to_csv('MultinomialNB(HT ).csv',index = False )<define_search_space>
preds,_ = learn.get_preds(ds_type=DatasetType.Test )
<train_on_grid>
test_df.has_cactus = preds.numpy() [:, 0]
<compute_train_metric><EOS> 
test_df.to_csv('submission.csv', index=False )