Kaggle competition: Otto Group Product Classification Challenge
<SOS> metric: MulticlassLoss Kaggle data source: otto-group-product-classification-challenge<feature_engineering>
warnings.filterwarnings('ignore')
 def display(*dfs, head=True):
for df in dfs:
IPython.display.display(df.head() if head else df )
test['selected_text'] = predicts
test.head()<save_to_csv>
train = pd.read_csv(".. /input/otto-group-product-classification-challenge/train.csv")
 test = pd.read_csv(".. /input/otto-group-product-classification-challenge/test.csv")
 sample = pd.read_csv(".. /input/otto-group-product-classification-challenge/sampleSubmission.csv")
 tage = train.target.values
X = train.drop("id",axis = 1)
 X = X.drop("target",axis = 1)
 y = test.drop("id",axis = 1)
 lbl_enc = preprocessing.LabelEncoder()
label_encoded_y = lbl_enc.fit_transform(tage)
 X_train, X_test, y_train, y_test = train_test_split(X, label_encoded_y,test_size=0.20, random_state=29)
 train_data = lgb.Dataset(X_train, label=y_train)
 eval_data = lgb.Dataset(X_test, label=y_test, reference= train_data)
 params = {
'task': 'train',
'boosting_type': 'gbdt',
'objective': 'multiclass',
'num_class': 9,
'verbose': 2,
}
model = lgb.train(
 params,
train_data,
valid_sets=eval_data,
num_boost_round=100,
verbose_eval=10,
)
test[['textID','selected_text']].to_csv('submission.csv', index=False )<set_options>
y_pred_prob = model.predict(y, num_iteration=model.best_iteration)
<feature_engineering><EOS> 
y_pred_prob = pd.DataFrame(y_pred_prob, index=sample.id.values, columns=sample.columns[1:])
 y.to_csv("tes.csv",index=False)
 y_pred_prob.to_csv("out1.csv", index_label='id' )