title: NN with Keras predicts classes as dtype=float32 as oppose to true class values of 1,2,3, why?
body: <p>I am implementing a simple NN on wine data set. The NN works well and produces the prediction score, however, when I am trying to explore the actual predicted values on the test data set, I receive an array with dtype=float32 values, as oppose to values of the classes. </p>
  
  <ul>
  <li>The classes are labelled as 1, 2, 3</li>
  <li>I have 13 attributes and 178 observations (small data set)</li>
  <li><p>Below is the the code on the implementation and the outcome I get:</p>
  
  <p><code>df.head()</code>
  <a href="https://i.stack.imgur.com/SucM0.jpg" rel="nofollow noreferrer">enter image description here</a></p>
  
  <p><code>X=df.ix[:,1:13]</code></p>
  
  <p><code>y= np.ravel(df.Type)</code></p>
  
  <p><code>X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.33, random_state=42)</code></p>
  
  <p><code>scale the data:</code></p>
  
  <p><code>scaler = StandardScaler().fit(X_train)</code></p>
  
  <p><code>X_train = scaler.transform(X_train)</code></p>
  
  <p><code>X_test = scaler.transform(X_test)</code></p>
  
  <p><code>define the NN</code></p>
  
  <p><code>model = Sequential()</code></p>
  
  <p><code>model.add(Dense(13, activation='relu', input_shape=(12,)))</code></p>
  
  <p><code>model.add(Dense(4, activation='softmax'))</code></p>
  
  <p><code>fit the model</code></p>
  
  <p><code>model.compile(loss='categorical_crossentropy', optimizer='adam', metrics=['accuracy'])</code></p>
  
  <p><code>model.fit(X_train, y_train1,epochs=20, batch_size=1, verbose=1)</code></p></li>
  </ul>
  
  <p>Now this is where I store my predictions into y_pred and get the final score:</p>
  
  <pre><code>`y_pred = model.predict(X_test)`
  
  `score = model.evaluate(X_test, y_test1,verbose=1)`
  
  
  `59/59 [==============================] - 0s 2ms/step
  </code></pre>
  
  <p>[0.1106848283591917, 0.94915255247536356]`</p>
  
  <p>When i explore y_pred I see the following:</p>
  
  <pre><code>`y_pred[:5]`
  
  `array([[  3.86571424e-04,   9.97601926e-01,   1.96467945e-03,
        4.67598657e-05],
     [  2.67244829e-03,   9.87006545e-01,   7.04612210e-03,
        3.27492505e-03],
     [  9.50196641e-04,   1.42343721e-04,   4.57215495e-02,
        9.53185916e-01],
     [  9.03929677e-03,   9.63497698e-01,   2.62350030e-02,
        1.22799736e-03],
     [  1.39460826e-05,   3.24015366e-03,   9.96408522e-01,
        3.37353966e-04]], dtype=float32)`
  </code></pre>
  
  <p>Not sure why I do not see the actual predicted classes as 1,2,3?</p>
  
  <p>After trying to convert into int I just get an array of zeros, as all values are so small. </p>
  
  <p>Really appreciate your help!!</p>