<jupyter_start><jupyter_text>___________________ The hh analysis<jupyter_code>channels = [df_hhsm_t, df_hhsm_i, df_hhsm_b, df_bbh_tth, df_bbxaa]
df_train = pd.concat(channels, ignore_index=True)
df_train = df_train.sample(frac=1).reset_index(drop=True)
class_names = [r'$bb\gamma\gamma$', r'$Q\bar{Q}h$', r'$hh^{gg\rm F}_{\rm box}$', r'$hh^{gg \rm F}_{\rm int}$', r'$hh^{gg\rm F}_{\rm tri}$']
filename = '../results/models/FCC-hh-BDT/hh-BDT-5class-hhsm.pickle.dat'
shap_plot = '../plots/FCC-hh-shap-bbxaa-bbh-tth-hhsm.pdf'

classifier, x_test, y_test, shap_values_5, X_shap_5 = runBDT(df_train, filename, depth=10)
abs_shap(shap_values_5, X_shap_5, shap_plot, names=names, class_names=class_names, cmp=cmp_5)
hhsm_t_p = df_hhsm_t_test.sample(n=round(weight_hhsm_t), replace=True, random_state=seed).reset_index(drop=True)
hhsm_i_p = df_hhsm_i_test.sample(n=round(weight_hhsm_i), replace=True, random_state=seed).reset_index(drop=True)
hhsm_i_b = df_hhsm_b_test.sample(n=round(weight_hhsm_b), replace=True, random_state=seed).reset_index(drop=True)
bbh_tth_p = df_bbh_tth_test.sample(n=round(weight_bbh_tth), replace=True, random_state=seed).reset_index(drop=True)
bbxaa_p = df_bbxaa_test.sample(n=round(weight_bbxaa), replace=True, random_state=seed).reset_index(drop=True)

print('Accuracy Score for hhsm triangle: {:4.2f}% '.format(100*metrics.accuracy_score(hhsm_t_p['class'].values, classifier.predict(hhsm_t_p.drop(columns=['class', 'weight']).values))))
print('Accuracy Score for hhsm interference: {:4.2f}% '.format(100*metrics.accuracy_score(hhsm_t_p['class'].values, classifier.predict(hhsm_t_p.drop(columns=['class', 'weight']).values))))
print('Accuracy Score for hhsm box: {:4.2f}% '.format(100*metrics.accuracy_score(hhsm_i_b['class'].values, classifier.predict(hhsm_i_b.drop(columns=['class', 'weight']).values))))
print('Accuracy Score for bbh+tth: {:4.2f}% '.format(100*metrics.accuracy_score(bbh_tth_p['class'].values, classifier.predict(bbh_tth_p.drop(columns=['class', 'weight']).values))))
print('Accuracy Score for bbxaa: {:4.2f}% '.format(100*metrics.accuracy_score(bbxaa_p['class'].values, classifier.predict(bbxaa_p.drop(columns=['class', 'weight']).values))))
df_array = [df_bbxaa_test, df_bbh_tth_test, df_hhsm_b_test, df_hhsm_i_test, df_hhsm_t_test]
weight_array = [weight_bbxaa, weight_bbh_tth, weight_hhsm_b, weight_hhsm_i, weight_hhsm_t]
keys = ['tri', 'int', 'box', 'tth+bbh', 'bbxaa']
filename = '../results/confusion/FCC-hh-BDT/hh-BDT-5class-hhsm.confusion.json'

df = build_confusion(df_array, weight_array, classifier, filename, keys)
df<jupyter_output><empty_output><jupyter_text>________________________ The kappa_u & kappa_lambda<jupyter_code>channels = [df_ku, df_hhsm_t, df_hhsm_i, df_hhsm_b, df_bbh_tth, df_bbxaa]
df_train = pd.concat(channels, ignore_index=True)
df_train = df_train.sample(frac=1).reset_index(drop=True)
class_names = [r'$bb\gamma\gamma$', r'$Q\bar{Q}h$', r'$hh^{gg\rm F}_{\rm box}$', r'$hh^{gg\rm F}_{\rm int}$', r'$hh^{gg\rm F}_{\rm tri}$', r'$u \bar u hh$']
filename = '../results/models/FCC-hh-BDT/hh-BDT-6class-ku.pickle.dat'
shap_plot = '../plots/FCC-hh-shap-bbxaa-bbh-tth-hhsm-ku.pdf'

classifier, x_test, y_test, shap_values_6u, X_shap_6u = runBDT(df_train, filename, depth=10)
abs_shap(shap_values_6u, X_shap_6u, shap_plot, names=names, class_names=class_names, cmp=cmp_6)
ku_p = df_ku_test.sample(n=round(weight_ku), replace=True, random_state=seed).reset_index(drop=True)
hhsm_t_p = df_hhsm_t_test.sample(n=round(weight_hhsm_t), replace=True, random_state=seed).reset_index(drop=True)
hhsm_i_p = df_hhsm_i_test.sample(n=round(weight_hhsm_i), replace=True, random_state=seed).reset_index(drop=True)
hhsm_i_b = df_hhsm_b_test.sample(n=round(weight_hhsm_b), replace=True, random_state=seed).reset_index(drop=True)
bbh_tth_p = df_bbh_tth_test.sample(n=round(weight_bbh_tth), replace=True, random_state=seed).reset_index(drop=True)
bbxaa_p = df_bbxaa_test.sample(n=round(weight_bbxaa), replace=True, random_state=seed).reset_index(drop=True)

print('Accuracy Score for ku: {:4.2f}% '.format(100*metrics.accuracy_score(ku_p['class'].values, classifier.predict(ku_p.drop(columns=['class', 'weight']).values))))
print('Accuracy Score for hhsm triangle: {:4.2f}% '.format(100*metrics.accuracy_score(hhsm_t_p['class'].values, classifier.predict(hhsm_t_p.drop(columns=['class', 'weight']).values))))
print('Accuracy Score for hhsm interference: {:4.2f}% '.format(100*metrics.accuracy_score(hhsm_t_p['class'].values, classifier.predict(hhsm_t_p.drop(columns=['class', 'weight']).values))))
print('Accuracy Score for hhsm box: {:4.2f}% '.format(100*metrics.accuracy_score(hhsm_i_b['class'].values, classifier.predict(hhsm_i_b.drop(columns=['class', 'weight']).values))))
print('Accuracy Score for bbh+tth: {:4.2f}% '.format(100*metrics.accuracy_score(bbh_tth_p['class'].values, classifier.predict(bbh_tth_p.drop(columns=['class', 'weight']).values))))
print('Accuracy Score for bbxaa: {:4.2f}% '.format(100*metrics.accuracy_score(bbxaa_p['class'].values, classifier.predict(bbxaa_p.drop(columns=['class', 'weight']).values))))
df_array = [df_bbxaa_test, df_bbh_tth_test, df_hhsm_b_test, df_hhsm_i_test, df_hhsm_t_test, df_ku_test]
weight_array = [weight_bbxaa, weight_bbh_tth, weight_hhsm_b, weight_hhsm_i, weight_hhsm_t, weight_ku]
keys = ['ku', 'tri', 'int', 'box', 'tth+bbh', 'bbxaa']
filename = '../results/confusion/FCC-hh-BDT/hh-BDT-6class-ku.confusion.json'

df = build_confusion(df_array, weight_array, classifier, filename, keys)
df<jupyter_output><empty_output><jupyter_text>_________________________________ The kappa_d & kappa_lambda<jupyter_code>channels = [df_kd, df_hhsm_t, df_hhsm_i, df_hhsm_b, df_bbh_tth, df_bbxaa]
df_train = pd.concat(channels, ignore_index=True)
df_train = df_train.sample(frac=1).reset_index(drop=True)
class_names = [r'$bb\gamma\gamma$', r'$Q\bar{Q}h$', r'$hh^{gg\rm F}_{\rm box}$', r'$hh^{gg\rm F}_{\rm int}$', r'$hh^{gg\rm F}_{\rm tri}$', r'$d \bar d hh$']
filename = '../results/models/FCC-hh-BDT/hh-BDT-6class-kd.pickle.dat'
shap_plot = '../plots/FCC-hh-shap-bbxaa-bbh-tth-hhsm-kd.pdf'

classifier, x_test, y_test, shap_values_6d, X_shap_6d = runBDT(df_train, filename, depth=10)
abs_shap(shap_values_6d, X_shap_6d, shap_plot, names=names, class_names=class_names, cmp=cmp_6)
kd_p = df_kd_test.sample(n=round(weight_kd), replace=True, random_state=seed).reset_index(drop=True)
hhsm_t_p = df_hhsm_t_test.sample(n=round(weight_hhsm_t), replace=True, random_state=seed).reset_index(drop=True)
hhsm_i_p = df_hhsm_i_test.sample(n=round(weight_hhsm_i), replace=True, random_state=seed).reset_index(drop=True)
hhsm_i_b = df_hhsm_b_test.sample(n=round(weight_hhsm_b), replace=True, random_state=seed).reset_index(drop=True)
bbh_tth_p = df_bbh_tth_test.sample(n=round(weight_bbh_tth), replace=True, random_state=seed).reset_index(drop=True)
bbxaa_p = df_bbxaa_test.sample(n=round(weight_bbxaa), replace=True, random_state=seed).reset_index(drop=True)

print('Accuracy Score for ku: {:4.2f}% '.format(100*metrics.accuracy_score(kd_p['class'].values, classifier.predict(kd_p.drop(columns=['class', 'weight']).values))))
print('Accuracy Score for hhsm triangle: {:4.2f}% '.format(100*metrics.accuracy_score(hhsm_t_p['class'].values, classifier.predict(hhsm_t_p.drop(columns=['class', 'weight']).values))))
print('Accuracy Score for hhsm interference: {:4.2f}% '.format(100*metrics.accuracy_score(hhsm_t_p['class'].values, classifier.predict(hhsm_t_p.drop(columns=['class', 'weight']).values))))
print('Accuracy Score for hhsm box: {:4.2f}% '.format(100*metrics.accuracy_score(hhsm_i_b['class'].values, classifier.predict(hhsm_i_b.drop(columns=['class', 'weight']).values))))
print('Accuracy Score for bbh+tth: {:4.2f}% '.format(100*metrics.accuracy_score(bbh_tth_p['class'].values, classifier.predict(bbh_tth_p.drop(columns=['class', 'weight']).values))))
print('Accuracy Score for bbxaa: {:4.2f}% '.format(100*metrics.accuracy_score(bbxaa_p['class'].values, classifier.predict(bbxaa_p.drop(columns=['class', 'weight']).values))))
df_array = [df_bbxaa_test, df_bbh_tth_test, df_hhsm_b_test, df_hhsm_i_test, df_hhsm_t_test, df_kd_test]
weight_array = [weight_bbxaa, weight_bbh_tth, weight_hhsm_b, weight_hhsm_i, weight_hhsm_t, weight_kd]
keys = ['kd', 'tri', 'int', 'box', 'tth+bbh', 'bbxaa']
filename = '../results/confusion/FCC-hh-BDT/hh-BDT-6class-kd.confusion.json'

df = build_confusion(df_array, weight_array, classifier, filename, keys)
df<jupyter_output><empty_output><jupyter_text>________________________ The kappa_u, kappa_d and kappa_lambda<jupyter_code>df_ku['class'] = 6
df_ku_test['class'] = 6
channels = [df_ku, df_kd, df_hhsm_t, df_hhsm_i, df_hhsm_b, df_bbh_tth, df_bbxaa]
df_train = pd.concat(channels, ignore_index=True)
df_train = df_train.sample(frac=1).reset_index(drop=True)
class_names = [r'$bb\gamma\gamma$', r'$Q\bar{Q}h$', r'$hh^{gg\rm F}_{\rm box}$', r'$hh^{gg\rm F}_{\rm int}$', r'$hh^{gg\rm F}_{\rm tri}$', r'$d \bar d hh$', r'$u \bar u hh$']
filename = '../results/models/FCC-hh-BDT/hh-BDT-7class-ku-kd.pickle.dat'
shap_plot = '../plots/FCC-hh-shap-bbxaa-bbh-tth-hhsm-ku-kd.pdf'

classifier, x_test, y_test, shap_values_7ud, X_shap_7ud = runBDT(df_train, filename, depth=10)
abs_shap(shap_values_7ud, X_shap_7ud, shap_plot, names=names, class_names=class_names, cmp=cmp_7)
ku_p = df_ku_test.sample(n=round(weight_ku), replace=True, random_state=seed).reset_index(drop=True)
kd_p = df_kd_test.sample(n=round(weight_kd), replace=True, random_state=seed).reset_index(drop=True)
hhsm_t_p = df_hhsm_t_test.sample(n=round(weight_hhsm_t), replace=True, random_state=seed).reset_index(drop=True)
hhsm_i_p = df_hhsm_i_test.sample(n=round(weight_hhsm_i), replace=True, random_state=seed).reset_index(drop=True)
hhsm_i_b = df_hhsm_b_test.sample(n=round(weight_hhsm_b), replace=True, random_state=seed).reset_index(drop=True)
bbh_tth_p = df_bbh_tth_test.sample(n=round(weight_bbh_tth), replace=True, random_state=seed).reset_index(drop=True)
bbxaa_p = df_bbxaa_test.sample(n=round(weight_bbxaa), replace=True, random_state=seed).reset_index(drop=True)

print('Accuracy Score for ku: {:4.2f}% '.format(100*metrics.accuracy_score(ku_p['class'].values, classifier.predict(ku_p.drop(columns=['class', 'weight']).values))))
print('Accuracy Score for kd: {:4.2f}% '.format(100*metrics.accuracy_score(kd_p['class'].values, classifier.predict(kd_p.drop(columns=['class', 'weight']).values))))
print('Accuracy Score for hhsm triangle: {:4.2f}% '.format(100*metrics.accuracy_score(hhsm_t_p['class'].values, classifier.predict(hhsm_t_p.drop(columns=['class', 'weight']).values))))
print('Accuracy Score for hhsm interference: {:4.2f}% '.format(100*metrics.accuracy_score(hhsm_t_p['class'].values, classifier.predict(hhsm_t_p.drop(columns=['class', 'weight']).values))))
print('Accuracy Score for hhsm box: {:4.2f}% '.format(100*metrics.accuracy_score(hhsm_i_b['class'].values, classifier.predict(hhsm_i_b.drop(columns=['class', 'weight']).values))))
print('Accuracy Score for bbh+tth: {:4.2f}% '.format(100*metrics.accuracy_score(bbh_tth_p['class'].values, classifier.predict(bbh_tth_p.drop(columns=['class', 'weight']).values))))
print('Accuracy Score for bbxaa: {:4.2f}% '.format(100*metrics.accuracy_score(bbxaa_p['class'].values, classifier.predict(bbxaa_p.drop(columns=['class', 'weight']).values))))
df_array = [df_bbxaa_test, df_bbh_tth_test, df_hhsm_b_test, df_hhsm_i_test, df_hhsm_t_test, df_kd_test, df_ku_test]
weight_array = [weight_bbxaa, weight_bbh_tth, weight_hhsm_b, weight_hhsm_i, weight_hhsm_t, weight_kd, weight_ku]
keys = ['<KEY>']
filename = '../results/confusion/FCC-hh-BDT/hh-BDT-7class-ku-kd.confusion.json'

df = build_confusion(df_array, weight_array, classifier, filename, keys)
df<jupyter_output><empty_output><jupyter_text>_____________________________ Standard Model di-Higgs<jupyter_code>channels = [df_hhsm, df_bbh_tth, df_bbxaa]
df_train = pd.concat(channels, ignore_index=True)
df_train = df_train.sample(frac=1).reset_index(drop=True)
class_names = [r'$bb\gamma\gamma$', r'$Q\bar{Q}h$', r'$hh^{gg\rm F}$']
filename = '../results/models/FCC-hh-BDT/hh-BDT-3class-hhsm-SM.pickle.dat'
shap_plot = '../plots/FCC-hh-shap-bbxaa-bbh-tth-hhsm-SM.pdf'

classifier, x_test, y_test, shap_values_3, X_shap_3 = runBDT(df_train, filename, depth=10)
abs_shap(shap_values_3, X_shap_3, shap_plot, names=names, class_names=class_names, cmp=cmp_5)
hhsm_p = df_hhsm_test.sample(n=round(weight_hhsm), replace=True, random_state=seed).reset_index(drop=True)
bbh_tth_p = df_bbh_tth_test.sample(n=round(weight_bbh_tth), replace=True, random_state=seed).reset_index(drop=True)
bbxaa_p = df_bbxaa_test.sample(n=round(weight_bbxaa), replace=True, random_state=seed).reset_index(drop=True)

print('Accuracy Score for hhsm: {:4.2f}% '.format(100*metrics.accuracy_score(hhsm_p['class'].values, classifier.predict(hhsm_p.drop(columns=['class', 'weight']).values))))
print('Accuracy Score for bbh+tth: {:4.2f}% '.format(100*metrics.accuracy_score(bbh_tth_p['class'].values, classifier.predict(bbh_tth_p.drop(columns=['class', 'weight']).values))))
print('Accuracy Score for bbxaa: {:4.2f}% '.format(100*metrics.accuracy_score(bbxaa_p['class'].values, classifier.predict(bbxaa_p.drop(columns=['class', 'weight']).values))))
df_array = [df_bbxaa_test, df_bbh_tth_test, df_hhsm_test]
weight_array = [weight_bbxaa, weight_bbh_tth, weight_hhsm]
keys = ['hhsm', 'tth+bbh', 'bbxaa']
filename = '../results/confusion/FCC-hh-BDT/hh-BDT-3class-hhsm-SM.confusion.json'

df = build_confusion(df_array, weight_array, classifier, filename, keys)
df<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.17646191283828627, 'fraction_numerical': 0.013789543543986432, 'mean_word_length': 9.368501529051988, 'pattern_counts': {'":': 0, '<': 22, '<?xml version=': 0, '>': 22, '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': '5', 'dir': 'jupyter-structured-clean-dedup', 'id': '439643', 'license': 'MIT', 'n_tokens_mistral': 5753, 'n_tokens_neox': 5564, 'n_words': 705, 'path': 'machine_learning/Mega-BDT-kappa-lambda-FCC-hh.ipynb', 'repo_name': 'talismanbrandi/IML-diHiggs', 'size': '13605'}