<jupyter_start><jupyter_text>make<jupyter_code>(ta, da) = simulate([32, 16])

ta.iloc[-8::2] = np.nan

kwat.function_heat_map.make(ta, da, fu, ac=None)
(ta, da) = simulate([16, 32])

da.iloc[:, 0] = np.nan

da.iloc[-8:, -8:] = np.nan

kwat.function_heat_map.make(ta, da, fu)
da = simulate([16, 8])[1]

for nu_ in [[1, 2, 2, 2, 2, 0, 0, 0], [1, 1, 2, 2, 2, 0, 0, 0]]:

    ta = pd.Series(nu_, index=da.columns)

    for ac in [None, True, False]:

        ta.name = "ac={}".format(ac)

        kwat.function_heat_map.make(
            ta, da, fu, ac=ac, tyt="categorical", n_sa=0, n_sh=0
        )
ta = pd.read_csv("data/function_heat_map_ta.tsv", sep="\t", index_col=0, squeeze=True)

da = pd.read_csv("data/function_heat_map_da.tsv", sep="\t", index_col=0)
for n_row in [1, 2, 3]:

    kwat.function_heat_map.make(
        da.iloc[0, :], da.iloc[:n_row, :], fu, n_sa=0, n_sh=0, st=3
    )
kwat.function_heat_map.make(ta, da, fu, n_jo=8, n_sa=10, n_sh=10, tyt="binary")
for shape in ([1, 8], [2, 8], [8, 8], [64, 8], [8, 2], [8, 4], [8, 256]):

    ta, da = simulate(shape)

    kwat.function_heat_map.make(ta, da, fu, n_pl=-1, n_sa=0, n_sh=0)<jupyter_output><empty_output><jupyter_text>summarize<jupyter_code>n_co = 16

ta, da = simulate([16, n_co])

da0n = simulate([8, n_co], 4)[1]

da01 = simulate([4, n_co], 2)[1]

da.drop(da.columns.values[-3], axis=1, inplace=True)

da0n.drop(da0n.columns.values[-2], axis=1, inplace=True)

da01.drop(da01.columns.values[-1], axis=1, inplace=True)

pa_da = [
    {"name": "Continuous", "data": da, "type": "continuous"},
    {"name": "Categorical", "data": da0n, "type": "categorical"},
    {"name": "Binary", "data": da01, "type": "binary"},
]

for ve in pa_da:

    ve["statistic"] = kwat.function_heat_map.make(ta, ve["data"], fu, pl=False)

for it in [False, True]:

    kwat.function_heat_map.summarize(ta, pa_da, it=it)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.21835443037974683, 'fraction_numerical': 0.051160337552742616, 'mean_word_length': 4.197260273972603, 'pattern_counts': {'":': 9, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '448035', 'license': 'MIT', 'n_tokens_mistral': 941, 'n_tokens_neox': 860, 'n_words': 177, 'path': 'nb/function_heat_map.ipynb', 'repo_name': 'KwatME/ccal', 'size': '1896'}