IRootLab
An Open-Source MATLAB toolbox for vibrational biospectroscopy
estimato.m
Go to the documentation of this file.
1 %> @brief Dataset representing estimation
2 %>
3 %> These datasets are outputted by a classifier, clssr::use() method
4 classdef estimato < irdata
5  methods
6  function o = estimato(o)
7  o.classtitle = 'Estimation';
8  end;
9 
10  %> This function expects @c X to represent supports for each class. With the new class labels, it will expand
11  %> and reorganize X, with the supports the previously non-existing classes being 0, obviously.
12  function o = change_classlabels(o, clnew)
13  idxnew = renumber_classes(0:o.nc-1, o.classlabels, clnew)+1;
14  X = zeros(o.no, numel(clnew));
15  X(:, idxnew) = o.X;
16  o.X = X;
17  o.fea_x = 1:numel(clnew);
18  o.classlabels = clnew;
19  end;
20 
21  %> Copies relevant properties from dataset
22  function o = copy_from_data(o, data)
23  o.groupcodes = data.groupcodes;
24  o.groupnumbers = data.groupnumbers;
25  end;
26  end;
27 end
Dataset class.
Definition: irdata.m:30
function use(in o, in data)
Applies block to data.
Dataset representing estimation.
Definition: estimato.m:4
function renumber_classes(in classes_orig, in classlabels_orig, in classlabels_ref)