<jupyter_start><jupyter_text>Figure 2. Asymptote and growth parameter in each control parameter settings<jupyter_code>import pandas as pd
import numpy as np
import altair as alt
from helper import control_space_heatmap<jupyter_output><empty_output><jupyter_text>Import growth parameters from csv<jupyter_code>df = pd.read_csv('../../data/growth_params_1250.csv')
df["learning_rate"] = df.learning_rate.round(3)
# Calculate log growth for better distribution
df["growth"] = np.log(df.k + 1)
df.head()<jupyter_output><empty_output><jupyter_text>Create separate dataframes for words and nonwords<jupyter_code>df_growth_word = (
    df.loc[df.cond.isin(["HF_CON", "LF_CON", "HF_INC", "LF_INC"]),]
    .groupby(["hidden_units",  "p_noise", "learning_rate"])
    .mean()
    .reset_index()
)

df_growth_nonword = (
    df.loc[df.cond.isin(["NW_UN", "NW_AMB"]),]
    .groupby(["hidden_units", "p_noise", "learning_rate"])
    .mean()
    .reset_index()
)<jupyter_output><empty_output><jupyter_text>Word asymptote<jupyter_code>r1 = control_space_heatmap(
    df_growth_word,
    title="a. Word Asymptote",
    var="max_acc",
    color_scheme="redyellowgreen",
    domain=(0.6, 1),
    font_size=24,
    epsilon_label="Epsilon (panel column)"
)

r1<jupyter_output><empty_output><jupyter_text>Nonword asymptote<jupyter_code>r2 = control_space_heatmap(
    df_growth_nonword,
    title="b. Nonword Asymptote",
    var="max_acc",
    color_scheme="redyellowgreen",
    domain=(0.6, 1),
    font_size=24,
    epsilon_label="",
)

r2<jupyter_output><empty_output><jupyter_text>Word growth<jupyter_code>r3 = control_space_heatmap(
    df_growth_word,
    title="c. Word Growth",
    var="growth",
    color_scheme="redyellowblue",
    domain=(1, 4),
    font_size=24,
    epsilon_label="",
    hide_legend=False
)

r3<jupyter_output><empty_output><jupyter_text>Nonword growth<jupyter_code>r4 = control_space_heatmap(
    df_growth_nonword,
    title="d. Nonword Growth",
    var="growth",
    color_scheme="redyellowblue",
    domain=(1, 4),
    font_size=24,
    epsilon_label="",
)

r4<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.13506012950971322, 'fraction_numerical': 0.015263644773358002, 'mean_word_length': 4.589147286821706, 'pattern_counts': {'":': 0, '<': 29, '<?xml version=': 0, '>': 29, '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': '7', 'dir': 'jupyter-structured-clean-dedup', 'id': '218554', 'license': 'MIT', 'n_tokens_mistral': 864, 'n_tokens_neox': 805, 'n_words': 122, 'path': 'code/python/figure2.ipynb', 'repo_name': 'JasonLo/SSR_modeling_RD', 'size': '2162'}