Difference between revisions of "Neural network module"

From Spinach Documentation Wiki
Jump to: navigation, search
(created section)
(created section)
Line 36: Line 36:
 
    parameters, described [[netset_params.m|here]].
 
    parameters, described [[netset_params.m|here]].
  
−
==Training set parameters structure==
+
==Training parameters structure==
 +
All fields required in the "parameters" structure used throughout the neural network module are listed below.
 +
 
 +
'''Training set parameters:'''
 +
 
 +
  parameters.min_dist    - lower limit of distance distributions,
 +
                            Angstrom
 +
 +
  parameters.max_dist    - upper limit of distance distributions,
 +
                            Angstrom
 +
 +
  parameters.max_time    - DEER trace duration, seconds
 +
 +
  parameters.max_exch    - maximum exchange coupling, MHz
 +
                          (NMR convention)
 +
 +
  parameters.min_exch    - minimum exchange coupling, MHz
 +
                          (NMR convention)
 +
 +
  parameters.ntraces    - number of traces you wish to generate
 +
 +
  parameters.ndistmax    - maximum number of skewed gaussians
 +
                            in the distance distribution
 +
 +
  parameters.npoints    - number of digitisation points in the
 +
                            DEER trace and the distance distribu-
 +
                            tion
 +
 +
  parameters.noise_lvl  - RMS noise level as a fraction of the
 +
                            modulation depth
 +
 +
  parameters.min_fwhm    - minimum FWHM for a skewed gaussian in
 +
                            the distance distribution, fraction of
 +
                            distance
 +
 
 +
  parameters.max_fwhm    - maximum FWHM for a skewed gaussian in
 +
                            the distance distribution, fraction of
 +
                            distance
 +
 
 +
  parameters.min_skew    - minimum shape parameter for a skewed
 +
                            gaussian in the distance distribution
 +
 +
  parameters.max_skew    - maximum shape parameter for a skewed
 +
                            gaussian in the distance distribution
 +
 
 +
  parameters.max_mdep    - minimum DEER modulation depth
 +
 +
  parameters.min_mdep    - maximum DEER modulation depth
 +
 +
  parameters.max_brate  - maximum background signal decay
 +
                            rate, s^-1
 +
 
 +
  parameters.min_brate  - minimum background signal decay
 +
                            rate, s^-1
 +
 
 +
  parameters.min_bdim    - minimum background dimensionality
 +
 
 +
  parameters.max_bdim    - maximum background dimensionality
 +
 
 +
'''Network design parameters:'''
 +
 
 +
  parameters.layer_sizes - number of neurons per layer, expected
 +
    as a horizontal vector where the number
 +
    of elements is the number of layers
 +
    desired.
 +
 +
  parameters.lastlayer  - activation function to use in the
 +
    neural network output layer.
 +
 +
  parameters.method      - neural network training algorithm
 +
    selection.

Revision as of 16:01, 19 July 2018

New in the forthcoming version 2.2: docs being written...

Functions

deer_lib_gen.m
Generates a library of distance distributions and corresponding simulated DEER traces for use in neural network training and validation.
deer_resample.m
Resample DEER trace to fit the number of digitsation points expected by the neural network.
deernet.m
Uses a curated ensemble of neural networks to extract a distance distribution from primary DEER data.
elexsys2deernet.m
Prepares experimental data - saved in the Bruker Elexsys format - for input into the deernet.m function.
netset_curate.m
Evaluates an ensemble of neural networks and decides which ones are best.
process_using.m
Runs the DEER data processing using a specified neural network file.
train_one_net.m
Constructs a network object, generates a training library (see deer_lib_gen.m), and runs the network training - following supplied parameters.

Netset folder structure

All in-built functions assume a standardised directory structure for the ensemble. The trained neural networks must be saved as individual *.mat files, numbered 1 to n:

	1.mat
	2.mat
	  .
	  . 
	n.mat

The directory must also contain the two supporting files:

	good_nets.mat   - 1 x m cell array (where m < n). The cells 
			  contain character arrays holding the names
			  of the networks selected by the curation
			  process (See: netset_curate.m).
	netset_params.m - function containing the netset training
			  parameters, described here.

Training parameters structure

All fields required in the "parameters" structure used throughout the neural network module are listed below.

Training set parameters:

  parameters.min_dist    - lower limit of distance distributions, 
                           Angstrom

  parameters.max_dist    - upper limit of distance distributions, 
                           Angstrom

  parameters.max_time    - DEER trace duration, seconds

  parameters.max_exch    - maximum exchange coupling, MHz
                          (NMR convention)

  parameters.min_exch    - minimum exchange coupling, MHz
                          (NMR convention)

  parameters.ntraces     - number of traces you wish to generate

  parameters.ndistmax    - maximum number of skewed gaussians 
                           in the distance distribution

  parameters.npoints     - number of digitisation points in the
                           DEER trace and the distance distribu-
                           tion

  parameters.noise_lvl   - RMS noise level as a fraction of the
                           modulation depth

  parameters.min_fwhm    - minimum FWHM for a skewed gaussian in
                           the distance distribution, fraction of
                           distance
 
  parameters.max_fwhm    - maximum FWHM for a skewed gaussian in
                           the distance distribution, fraction of
                           distance
 
  parameters.min_skew    - minimum shape parameter for a skewed 
                           gaussian in the distance distribution

  parameters.max_skew    - maximum shape parameter for a skewed 
                           gaussian in the distance distribution
  
  parameters.max_mdep    - minimum DEER modulation depth

  parameters.min_mdep    - maximum DEER modulation depth

  parameters.max_brate   - maximum background signal decay
                           rate, s^-1
 
  parameters.min_brate   - minimum background signal decay 
                           rate, s^-1
 
  parameters.min_bdim    - minimum background dimensionality
 
  parameters.max_bdim    - maximum background dimensionality

Network design parameters:

  parameters.layer_sizes - number of neurons per layer, expected
			    as a horizontal vector where the number
			    of elements is the number of layers
			    desired.

  parameters.lastlayer   - activation function to use in the 
			    neural network output layer. 

  parameters.method      - neural network training algorithm 
			    selection.