![]() |
IRootLab
An Open-Source MATLAB toolbox for vibrational biospectroscopy
|
Neural Network Classifier. This is a wrapper to MATLAB's Neural Networks Toolbox.
Check MATLAB's NN toolbox documentation on net.trainParam
This is by default tuned to finished trained mostly when the net overfits:
Input weights are initialized to 'midpoint', and layer weights are initialized to zero. This way, the classifier will be deterministic (the default MATLAB "initnw" sounds nice but has randomness in it)
Definition at line 14 of file clssr_ann.m.
Public Member Functions | |
function | clssr_ann (in o) |
function get | no_outputs (in o) |
function | boot (in o) |
Resets classlabels and calls clssr::boot() More... | |
function | get_classes (in o, in data) |
function | draw_domain (in o, in parameters) |
function | get_grades (in o, in params) |
Abstract. Method to get the per-feature grades. BMTool stuff. More... | |
function | get_gradeslegend (in o, in params) |
Abstract. Method to get block title based on passed parameters. BMTool stuff. More... | |
function | use (in o, in data) |
Applies block to data. More... | |
function | train (in o, in data, in varargin) |
Trains block. More... | |
function | get_description (in o, in flag_short) |
function | setbatch (in o, in params) |
Sets several properties of an object at once. More... | |
function | get_methodname (in o, in flag_short) |
function | get_report (in o) |
Object reports are plain text. HTML would be cool but c'mon, we don't need that sophistication. More... | |
function | get_html (in o, in flag_stylesheet) |
function | get_params (in o, in data) |
Calls Parameters GUI. More... | |
function | extract_log (in o) |
function | get_ancestry (in o, in flag_title) |
Public Attributes | |
Property | flag_class2mo |
whether classes must be converter into multiple-output boolean targets. More... | |
Property | hiddens |
= [1]. Number of neurons in each hidden layer. More... | |
Property | goal |
Property | epochs |
= 1000 More... | |
Property | show |
= 10. More... | |
Property | lr |
= 0.05. More... | |
Property | max_fail |
= 15 Maximum number of validation increases More... | |
Property | flag_show_window |
=0. More... | |
Property | flag_weighted |
Whether to weight the observations (for unbalanced classes) More... | |
Property | min_grad |
=1e-5. Minimum gradient. More... | |
Property | flag_datay |
Property | title |
Property | color |
Protected Member Functions | |
function | do_boot (in o) |
function | do_train (in o, in data) |
function | do_use (in o, in data) |
function | get_no_outputs (in o) |
function | do_draw_domain (in o, in params) |
function | do_get_report (in o) |
Default report. More... | |
function | do_get_html (in o) |
Abstract. HTML inner body. More... | |
Protected Attributes | |
Property | net |
Property | classlabels |
Property | no_outputs |
Property | inputclass |
Property | flag_bootable |
=0. (High-Level setting and internal function) Whether or not the block is bootable. More... | |
Property | flag_trainable |
=0. (High-Level + internal function). Whether or not the block can be trained, or completely non-data-based. More... | |
Property | flag_incrtrain |
Property | flag_fixednf |
=1. (internal function) If true, dataset number of features will be checked upon training and using. Ignored if o.flag_trainable is 0. More... | |
Property | flag_fixedno |
=0. (internal function) If true, dataset number of observations will be checked upon training and using. Ignored if o.flag_trainable is 0. More... | |
Property | flag_multiin |
=0. (High-Level setting (gencode)) Whether block allows/expects multiple objects as input. More... | |
Property | flag_out |
=1. (High-Level setting (gencode)) Whether the block generates any output at all (counterexample: vis blocks) More... | |
Property | flag_train_inliers_only |
Property | flag_train_require_inliers |
Property | nf |
=-1. Number of features. Cleared at boot(), assigned or reinforced at train(). More... | |
Property | no |
=-1. Number of observations. More... | |
Property | flag_trained |
=0. Set to 1 by train() if training is successful; set back to 0 after booting. More... | |
Property | flag_booted |
=0. Set to 1 by boot() after booting the block More... | |
Property | time_train |
Trainings time. More... | |
Property | time_use |
Use time. More... | |
Property | classtitle |
Class Title. Should have a descriptive name, as short as possible. More... | |
Property | short |
Short for the method name. More... | |
Property | flag_params |
Property | flag_ui |
(GUI setting) Whether to "publish" in blockmenu and datatool. Note that a class can be "published" without a GUI (set flag_params=0 in this case, at the class constructor). More... | |
Property | moreactions |
(GUI setting) String cell containing names of methods that may be called from the GUIs More... | |
function clssr_ann::clssr_ann | ( | in | o | ) |
|
inherited |
Resets classlabels and calls clssr::boot()
|
protected |
|
protectedinherited |
|
protectedinherited |
Abstract. HTML inner body.
|
protectedinherited |
Default report.
|
protected |
|
protected |
|
inherited |
|
inherited |
o |
|
inherited |
o | |
flag_title=1 |
|
inherited |
|
inherited |
Returns description string
Precedence according with flag_short:
flag_short=0 | I am sealing this to make sure that no class will try to improvise on this function. |
|
inherited |
Abstract. Method to get the per-feature grades. BMTool stuff.
|
inherited |
Abstract. Method to get block title based on passed parameters. BMTool stuff.
|
inherited |
flag_stylesheet=1 | Whether to include the stylesheet in the HTML |
|
inherited |
This is used only to compose sequence string e.g. xxx->yyy->zzz
flag_short=0 |
|
protectedinherited |
|
inherited |
Calls Parameters GUI.
If flag_params
, tries uip_<class>.m. If fails, tries uip_<ancestor>.m and so on
|
inherited |
Object reports are plain text. HTML would be cool but c'mon, we don't need that sophistication.
|
inherited |
|
inherited |
Sets several properties of an object at once.
o | |
params | Cell followint the pattern{'property1', value1, 'property2', value2, ...} |
|
inherited |
Trains block.
|
inherited |
Applies block to data.
|
protectedinherited |
|
inherited |
Property clssr_ann::epochs |
= 1000
Definition at line 33 of file clssr_ann.m.
|
protectedinherited |
|
protectedinherited |
Property clssr_ann::flag_class2mo |
whether classes must be converter into multiple-output boolean targets.
Definition at line 20 of file clssr_ann.m.
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
=0. (internal function). Whether or not the block accepts incremental training. The meaning is:
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
=1. (GUI setting) Whether to call a GUI when the block is selected in blockmenu.m . If true, a routine called "uip_"<class name> will be called.
Property clssr_ann::flag_show_window |
=0.
Definition at line 45 of file clssr_ann.m.
|
protectedinherited |
If true, train() will pass on to do_train() a dataset with inliers only. If this flag is true, flag_train_require_inliers will be ignored, because flag_train_inliers_only being true is one way to solve the "inliers requirement".
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
Property clssr_ann::flag_weighted |
Whether to weight the observations (for unbalanced classes)
Definition at line 48 of file clssr_ann.m.
Property clssr_ann::goal |
=0. Stands for the goal MSE (Mean Squared Error). Training stops when achieving this error. We don't know what to expect, so it is fair to expect 0 error (100 classification).
Definition at line 30 of file clssr_ann.m.
Property clssr_ann::hiddens |
= [1]. Number of neurons in each hidden layer.
Definition at line 23 of file clssr_ann.m.
|
protectedinherited |
Property clssr_ann::lr |
= 0.05.
Definition at line 39 of file clssr_ann.m.
Property clssr_ann::max_fail |
= 15 Maximum number of validation increases
Definition at line 42 of file clssr_ann.m.
Property clssr_ann::min_grad |
=1e-5. Minimum gradient.
Definition at line 51 of file clssr_ann.m.
|
protectedinherited |
|
protected |
Definition at line 56 of file clssr_ann.m.
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
Property clssr_ann::show |
= 10.
Definition at line 36 of file clssr_ann.m.
|
protectedinherited |