Categorical Data Handling | Part 2 | Machine Learning | MATLAB
Simple code :
k=["France","Spain","Germany"];
l=[2,1,0];
g=Data2.Country;
number=zeros(length(g),1);
for i=1:length(k)
rs=ismember(g,k(i));
number(rs)=l(i);
end
or you can follow this also:
k={'France','Spain','Germany'};
l=[2,1,0];
g=Data2.Country;
number=zeros(length(g),1);
for i=1:length(k)
rs=ismember(g,k{i});
number(rs)=l(i);
end
Free program: https://www.matlabcoding.com Free Support: castorclasses2014@gmail.com Live Support: t.me/matlabirawen Like us: https://www.facebook.com/matlabirawen/ Join us: https://www.facebook.com/groups/MATLA... MATLAB Book for the beginner: https://amzn.to/3fTfmTa
Free program: https://www.matlabcoding.com Free Support: castorclasses2014@gmail.com Live Support: t.me/matlabirawen Like us: https://www.facebook.com/matlabirawen/ Join us: https://www.facebook.com/groups/MATLA... MATLAB Book for the beginner: https://amzn.to/3fTfmTa
ReplyDeleteGreat post i must say and thanks for the information. Education is definitely a sticky subject. However, is still among the leading topics of our time. I appreciate your post and look forward to more.
PMP Certification
PMP Course
PMP Course in Malaysia
360DigiTMG
I think about it is most required for making more on this get engaged
ReplyDeletedata science course in malaysia
data science certification
data science course
data scientist course in malaysia
data science courses malaysia
I am impressed by the information that you have on this blog. It shows how well you understand this subject.
ReplyDeletedata analytics course
data science course
big data course
big data course
360DigiTMG