Kaggle competition: Aerial Cactus Identification
train['Total_Bathrooms'] =(train['FullBath'] +(0.5*train['HalfBath'])+ train['BsmtFullBath'] +(0.5*train['BsmtHalfBath']))
train['Total_porch_sf'] =(train['OpenPorchSF'] + train['3SsnPorch'] + train['EnclosedPorch'] + train['ScreenPorch'] + train['WoodDeckSF'])
 test['Total_Bathrooms'] =(test['FullBath'] +(0.5*test['HalfBath'])+ test['BsmtFullBath'] +(0.5*test['BsmtHalfBath']))
test['Total_porch_sf'] =(test['OpenPorchSF'] + test['3SsnPorch'] + test['EnclosedPorch'] + test['ScreenPorch'] + test['WoodDeckSF'] )<count_missing_values>
train_dir=".. /input/train/train"
test_dir=".. /input/test/test"
train = pd.read_csv('.. /input/train.csv')
 test = pd.read_csv(".. /input/sample_submission.csv")
 data_folder = Path(".. /input")
train.isna().sum() [train.isna().sum() !=0]<count_missing_values>
learn = cnn_learner(train_img, models.densenet161, metrics=[error_rate, accuracy])
test.isna().sum() [test.isna().sum() !=0]<count_unique_values>
learn.lr_find()
for col in train.columns:
if train[col].dtype == "object":
print("Cardinality of %s variable in Training Data:"%col,train[col].nunique())
 print("Cardinality of %s variable in Testing Data:"%col,test[col].nunique())
 print("
" )<sort_values>
lr = 1e-02
learn.fit_one_cycle(10, slice(lr))
train.corr() ['SalePrice'].sort_values(ascending=False )<drop_column>
preds,_ = learn.get_preds(ds_type=DatasetType.Test )
train.drop(['GarageCars','TotRmsAbvGrd','1stFlrSF'],axis=1,inplace=True)
 test.drop(['GarageCars','TotRmsAbvGrd','1stFlrSF'],axis=1,inplace=True )<sort_values>
test.has_cactus = preds.numpy() [:, 0]
train.corr() ['SalePrice'].sort_values(ascending=False )<create_dataframe>
test.to_csv('submission.csv', index=False )