# How to know the name of the predicted class?

As we know all, after training a neural network, each neuron in the output layer presents one class. These class are in a numeric format for example 0 for sunny 1 for overcast and 3 for rainy. after the prediction phase, the model print for example 1, how to know that 1 corresponds to the class overcast?

• which module are you using?, may be if you can give us the name, we can give a code example – InAFlash Jul 30 '18 at 12:33
• Thank you for your answer. I used a multi layer perception for classification – user Jul 30 '18 at 19:45

You as the designer of the network specify each class in the training example. You set e.g. a car class to label $0$ and another class to $1$. During training your classifier tries to map the inputs to the corresponding class which are those numbers where you have specified in the dataset. This phase is called encoding. After outputting the label, you should decode the label which is a trivial task!
• I don't know how your data is but try to exploit pandas.read_csv, add a new $,0$ for previous classes and store them. For new data try to zero the other entries and add one for the last. Are you familiar with pandas? – Media Jul 30 '18 at 19:49