Kaggle competition: Toxic Comment Classification Challenge
<SOS> metric: MCAUC Kaggle data source: toxic-comment-classification-challenge<compute_train_metric>
global_score = f1_score(y_test, clf_final.predict(X_test), average='macro')
 vc.voting = 'soft'
global_score_soft = f1_score(y_test, vc.predict(X_test), average='macro')
 vc.voting = 'hard'
global_score_hard = f1_score(y_test, vc.predict(X_test), average='macro')
 print('Validation score of a single LGBM Classifier: {:.4f}'.format(global_score))
print('Validation score of a VotingClassifier on 3 LGBMs with soft voting strategy: {:.4f}'.format(global_score_soft))
print('Validation score of a VotingClassifier on 3 LGBMs with hard voting strategy: {:.4f}'.format(global_score_hard))<compute_train_metric>
import pandas as pd
global_score = f1_score(y_test, clf_final.predict(X_test), average='macro')
 vc.voting = 'soft'
global_score_soft = f1_score(y_test, vc.predict(X_test), average='macro')
 vc.voting = 'hard'
global_score_hard = f1_score(y_test, vc.predict(X_test), average='macro')
 print('Validation score of a single LGBM Classifier: {:.4f}'.format(global_score))
print('Validation score of a VotingClassifier on 3 LGBMs with soft voting strategy: {:.4f}'.format(global_score_soft))
print('Validation score of a VotingClassifier on 3 LGBMs with hard voting strategy: {:.4f}'.format(global_score_hard))<compute_test_metric>
import pandas as pd
ranked_features = feature_importance(clf_final, X_train )<create_dataframe>
glove = pd.read_csv(".. /input/nb-svm-strong-linear-baseline/submission.csv")
 subb = pd.read_csv('.. /input/fasttext-like-baseline-with-keras-lb-0-053/submission_bn_fasttext.csv')
 ave = pd.read_csv('.. /input/toxic-avenger/submission.csv')
 lstm = pd.read_csv('.. /input/toxicfiles/baselinelstm0069.csv')
 svm = pd.read_csv(".. /input/toxicfiles/lstmglove0072ge.csv" )
y_subm = pd.DataFrame()
y_subm['Id'] = test_ids<predict_on_test>
col = col.tolist()
col.remove('id' )
y_subm['Target'] = clf_final.predict(test[X_train.columns])+ 1
vc.voting = 'soft'
y_subm_soft = y_subm.copy(deep=True)
 y_subm_soft['Target'] = vc.predict(test[X_train.columns])+ 1
vc.voting = 'hard'
y_subm_hard = y_subm.copy(deep=True)
 y_subm_hard['Target'] = vc.predict(test[X_train.columns])+ 1<save_to_csv>
for i in col:
ble[i] =(subb[i] + lstm[i] + glove[i] + svm[i] + ave[i])/ 5
<import_modules><EOS> 
ble.to_csv('blend_sub.csv', index = False )