IRootLab
An Open-Source MATLAB toolbox for vibrational biospectroscopy
blmisc_classes_random.m
Go to the documentation of this file.
1 %> @brief Randomizes classes.
2 %>
3 %> Number of classes remains the same, but uniform distribution (same probability for each class), regardless of the
4 %> class prior distribution.
6  properties
7  classlabels_new;
8  end;
9 
10  methods
11  function o = blmisc_classes_random(o)
12  o.classtitle = 'Randomize';
13  o.flag_params = 0;
14  end;
15  end;
16 
17  methods(Access=protected)
18  function data = do_use(o, data)
19  data.classes = floor(rand(data.no, 1)*data.nc-.00000000001);
20  end;
21  end;
22 end
23 
function distribution(in x, in no_points, in range, in wid)
Randomizes classes.
Base class for blocks that change a dataset classes.
Definition: blmisc_classes.m:2