I clustered some kinds of flowers into 3 groups. E.g cluster 1 has 2 kinds of flowers,cluster 2 has 15 kinds of flowers and the last cluster has 18 kinds of flowers. Now i want to predict the output variable which is common in all of flowers  and it is continuous numerical number with neural network. I have 7 input variables and 1 output variable with 3 levels( of  3 kinds of flowers on clusters) . how can i encode the output variable that i can use "nnet" function in R? I mean, if i want to use nnet function and the output called " m" how should i encode it to be able to write the code below in R:

nnet(m~x1+x2+x3+x4+x5+x6+x7,data=train.data, size=9)

Any help will be appreciated.

More Ghazaleh Baghbani's questions See All
Similar questions and discussions