<jupyter_start><jupyter_text>Tutorial 1: Built-in demonstration scripts MAVE-NN provides built-in demonstration scripts, or "demos", to help users quickly get started training and visualizing models. Demos are self-contained Python scripts that can be executed by calling `mavenn.run_demo`. To get a list of demo names, execute this function without passing any arguments:<jupyter_code># Import MAVE-NN
import mavenn

# Get list of demos
mavenn.run_demo()<jupyter_output>To run a demo, execute

	>>> mavenn.run_demo(name)

where 'name' is one of the following strings:

	1. "gb1_ge_evaluation"
	2. "mpsa_ge_training"
	3. "sortseq_mpa_visualization"

Python code for each demo is located in

	/Users/jkinney/github/mavenn/mavenn/examples/demos/<jupyter_text>To see the Python code for any one of these demos, pass the keyword argument `print_code=True` to `mavenn.run_demo()`. Alternatively, navigate to the folder that is printed when executing `mavenn.run_demo()` on your machine and open the corresponding `*.py` file.  Evaluating a GE regression model The `'gb1_ge_evaluation'` demo illustrates an additive G-P map and GE measurement process fit to data from a deep mutational scanning (DMS) experiment performed on protein GB1 by Olson et al., 2014.<jupyter_code>mavenn.run_demo('gb1_ge_evaluation', print_code=False)<jupyter_output>Running /Users/jkinney/github/mavenn/mavenn/examples/demos/gb1_ge_evaluation.py...
Using mavenn at: /Users/jkinney/github/mavenn/mavenn
Model loaded from these files:
	/Users/jkinney/github/mavenn/mavenn/examples/models/gb1_ge_additive.pickle
	/Users/jkinney/github/mavenn/mavenn/examples/models/gb1_ge_additive.h5<jupyter_text>Visualizing an MPA regression model The `'sortseq_mpa_visualization'` demo illustrates an additive G-P map, along with an MPA measurement process, fit to data from a sort-seq MPRA performed by Kinney et al., 2010.<jupyter_code>mavenn.run_demo('sortseq_mpa_visualization', print_code=False)<jupyter_output>Running /Users/jkinney/github/mavenn/mavenn/examples/demos/sortseq_mpa_visualization.py...
Using mavenn at: /Users/jkinney/github/mavenn/mavenn
Model loaded from these files:
	/Users/jkinney/github/mavenn/mavenn/examples/models/sortseq_full-wt_mpa_additive.pickle
	/Users/jkinney/github/mavenn/mavenn/examples/models/sortseq_full-wt_mpa_additive.h5<jupyter_text>Training a GE regression model The `'mpsa_ge_training'` demo uses GE regression to train a pairwise G-P map on data from a massively parallel splicing assay (MPSA) reported by Wong et al., 2018. This training process usually takes under a minute on a standard laptop.<jupyter_code>mavenn.run_demo('mpsa_ge_training', print_code=False)<jupyter_output>Running /Users/jkinney/github/mavenn/mavenn/examples/demos/mpsa_ge_training.py...
Using mavenn at: /Users/jkinney/github/mavenn/mavenn
N = 24,405 observations set as training data.
Using 19.9% for validation.
Data shuffled.
Time to set data: 0.208 sec.
 
LSMR            Least-squares solution of  Ax = b

The matrix A has 19540 rows and 36 columns
damp = 0.00000000000000e+00

atol = 1.00e-06                 conlim = 1.00e+08

btol = 1.00e-06             maxiter =       36

 
   itn      x(1)       norm r    norm Ar  compatible   LS      norm A   cond A
     0  0.00000e+00  1.391e+02  4.673e+03   1.0e+00  2.4e-01
     1  2.09956e-04  1.273e+02  2.143e+03   9.2e-01  2.1e-01  8.1e+01  1.0e+00
     2  4.17536e-03  1.263e+02  1.369e+03   9.1e-01  5.1e-02  2.1e+02  1.9e+00
     3  3.65731e-03  1.251e+02  5.501e+01   9.0e-01  1.6e-03  2.8e+02  2.6e+00
     4  3.27390e-03  1.251e+02  6.185e+00   9.0e-01  1.7e-04  2.9e+02  3.2e+00
     5  3.20902e-03  1.251e+02  3.988e-01   9.0e-01  1.1e-05  3.0[...]
{'fraction_non_alphanumeric': 0.09547057228098725, 'fraction_numerical': 0.0778410631950095, 'mean_word_length': 3.9370816599732263, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 16, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 1, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '4', 'dir': 'jupyter-structured-clean-dedup', 'id': '180411', 'license': 'MIT', 'n_tokens_mistral': 1566, 'n_tokens_neox': 1378, 'n_words': 365, 'path': 'docs/tutorials/1_demos.ipynb', 'repo_name': 'jbkinney/mave-nn', 'size': '3687'}