Tuesday, October 03, 2006
I'm back I'm back!! Yes I know I've disappeared for a long time! But there's finally some progress now!!
The task now, is to incorporate 10% noise into the original data. Using the k-fold method, I'm supposed to run the program and plot the various error graph.
Here are the steps to incorporate the 10% noise!
The task now, is to incorporate 10% noise into the original data. Using the k-fold method, I'm supposed to run the program and plot the various error graph.
Here are the steps to incorporate the 10% noise!
% load the data from the text fileWait till I've some results .. will post the other commands later!
% note that the last column is the desired result
Data = loadfile ('file path');
% get the dimensions of the matrix
[rows cols] = size(Data)
% to find the RMS (Root Mean Square) of each column
RMS_Data = sqrt (sum (Data(:,1:end-1).^2)/rows)
%% takes all rows of Data, all except the last column, square each value, sum each column, find the average (within each column), square root.
% generate noise
Random_Noise = betarnd (1,2,rows,cols-1)
RMS_Noise = sqrt(sum(Random_Noise.^2)/rows)
SNR = RMS_Data ./ RMS_Noise
tenPercentSignal = RMS_Data * 0.1
tenPercentNoise = tenPercentSignal ./ RMS_Noise
tenPercentNoise_matrix = tenPercentNoise
for k = 1:rows-1
tenPercentNoise_matrix = vertcat(tenPercentNoise_matrix, tenPercentNoise);
end
Final_Noise = Random_Noise .* tenPercentNoise_matrix