<jupyter_start><jupyter_text>******* Violin plot, Box plot and Histogram for Ligandnet2 ********<jupyter_code>import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
from cycler import cycler
%config InlineBackend.figure_format = 'svg'
%matplotlib inline 
# Load report file
df = pd.read_csv('Report.csv')
df.head(2)
best_models = ['rf', 'xgb', 'svc', 'mlp']
metrics = ['Accuracy','F1_Score', 'Cohen_Kappa', 'MCC']
for i in metrics:
    score = []
    for j in best_models:
        ndf = df[df['best_model']==j]
        header = j+'_'+i.lower()
        _list = list(ndf[header])
        score.append(_list)
    models = ['RF', 'XGB', 'SVC', 'ANN']
    ax = sns.violinplot(data= (score), palette="muted",scale='width')
    ax.set_xlabel('Models')
    if i == 'f1_score' or 'cohen_kappa':
        i = i.split('_')
        i = ' '.join(i)
    ax.set_ylabel(i)
    ax.set_xticklabels(models)
    plt.rc('xtick', labelsize = 16 )
    plt.rc('ytick', labelsize = 16)
    plt.rcParams["axes.labelsize"] = 16
    plt.tight_layout()
    #     plt.show()
    plt.savefig(i,dpi=600)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.1704745166959578, 'fraction_numerical': 0.011423550087873463, 'mean_word_length': 3.611336032388664, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '365815', 'license': 'MIT', 'n_tokens_mistral': 447, 'n_tokens_neox': 432, 'n_words': 97, 'path': 'analysis/violin_box_histogram_plots.ipynb', 'repo_name': 'hassanmohsin/ligandnet2', 'size': '1138'}