Kaggle competition: Forest Cover Type Prediction
learn = cnn_learner(train_img, models.densenet161, metrics=[error_rate, accuracy] )<find_best_params>
train = pd.read_csv('.. /input/train.csv' , index_col='Id')
 test = pd.read_csv('.. /input/test.csv' , index_col='Id')
 labels = train.Cover_Type
train.drop('Cover_Type' , axis = 1 , inplace =True)
 train.head(3 )
learn.lr_find()<train_model>
train.isna().sum()
lr = 3e-02
learn.fit_one_cycle(5,slice(lr))<find_best_params>
test.isna().sum()
learn.unfreeze()
learn.lr_find()
learn.recorder.plot()<train_model>
scaler = RobustScaler()
train = scaler.fit_transform(train)
 test = scaler.transform(test )
learn.fit_one_cycle(1, slice(1e-06))<predict_on_test>
clf = GradientBoostingClassifier(learning_rate=0.65 , n_estimators= 250 ,max_depth = 9)
 cross_val_score(clf , train , labels , cv = 3 )
preds,_ = learn.get_preds(ds_type=DatasetType.Test )<filter>
clf.fit(train, labels )
test_df.has_cactus = preds.numpy() [:, 0]<save_to_csv>
pre = clf.predict(test )
<set_options><EOS> 
ansdf = pd.read_csv('.. /input/sampleSubmission.csv')
 ansdf['Cover_Type'] = pre
ansdf.to_csv('submit.csv', index = False )