title: How to input data into Keras? Specifically what is the x_train and y_train if I have more than 2 columns?
body: <p>How can I input data into keras? What is the structure? Specifically what is the x_train and y_train if I have more than 2 columns?</p>
  
  <p>This is the data I want to input:</p>
  
  <p><a href="https://i.stack.imgur.com/2XvBc.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/2XvBc.png" alt="enter image description here"></a></p>
  
  <p>I am trying to define Xtrain in this example Multi Layer Perceptron Neural Network code Keras has in its documentation. (<a href="http://keras.io/examples/" rel="nofollow noreferrer">http://keras.io/examples/</a>) Here is the code:</p>
  
  <pre><code>from keras.models import Sequential
  from keras.layers.core import Dense, Dropout, Activation
  from keras.optimizers import SGD
  
  model = Sequential()
  model.add(Dense(64, input_dim=20, init='uniform'))
  model.add(Activation('tanh'))
  model.add(Dropout(0.5))
  model.add(Dense(64, init='uniform'))
  model.add(Activation('tanh'))
  model.add(Dropout(0.5))
  model.add(Dense(2, init='uniform'))
  model.add(Activation('softmax'))
  
  sgd = SGD(lr=0.1, decay=1e-6, momentum=0.9, nesterov=True)
  model.compile(loss='mean_squared_error', optimizer=sgd)
  
  model.fit(X_train, y_train, nb_epoch=20, batch_size=16)
  score = model.evaluate(X_test, y_test, batch_size=16)
  </code></pre>
  
  <p>EDIT (additional information):</p>
  
  <p>Looking here: <a href="https://stackoverflow.com/questions/30383404/what-is-data-type-for-python-keras-deep-learning-package?rq=1">What is data type for Python Keras deep learning package?</a></p>
  
  <blockquote>
    <p>Keras uses numpy arrays containing the theano.config.floatX floating point type. This can be configured in your .theanorc file. Typically, it will be float64 for CPU computations and float32 for GPU computations, although you can also set it to float32 when working on the CPU if you prefer. You can create a zero-filled array of the proper type by the command</p>
  </blockquote>
  
  <pre><code>X = numpy.zeros((4,3), dtype=theano.config.floatX)
  </code></pre>
  
  <p>Question: Step 1 looks like create a floating point numpy array using my above data from the excel file. What do I do with the winner column?</p>