Kaggle competition: Aerial Cactus Identification
<SOS> metric: AUC Kaggle data source: aerial-cactus-identification<train_model>
import numpy as np
import pandas as pd
print(high_skewness)
 print('
Variables with high skewness:
',skewed_features )<feature_engineering>
from pathlib import Path
from fastai import *
from fastai.vision import *
import torch
for feature in skewed_features:
train_test[feature] = boxcox1p(train_test[feature], boxcox_normmax(train_test[feature] + 1)) 
<categorify>
data_folder = Path(".. /input")
train_test=pd.get_dummies(train_test,dtype='int8' )<create_dataframe>
train_df = pd.read_csv(".. /input/train.csv")
 test_df = pd.read_csv(".. /input/sample_submission.csv" )
train_test_null_info=pd.DataFrame(train_test.isnull().sum() ,columns=['Count of NaN'])
 train_test_dtype_info=pd.DataFrame(train_test.dtypes,columns=['DataTypes'])
 train_test_info=pd.concat([train_test_null_info,train_test_dtype_info],axis=1)
 train_test_info<split>
train_img.show_batch(rows=3, figsize=(7,6))
train=train_test[0:1460]
test=train_test[1460:2919]<sort_values>
learn = cnn_learner(train_img, models.vgg19_bn, metrics=[error_rate, accuracy] )
corr_dict2=corr_new_train['SalePrice'].sort_values(ascending=False ).to_dict()
corr_dict2<define_variables>
lr = 3e-02
learn.fit_one_cycle(5, slice(lr))
best_columns=[]
for key,value in corr_dict2.items() :
if(( value>=0.3175)&(value<0.9)) |(value<=-0.315):
best_columns.append(key)
 best_columns<feature_engineering>
preds,_ = learn.get_preds(ds_type=DatasetType.Test )
train['SalePrice_Log1p'] = np.log1p(train.SalePrice )<filter>
test_df.has_cactus = preds.numpy() [:, 0]
print(len(train[(train.KitchenQual==3)&(train.SalePrice>360000)].index))<train_on_grid>
test_df.to_csv('submission.csv', index=False )