Impact-Site-Verification: dbe48ff9-4514-40fe-8cc0-70131430799e

Search This Blog

Data Preprocessing in MATLAB | Machine Learning Part 2

Part 1: https://www.matlabcoding.com/2020/05/data-preprocessing-in-matlab-machine.html

Check this link , if you want to learn more on fillmissing in MATLAB: https://www.mathworks.com/help/matlab... Check this link , if you want to learn more on omitnan in MATLAB: https://www.mathworks.com/matlabcentr...

%Code used:

clc
e=Lefta.SalesRating;
count=0;
total=0;
for i=1:length(e)
    if(~isnan(e(i)))
        total=total+e(i);
        count=count+1;
    end
end
meanvalue=total/count;
es=[];
for i=1:length(e)
    if(isnan(e(i)))
        es=[es meanvalue];
    else
        es=[es e(i)];
    end
end





Join us on Telegram: https://t.me/matlabirawen Join us on Facebook Group: https://www.facebook.com/groups/matlabcodes

No comments

Popular Posts