# Neural network module

From Spinach Documentation Wiki

*DEERNet* is a collection of functions that make and use deep neural networks for processing DEER data. The approach is described in detail in (https://dx.doi.org/10.1126/sciadv.aat5218). The reasons why it works so well are analysed in (https://arxiv.org/abs/1912.01498).

## Using DEERNet

Import your data with elexsys2deernet.m and feed it into deernet.m - examples are provided in examples/deernet directory. You will get outputs that look like the following:

## Functions - DEERNet

- deer_lib_gen.m
- Generates a library of simulated DEER data for use in neural network training and validation.
- deernet.m
- Uses an ensemble of neural networks to extract distance distributions from DEER data.
- dist_range.m
- Distance range estimation for a given time grid.
- elexsys2deernet.m
- Prepares standard Bruker Elexsys datasets for input into the deernet.m function.
- process_using.m
- Runs DEER data processing using a specified neural network file.
- train_one_net.m
- Trains a single neural network using supplied parameters.

## Functions - descrambling

- descramble.m
- Weight matrix descrambling using Tikhonov smoothness criterion.
- left_diag.m
- Weight matrix descrambling using maximum diagonality criterion.

## Service functions

- dist_net.m
- Returns an untrained distance distribution DEERNet for processing fully sampled data.
- dist_vet.m
- Returns an untrained distance distribution DEERNet for processing sparsely sampled data.
- quality_control.m
- Internal heuristics designed to catch malformed inputs.
- signal_model.m
- DEER signal model used for DEERNet and DEERVet backcalculations.

*Version 2.6, authors: Ilya Kuprov, Steve Worswick, Jake Amey, Jake Keeley, Tajwar Choudhury*