![]() |
IRootLab
An Open-Source MATLAB toolbox for vibrational biospectroscopy
|
Estimation logs base class.
Records hits 3D matrix (:)(:)x(time)
Public Member Functions | |
function get | flag_rejected (in o) |
function | estlog () |
function get | collabels (in o) |
Getter for collabels property, calls get_collabels() . More... | |
function get | rowlabels (in o) |
Getter for rowlabels property, calls get_rowlabels() . More... | |
function | record (in o, in pars) |
function | get_weights (in o, in t, in normtype) |
Calculates 0/w weights for (row)x(time) More... | |
function | get_C (in o, in t, in flag_perc, in aggr, in flag_discount_rejected) |
Flexible function to return a calculation over the "hits" matrix (or parts thereof) More... | |
function | get_C_supp (in o, in t, in aggr) |
Gets the recorded supports. More... | |
function | get_confusion_from_C (in o, in C, in flag_perc) |
function | get_confusion_sup (in o, in t, in aggr) |
function | get_confusion (in o, in t, in flag_perc, in aggr, in flag_discount_rejected) |
function | get_insane_html (in o, in pars) |
function | extract_datasets (in o) |
function | extract_datasets_sup (in o, in ij) |
function | get_rate (in o) |
Abstract. Classification rate, accuracy, performance or whatever. More... | |
function | get_rates (in o) |
Abstract. Classification rate vector calculated time-wise. More... | |
function | extract_confusion (in o) |
function | get_flag_perc (in o) |
Whether the values returned by get_rate() and get_rates() are percentages or not. Returns TRUE. More... | |
function | get_unit (in o) |
function | allocate (in o, in tt) |
Called to pre-allocate matrices after classlabels and rowlabels are set. More... | |
function | get_legend (in o) |
Returns the default "Rate" string. Note that the title property can be used. More... | |
function | get_format (in o) |
Returns format for sprintf() 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_support |
Property | flag_rejected |
Property | hits |
3D matrix: (number of groups)x(number of classes in labels_cols + 1)x(time) More... | |
Property | flag_inc_t |
=1. Whether to increment time whenever something is recorded More... | |
Property | t |
"Time", incremented every time record() is called. Reset to zero if allocate() is called. More... | |
Property | title |
Property | color |
Protected Member Functions | |
function | do_record (in o, in pars) |
Abstract. More... | |
function | get_collabels (in o) |
Abstract. More... | |
function | get_rowlabels (in o) |
Abstract. More... | |
function | do_allocate (in o, in tt) |
function | do_get_report (in o) |
Default report. More... | |
function | do_get_html (in o) |
Abstract. HTML inner body. More... | |
Protected Attributes | |
Property | supports |
Same size as hits, but it is a cell of vectors. More... | |
Property | flag_sensspec |
Whether the class is able to produce the sensitivity and specificity figures. More... | |
Property | flag_allocated |
Whether allocate() has been called. More... | |
Property | no_slots |
Number of allocated slots (call to allocate()) 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 estlog::estlog | ( | ) |
|
inherited |
Called to pre-allocate matrices after classlabels
and rowlabels
are set.
function get estlog::collabels | ( | in | o | ) |
Getter for collabels
property, calls get_collabels()
.
|
protected |
|
protectedinherited |
Abstract. HTML inner body.
|
protectedinherited |
Default report.
|
protected |
Abstract.
function estlog::extract_confusion | ( | in | o | ) |
function estlog::extract_datasets | ( | in | o | ) |
Generates one dataset per row containing percentages. The i-th dataset, j-th feature corresponds to the classification rates of consufion cell (i, j) (rejected included)
function estlog::extract_datasets_sup | ( | in | o, |
in | ij | ||
) |
Each cell needs be a different dataset because number of supports (therefore dataset's no
) is different for each cell.
ij | (number of datasets)x(2) containing coordinates from the confusion matrix to extract supports from. Please note that j=1 is the "rejected" column, not the first colummn class. |
|
inherited |
o |
function get estlog::flag_rejected | ( | in | o | ) |
|
inherited |
o | |
flag_title=1 |
function estlog::get_C | ( | in | o, |
in | t, | ||
in | flag_perc, | ||
in | aggr, | ||
in | flag_discount_rejected | ||
) |
Flexible function to return a calculation over the "hits" matrix (or parts thereof)
Example: get_C([], 1, 2, 1)
Gets average percentage with discounted rejected items
t | =(all). Pre-selection of specific times |
flag_perc1 | =0. Whether to calculate percentages already at each time instant |
aggr | Time-wise Aggregation:
|
flag_discount_rejected | =1. Whether to discount the rejected items from percentages. Only applicable if flag_perc is true |
function estlog::get_C_supp | ( | in | o, |
in | t, | ||
in | aggr | ||
) |
Gets the recorded supports.
0
- INVALID 1
- INVALID 2
- INVALID 3
- Mean 4
- Standard Deviation5
- Minimum6
- Maximum
|
protected |
Abstract.
function estlog::get_confusion | ( | in | o, |
in | t, | ||
in | flag_perc, | ||
in | aggr, | ||
in | flag_discount_rejected | ||
) |
function estlog::get_confusion_from_C | ( | in | o, |
in | C, | ||
in | flag_perc | ||
) |
function estlog::get_confusion_sup | ( | in | o, |
in | t, | ||
in | aggr | ||
) |
|
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. |
function estlog::get_flag_perc | ( | in | o | ) |
Whether the values returned by get_rate() and get_rates() are percentages or not. Returns TRUE.
|
inherited |
Returns format for sprintf()
|
inherited |
flag_stylesheet=1 | Whether to include the stylesheet in the HTML |
function estlog::get_insane_html | ( | in | o, |
in | pars | ||
) |
flag_individual | Whether to print time snapshots as well. |
|
inherited |
Returns the default "Rate" string. Note that the title
property can be used.
|
inherited |
This is used only to compose sequence string e.g. xxx->yyy->zzz
flag_short=0 |
|
inherited |
Calls Parameters GUI.
If flag_params
, tries uip_<class>.m. If fails, tries uip_<ancestor>.m and so on
function estlog::get_rate | ( | in | o | ) |
Abstract. Classification rate, accuracy, performance or whatever.
function estlog::get_rates | ( | in | o | ) |
Abstract. Classification rate vector calculated time-wise.
|
inherited |
Object reports are plain text. HTML would be cool but c'mon, we don't need that sophistication.
|
protected |
Abstract.
function estlog::get_unit | ( | in | o | ) |
function estlog::get_weights | ( | in | o, |
in | t, | ||
in | normtype | ||
) |
Calculates 0/w weights for (row)x(time)
0 < w < 1
t | =(1:o.t) Time vector to select only a few time instants |
normtype | = 0
|
function estlog::record | ( | in | o, |
in | pars | ||
) |
function get estlog::rowlabels | ( | in | o | ) |
Getter for rowlabels
property, calls get_rowlabels()
.
|
inherited |
Sets several properties of an object at once.
o | |
params | Cell followint the pattern{'property1', value1, 'property2', value2, ...} |
|
protectedinherited |
|
inherited |
|
protectedinherited |
Whether allocate()
has been called.
|
inherited |
|
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 estlog::flag_rejected |
|
protected |
Property estlog::flag_support |
=0. Whether or not to record the "supports" (confidence levels issued by classifiers). The default behaviour is to only count the hits for each "time" instant. Recording all the individual supports can generate a lot of data, but will allow one to plot the distribution of supports later.
|
protectedinherited |
Property estlog::hits |
|
protectedinherited |
|
protectedinherited |
Number of allocated slots (call to allocate())
|
protectedinherited |
|
protected |
|
inherited |
"Time", incremented every time record()
is called. Reset to zero if allocate()
is called.