prtPreProcHistEq Histogram equalization pre-processing
HISTEQ = prtPreProcHistEq creates a histogram equalization pre
processing object. A prtPreProcHistEq object processes the input
data
so that the distribution of each feature is approximately uniform
in the range [0,1].
prtPreProcHistEq has the following properties:
nSamples - The number of samples to use when learning the
histogtram of the training data. The default is inf
(which uses all the data), however for large data sets
this can be slow.
A prtPreProcHistEq object also inherits all properties and functions from
the prtAction class
Example:
dataSet = prtDataGenIris; % Load a data set
dataSet = dataSet.retainFeatures(1:2); % Use only the first 2
% Features
histEq = prtPreProcHistEq; % Create the
% prtPreProcHistEq Object
histEq = histEq.train(dataSet); % Train the object
dataSetNew = histEq.run(dataSet); % Equalize the histogram
% Plot
subplot(2,1,1); plot(dataSet);
title('Original Data');
subplot(2,1,2); plot(dataSetNew);
title('HistEq Data');