![]() |
IRootLab
An Open-Source MATLAB toolbox for vibrational biospectroscopy
|
Cascade block: sequence of blocks represented by a block.
Cascade blocks can mimic the behaviour of linear transformation blocks (fcon_linear; such as PCA) if it contains one or more such blocks. It has all the properties that a fcon_linear block has, however its valid functioning will depend on the component blocks. The loadings matrix is calculated by multiplying the loadings matrix of successive component blocks.
Definition at line 14 of file block_cascade_base.m.
Public Member Functions | |
function | block_cascade_base () |
function get | no_blocks (in o) |
function get | L (in o) |
function get | L_fea_x (in o) |
function get | xname (in o) |
function get | xunit (in o) |
function get | yname (in o) |
function get | yunit (in o) |
function get | classlabels (in o) |
function get | v (in o) |
Retrieves v from last block. More... | |
function get | decisionthreshold (in o) |
Retrieves decisionthreshold from the decider that if finds. More... | |
function | extract_fcon_linear_fixed (in o) |
Extracts fcon_linear_fixed with same Loadings Matrix. More... | |
function | get_L_fea_x (in o) |
function | get_xname (in o) |
function | get_xunit (in o) |
Feature names: takes the xname property from the first linear block. More... | |
function | get_yname (in o) |
function | get_yunit (in o) |
function | get_methodname (in o, in flag_short) |
Calls get_methodname() for all blocks. More... | |
function | get_L_fea_names (in o, in idxs) |
function | get_loadings (in o) |
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 | boot (in o) |
Configures the structure to deal with new type of data. 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_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 | blocks |
Cell of block objects. More... | |
Property | flag_crossc |
Property | sgs_crossc |
SGS to do the cross-calculations when necessary. If needed and empty, a default one will be used. More... | |
Property | L |
Property | L_fea_names |
Loadings feature names. fcon_linear mimicking. More... | |
Property | L_fea_x |
Feature x-axis. fcon_linear mimicking. Retrieves the L_fea_x from the first block. More... | |
Property | xname |
x-axis name. fcon_linear mimicking. Retrieves the xname from the first block. More... | |
Property | xunit |
Property | yname |
Property | yunit |
Property | classlabels |
Class labels. clssr mimicking. Retrieves the classlabels property from the last block. More... | |
Property | v |
Feature indexes. fsel mimicking. Retrieves the v property from the last block. More... | |
Property | decisionthreshold |
Property | title |
Property | color |
Protected Member Functions | |
function | assert_checked (in o) |
BLock needs to keep up-to-date with contents. More... | |
function | do_check (in o) |
function | do_boot (in o) |
Boots every encapsulated block. More... | |
function | do_train (in o, in data) |
function | do_use (in o, in data) |
function | assert_fcon_linear (in o) |
Makes sure that the block can mimic a linear block. More... | |
function | get_linear1 (in o) |
Retrieves the first linear block. More... | |
function | do_get_report (in o) |
function | do_get_html (in o) |
Abstract. HTML inner body. More... | |
Protected Attributes | |
Property | no_blocks |
Number of blocks. More... | |
Property | flag_fcon_linear |
Whether the block is able to mimic a fcon_linear. This is calculated at boot time. More... | |
Property | flag_decider |
Whether the block is able to mimic a decider. This is calculated at boot time. More... | |
Property | idx_linear1 |
Index of first linear block. This is calculated at boot time. More... | |
Property | idx_decider |
Index of decider. This is calculated at boot time. More... | |
Property | flag_checked |
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 block_cascade_base::block_cascade_base | ( | ) |
|
protected |
BLock needs to keep up-to-date with contents.
|
protected |
Makes sure that the block can mimic a linear block.
|
inherited |
Configures the structure to deal with new type of data.
Booting accounts for clearing any recordings; model structure; stored data etc from the object so that it can be re-used anew.
function get block_cascade_base::classlabels | ( | in | o | ) |
Other getters call yet another function, I don't know exactly why. I won't do this here because this may be called many times.
function get block_cascade_base::decisionthreshold | ( | in | o | ) |
Retrieves decisionthreshold
from the decider that if finds.
|
protected |
Boots every encapsulated block.
|
protected |
|
protectedinherited |
Abstract. HTML inner body.
|
protected |
|
protected |
Trains every encapsulated block
|
protected |
output of (k-1)-th block is inputted into k-th block. Final output is the output of the end-th block.
Skips any blmisc_rowsout block (outlier remover)
function block_cascade_base::extract_fcon_linear_fixed | ( | in | o | ) |
Extracts fcon_linear_fixed with same Loadings Matrix.
|
inherited |
o |
|
inherited |
o | |
flag_title=1 |
|
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 |
function block_cascade_base::get_L_fea_names | ( | in | o, |
in | idxs | ||
) |
Mimicking a fcon_linear::get_L_fea_names()
Calls the get_L_fea_names from the first block that has this method (SEARCHING BACKWARDS)
function block_cascade_base::get_L_fea_x | ( | in | o | ) |
|
protected |
Retrieves the first linear block.
function block_cascade_base::get_loadings | ( | in | o | ) |
Cascades blocks' loadings matrices. Works only if one or all blocks provide one loadings matrix of course, i.e., they all represent linear transforms.
function block_cascade_base::get_methodname | ( | in | o, |
in | flag_short | ||
) |
Calls get_methodname() for all blocks.
flag_short=0 |
|
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.
function block_cascade_base::get_xname | ( | in | o | ) |
function block_cascade_base::get_xunit | ( | in | o | ) |
Feature names: takes the xname property from the first linear block.
function block_cascade_base::get_yname | ( | in | o | ) |
y-name: takes the yname property from the last block that has it
function block_cascade_base::get_yunit | ( | in | o | ) |
y-unit: takes the yunit property from the last block that has it
function get block_cascade_base::L | ( | in | o | ) |
function get block_cascade_base::L_fea_x | ( | in | o | ) |
function get block_cascade_base::no_blocks | ( | in | o | ) |
|
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.
function get block_cascade_base::v | ( | in | o | ) |
Retrieves v
from last block.
function get block_cascade_base::xname | ( | in | o | ) |
function get block_cascade_base::xunit | ( | in | o | ) |
function get block_cascade_base::yname | ( | in | o | ) |
function get block_cascade_base::yunit | ( | in | o | ) |
Property block_cascade_base::blocks |
Cell of block
objects.
Definition at line 20 of file block_cascade_base.m.
Property block_cascade_base::classlabels |
Class labels. clssr mimicking. Retrieves the classlabels
property from the last block.
Definition at line 57 of file block_cascade_base.m.
|
protectedinherited |
|
inherited |
Property block_cascade_base::decisionthreshold |
Decision threshold. decider mimicking. Retriever the decisionthreshold
property from some decider it finds along the blocks
Definition at line 64 of file block_cascade_base.m.
|
protectedinherited |
|
protectedinherited |
|
protected |
Definition at line 84 of file block_cascade_base.m.
Property block_cascade_base::flag_crossc |
=1. Whether to cross-calculate outputs when it is the case. The case is: in training; and the component block is level 1 (trainable); and the component block is not the last block. If flag_crossc
is false, the same dataset will be used to train and to calculate the block output.
Definition at line 25 of file block_cascade_base.m.
|
protected |
Whether the block is able to mimic a decider. This is calculated at boot time.
Definition at line 75 of file block_cascade_base.m.
|
protected |
Whether the block is able to mimic a fcon_linear. This is calculated at boot time.
Definition at line 72 of file block_cascade_base.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.
|
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 |
|
protected |
Index of decider. This is calculated at boot time.
Definition at line 81 of file block_cascade_base.m.
|
protected |
Index of first linear block. This is calculated at boot time.
Definition at line 78 of file block_cascade_base.m.
|
protectedinherited |
Property block_cascade_base::L |
Loadings matrix. fcon_linear mimicking. Calculates loadings matrix by multiplying (L = block1.L*block2.L*...
).
Definition at line 37 of file block_cascade_base.m.
Property block_cascade_base::L_fea_names |
Loadings feature names. fcon_linear mimicking.
Definition at line 42 of file block_cascade_base.m.
Property block_cascade_base::L_fea_x |
Feature x-axis. fcon_linear mimicking. Retrieves the L_fea_x
from the first block.
Definition at line 45 of file block_cascade_base.m.
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protected |
Number of blocks.
Definition at line 69 of file block_cascade_base.m.
Property block_cascade_base::sgs_crossc |
SGS to do the cross-calculations when necessary. If needed and empty, a default one will be used.
Definition at line 28 of file block_cascade_base.m.
|
protectedinherited |
|
protectedinherited |
Property block_cascade_base::v |
Feature indexes. fsel mimicking. Retrieves the v
property from the last block.
Definition at line 60 of file block_cascade_base.m.
Property block_cascade_base::xname |
x-axis name. fcon_linear mimicking. Retrieves the xname
from the first block.
Definition at line 48 of file block_cascade_base.m.
Property block_cascade_base::xunit |
Definition at line 50 of file block_cascade_base.m.
Property block_cascade_base::yname |
Definition at line 52 of file block_cascade_base.m.
Property block_cascade_base::yunit |
Definition at line 54 of file block_cascade_base.m.