<jupyter_start><jupyter_text>Signal Lnfit<jupyter_code>plots.text_lnfit_links(run)
all_lnfit_names = LNFitResult.task_names(run)
lnfit = run[all_lnfit_names[0]]
all_lnfit_dfs = [lnfit.lnfit_bestseq_df(name) for name in all_lnfit_names]
for name,df in zip(all_lnfit_names,all_lnfit_dfs):
    seqs = df.drop_duplicates(subset=['best_seq']) # look at unique seqs
    md( f"## Top 20 sequences for {name}")
    display(seqs[['best_seq','channel_i','best_seq_count']].head(20))
channel  = 0
sequence = '2111000000'  # replace with your sequence of interest
lnfit_name = None        # Set this to the name of your lnfit, otherwise all lnfits are used together.
#lnfit_name = 'lnfit_647_threshold4000'
plots.plot_signal_for_lnfit_sequence( run, channel, sequence,  lnfit_taskname=lnfit_name )<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.10797546012269939, 'fraction_numerical': 0.02822085889570552, 'mean_word_length': 6.846153846153846, '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': '553333', 'license': 'MIT', 'n_tokens_mistral': 325, 'n_tokens_neox': 304, 'n_words': 64, 'path': 'plaster/gen/nb_templates/lnfit_template.ipynb', 'repo_name': 'pymc-labs/plaster', 'size': '815'}