<jupyter_start><jupyter_text>Example<jupyter_code>from sklearn.linear_model import LogisticRegression
from sklearn.svm import SVC
from sklearn.naive_bayes import GaussianNB
from sklearn.ensemble import RandomForestClassifier
from sklearn.ensemble import GradientBoostingClassifier
from xgboost import XGBClassifier
from lightgbm import LGBMClassifier 

level_1_classifier  = {'logistic_classifier'             : LogisticRegression(),
                       'svm_classifier'                  : SVC(probability=True, C=10, gamma=0.001, kernel='rbf'),
                       'naive_bayse_gaussian_classifier' : GaussianNB()}

level_2_classifier  = {'rf_classifer'    : RandomForestClassifier(),
                       'gbdt_classifier' : GradientBoostingClassifier(),
                       'xgb_classifier'  : XGBClassifier()}

final_classifier    = {'lgb_classifier'  : LGBMClassifier()}

all_classifiers_dic = {'level_2_classifier' : level_2_classifier,
                       'level_1_classifier' : level_1_classifier,
                       'level_3_classifier' : final_classifier}

(model_trained_dict, n_final_clf, final_df_x) = TotalModelTrain(X_total[0:1230], Y_total[0:1230], kfold_num=10, is_debug=0, is_scoring=1, is_print_feature_imp=1, best_num=20, **all_classifiers_dic)
X_total.head()
final_df_x['Label'] = Y_total['Label']
final_df_x.head()
new_feature_X_df = TotalModelTest(X_total[1230::], model_trained_dict, n_final_clf, Y_total[1230::], is_debug=0, is_scoring=1, voting=1, is_print_roc=1, **all_classifiers_dic)
#new_feature_X_df = TotalModelTest(X_total[1230:1232:], model_trained_dict, n_final_clf, Y_total[1230:1232:], is_debug=0, is_scoring=1, voting=1, is_print_roc=1, **all_classifiers_dic)
#new_feature_X_df = TotalModelTest(X_total[1230:1231:], model_trained_dict, n_final_clf, is_debug=0, is_scoring=0, voting=1, **all_classifiers_dic)
#new_feature_X_df = TotalModelTest(X_total[1230::], model_trained_dict, n_final_clf, Y_aa_data, is_debug=0, is_scoring=1, voting=1, **all_classifiers_dic)
new_feature_X_df.head()
index = 0
for x in Y_total['Label'][1230::]:
    if(x != new_feature_X_df['Label_lgb_classifier'][index]):
        print(f"noneq index = {index}")
    index += 1<jupyter_output>noneq index = 57
noneq index = 60
noneq index = 88
noneq index = 112
noneq index = 120
noneq index = 177
noneq index = 405
noneq index = 437
noneq index = 461
noneq index = 586
noneq index = 633
noneq index = 692
noneq index = 798
noneq index = 820
noneq index = 883
noneq index = 932
noneq index = 1045
noneq index = 1111
noneq index = 1123
noneq index = 1135
noneq index = 1177
{'fraction_non_alphanumeric': 0.1042708734128511, 'fraction_numerical': 0.058099268949596, 'mean_word_length': 4.963302752293578, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '317080', 'license': 'MIT', 'n_tokens_mistral': 1056, 'n_tokens_neox': 958, 'n_words': 183, 'path': 'Total_Model_2017-2018_FineGrained.ipynb', 'repo_name': 'Coslate/DataMining_Final', 'size': '2599'}