<jupyter_start><jupyter_text>Deephyper analytics - hyperparameter search study**path to data file**: {{path_to_data_file}}for customization please see: https://matplotlib.org/api/matplotlib_configuration_api.html Setup & Data loading<jupyter_code>path_to_data_file = {{path_to_data_file}}
import matplotlib
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
import seaborn as sns
from pprint import pprint
from datetime import datetime
from tqdm import tqdm
from IPython.display import display, Markdown

width = 21
height = width/1.618

matplotlib.rcParams.update({
    'font.size': 21,
    'figure.figsize': (width, height), 
    'figure.facecolor': 'white', 
    'savefig.dpi': 72, 
    'figure.subplot.bottom': 0.125, 
    'figure.edgecolor': 'white',
    'xtick.labelsize': 21,
    'ytick.labelsize': 21})

df = pd.read_csv(path_to_data_file)

display(Markdown(f'The search did _{df.count()[0]}_ **evaluations**.'))

df.head()<jupyter_output><empty_output><jupyter_text>Statistical summary<jupyter_code>df.describe()<jupyter_output><empty_output><jupyter_text>Search trajectory<jupyter_code>fig = plt.figure()
fig, ax = plt.subplots()
ax.plot(df.elapsed_sec, df.objective)
ax.set_ylabel('Objective')
ax.set_xlabel('Time (s.)')
ax.set_xlim(0)
ax.grid()
fig.show()<jupyter_output><empty_output><jupyter_text>Pairplots<jupyter_code>not_include = ['elapsed_sec']
sns.pairplot(df.loc[:, filter(lambda n: n not in not_include, df.columns)],
                diag_kind="kde", markers="o",
                plot_kws=dict(s=50, edgecolor="b", linewidth=1),
                diag_kws=dict(shade=True))
plt.show()
fig = plt.figure()
fig, ax = plt.subplots()
corr = df.loc[:, filter(lambda n: n not in not_include, df.columns)].corr()
sns.heatmap(corr, xticklabels=corr.columns, yticklabels=corr.columns, cmap=sns.diverging_palette(220, 10, as_cmap=True), ax=ax)
ax.set_yticklabels(corr.columns, va='center')
plt.show()<jupyter_output><empty_output><jupyter_text>Best objective<jupyter_code>i_max = df.objective.idxmax()
df.iloc[i_max]
dict(df.iloc[i_max])<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.14456106870229007, 'fraction_numerical': 0.013358778625954198, 'mean_word_length': 5.966777408637873, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 21, 'https://': 1, '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': '250319', 'license': 'BSD-3-Clause', 'n_tokens_mistral': 826, 'n_tokens_neox': 785, 'n_words': 140, 'path': 'deephyper/core/analytics/plot/stub/hps_analytics.ipynb', 'repo_name': 'SunHaozhe/deephyper', 'size': '2096'}