I would like to apply Wavelet in MATLAB as a denoising technique on Non-Intrusive load Monitoring data. The data was captured by sensors on each appliance and one sensor on the smart meter (Normally called Aggregated Data). The dataset contains the following:
- timestamp
- Aggregate
- and Appliance from 1 - 9
Why Denoising and with Wavelets
Research has shown that denoising signals before passing it through your Machine Learning Algorithm give better results. This result can improve prediction accuracy. And I am interested in investigating using wavelet to remove uncertainties since my dataset is in the time domain.
This is a sample dataset
Approach Used
function allXd = denoiseSignalToCsvFile(filePath,saveAs)
allData=csvread(filePath,1,1); allXd = []; %allX = []; [row,col] = size(allData); % disp(col); % disp(row);
for applicantIndex = 2:col
% disp(applicantIndex)
x=allData(:,applicantIndex);
xd = waveletTransform(x);
allXd = [allXd; xd];
%allX = [allX; {xd}];
end allXd = allXd' ;
csvwrite(saveAs,allXd);
end
function denoisedOutput= waveletTransform(input) %Wavelet Function wname = 'db7'; % number of levels n = 4; denoisedOutput = cmddenoise(input,wname,n); %denoisedOutput = wdenoise(input,n); end
Question:
- Is the approach corrects?
Thank you.