IRootLab
An Open-Source MATLAB toolbox for vibrational biospectroscopy
estlog Class Reference

Detailed Description

Estimation logs base class.

Records hits 3D matrix (:)(:)x(time)

Definition at line 4 of file estlog.m.

+ Inheritance diagram for estlog:
+ Collaboration diagram for estlog:

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...
 

Constructor & Destructor Documentation

function estlog::estlog ( )

Member Function Documentation

function ttlog::allocate ( in  o,
in  tt 
)
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() .

function estlog::do_allocate ( in  o,
in  tt 
)
protected
function irobj::do_get_html ( in  o)
protectedinherited

Abstract. HTML inner body.

function irobj::do_get_report ( in  o)
protectedinherited

Default report.

function estlog::do_record ( in  o,
in  pars 
)
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.

Parameters
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.
function irobj::extract_log ( in  o)
inherited
Parameters
o
Returns
[o, log]
function get estlog::flag_rejected ( in  o)
function irobj::get_ancestry ( in  o,
in  flag_title 
)
inherited
Parameters
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

Parameters
t=(all). Pre-selection of specific times
flag_perc1=0. Whether to calculate percentages already at each time instant
aggrTime-wise Aggregation:
  • 0 - none
  • 1 - Sum
  • 2 - time-wise Sum -> row-wise normalization (rows sum to 1, except if total sum is zero)
  • 3 - Mean
  • 4 - Standard Deviation
flag_discount_rejected=1. Whether to discount the rejected items from percentages. Only applicable if flag_perc is true
Returns
C
Note
Percentual outputs range from 0 to 100, not from 0 to 1
function estlog::get_C_supp ( in  o,
in  t,
in  aggr 
)

Gets the recorded supports.

  • Aggregation:
    • 0 - INVALID
    • 1 - INVALID
    • 2 - INVALID
    • 3 - Mean
    • 4 - Standard Deviation
  • 5 - Minimum

6 - Maximum

function estlog::get_collabels ( in  o)
protected

Abstract.

function estlog::get_confusion ( in  o,
in  t,
in  flag_perc,
in  aggr,
in  flag_discount_rejected 
)
See also
estlog::get_C()
function estlog::get_confusion_from_C ( in  o,
in  C,
in  flag_perc 
)
function estlog::get_confusion_sup ( in  o,
in  t,
in  aggr 
)
function irobj::get_description ( in  o,
in  flag_short 
)
inherited

Returns description string

Precedence according with flag_short:

  • 0: title > short > classtitle
  • 1: short > title > classtitle
Parameters
flag_short=0I 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.

function ttlog::get_format ( in  o)
inherited

Returns format for sprintf()

function irobj::get_html ( in  o,
in  flag_stylesheet 
)
inherited
Parameters
flag_stylesheet=1Whether to include the stylesheet in the HTML
function estlog::get_insane_html ( in  o,
in  pars 
)
Parameters
flag_individualWhether to print time snapshots as well.
function ttlog::get_legend ( in  o)
inherited

Returns the default "Rate" string. Note that the title property can be used.

function irobj::get_methodname ( in  o,
in  flag_short 
)
inherited

This is used only to compose sequence string e.g. xxx->yyy->zzz

Parameters
flag_short=0
function irobj::get_params ( in  o,
in  data 
)
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.

function irobj::get_report ( in  o)
inherited

Object reports are plain text. HTML would be cool but c'mon, we don't need that sophistication.

function estlog::get_rowlabels ( in  o)
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

Parameters
t=(1:o.t) Time vector to select only a few time instants
normtype= 0
  • 0 Non-zero weights are all ones
  • 1 Weights are normalized so the rows add to 1
  • 2 Weights are normalized so that the columns add to 1
Returns
A (no_rows)x(o.t) matrix of 0/w to be used as weights.
function estlog::record ( in  o,
in  pars 
)
function get estlog::rowlabels ( in  o)

Getter for rowlabels property, calls get_rowlabels() .

function irobj::setbatch ( in  o,
in  params 
)
inherited

Sets several properties of an object at once.

Parameters
o
paramsCell followint the pattern
{'property1', value1, 'property2', value2, ...} 

Member Data Documentation

Property irobj::classtitle
protectedinherited

Class Title. Should have a descriptive name, as short as possible.

Definition at line 50 of file irobj.m.

Property irobj::color
inherited

=[0, .8, 0]. multipurpose feature, routines may use it for different things. Major use is to change the background of objtool and blockmenu. See also classes_html.m

Definition at line 42 of file irobj.m.

Property ttlog::flag_allocated
protectedinherited

Whether allocate() has been called.

Definition at line 16 of file ttlog.m.

Property ttlog::flag_inc_t
inherited

=1. Whether to increment time whenever something is recorded

Definition at line 10 of file ttlog.m.

Property irobj::flag_params
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.

Definition at line 57 of file irobj.m.

Property estlog::flag_rejected

Whether there is a "refuse-to-decide" potential situation (usually the decider of the object that generated the estlog has a threshold > 0). It is automatically determined by verifying whether there is a non-zero element in the first column

Definition at line 26 of file estlog.m.

Property estlog::flag_sensspec
protected

Whether the class is able to produce the sensitivity and specificity figures.

Definition at line 35 of file estlog.m.

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.

Definition at line 19 of file estlog.m.

Property irobj::flag_ui
protectedinherited

(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).

Definition at line 60 of file irobj.m.

Property estlog::hits

3D matrix: (number of groups)x(number of classes in labels_cols + 1)x(time)

Definition at line 41 of file estlog.m.

Property irobj::moreactions
protectedinherited

(GUI setting) String cell containing names of methods that may be called from the GUIs

Definition at line 63 of file irobj.m.

Property ttlog::no_slots
protectedinherited

Number of allocated slots (call to allocate())

Definition at line 19 of file ttlog.m.

Property irobj::short
protectedinherited

Short for the method name.

Definition at line 53 of file irobj.m.

Property estlog::supports
protected

Same size as hits, but it is a cell of vectors.

Definition at line 32 of file estlog.m.

Property ttlog::t
inherited

"Time", incremented every time record() is called. Reset to zero if allocate() is called.

Definition at line 33 of file ttlog.m.

Property irobj::title
inherited

Definition at line 38 of file irobj.m.


The documentation for this class was generated from the following file: