Kaggle competition: Cassava Leaf Disease Classification
<SOS> metric: CategorizationAccuracy Kaggle data source: cassava-leaf-disease-classification<feature_engineering>
import numpy as np
import pandas as pd
from tensorflow import keras
new_data['overview']=new_data['overview'].fillna('' )<import_modules>
model = keras.models.Sequential()
model.add(keras.applications.Xception(input_shape=(300, 300, 3), weights=None, include_top=False))
model.add(keras.layers.GlobalAveragePooling2D())
 model.add(keras.layers.Dense(5, activation='softmax'))
model.summary()
from sklearn.linear_model import LinearRegression
import eli5
from sklearn.feature_extraction.text import TfidfVectorizer, CountVectorizer 
<train_on_grid>
model.load_weights(".. /input/cassava-xception-try/best_weights_xception.h5" )
<load_pretrained><EOS> 
preds = []
ss = pd.read_csv('.. /input/cassava-leaf-disease-classification/sample_submission.csv')
 for image in ss.image_id:
img = keras.preprocessing.image.load_img('.. /input/cassava-leaf-disease-classification/test_images/' + image)
 img = keras.preprocessing.image.img_to_array(img)
 img = keras.preprocessing.image.smart_resize(img,(300, 300))
img = np.expand_dims(img, 0)
 prediction = model.predict(img)
 preds.append(np.argmax(prediction))
my_submission = pd.DataFrame({'image_id': ss.image_id, 'label': preds})
 my_submission.to_csv('submission.csv', index=False )