IRootLab
An Open-Source MATLAB toolbox for vibrational biospectroscopy
blmisc_rowsout_hist.m
Go to the documentation of this file.
1 %> @brief Outlier removal by Histogram
2 %> @sa uip_blmisc_rowsout_hist.m
4  methods
5  function o = blmisc_rowsout_hist(o)
6  o.classtitle = 'Histogram';
7  end;
8  end;
9 
10  methods
11  function o = calculate_ranges(o, data)
12  o.ranges = [];
13  o = o.calculate_distances(data);
14  o = o.calculate_hits();
15  z = o.get_distrboolmap(o.hits);
16  flag_in = 0; % Inside a discarded range
17  for i = 1:length(z)+1
18  if flag_in && (i == length(o.hits)+1 || z(i))
19  o.ranges(end+1, :) = [o.edges(ia), o.edges(i)];
20  flag_in = 0;
21  elseif ~flag_in && i <= length(o.hits) && ~z(i)
22  ia = i;
23  flag_in = 1;
24  end;
25  end;
26  end;
27  end;
28 end
29 
Distribution-Based Outlier Removal.
Outlier removal by Histogram.