ask question about using numerical and categorical data as input on the neural network toolbox

2 views (last 30 days)
Dear Sir/Madam
I am writing to ask question about using numerical and categorical data as input on the neural network toolbox. In this regard, I am going to use 1-of-N encoding to convert categorical data to numerical one. As an Example my input data are:
a= 23, 27, 35, 43, 26, 15, 12
b= 1.2, 1.5, 1.8, 2.4, 2.7, 0.7, 0.2
c= “high”, “medium”, “low”, “medium”, “low”, “high”, “high”
d= “good”, “very bad”, “good”, “bad”, “very bad”, “good”, “very bad”
Based on the following code I can encode the above categorical data as dummy variable:
cat1= categorical ({“high”, “medium”, “low”, “medium”, “low”, “high”, “high”});
cat2= categorical ({“good”, “very bad”, “good”, “bad”, “very bad”, “good”, “very bad”});
d1=dummyvar (cat1);
d2=dummyvar (cat2);
I suppose that my work until this part is correct, if so, I would really appreciate your time to advice me how can I combine numerical (a and b) and categorical (d1 and d2) data in order to make input in NN toolbox.
Best Regards,

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!