title: Keras - how to predict two values instead of one value?
body: <p>I'm learning machine learning and my dataset consists of 7 columns:</p>
  
  <pre><code>home_team, away_team, home_odds, away_odds, home_score, away_score, 1_if_home_wins_else_0
  </code></pre>
  
  <p>To be able to feed the Tensorflow with teams, I converted every team to integer so the first two columns are integers (like database ids)</p>
  
  <p>There is a 10k rows in the csv.</p>
  
  <p><strong>example</strong></p>
  
  <p><a href="https://i.stack.imgur.com/jMUjp.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/jMUjp.png" alt="enter image description here"></a></p>
  
  <p>I modified the code for <a href="https://machinelearningmastery.com/tutorial-first-neural-network-python-keras/" rel="nofollow noreferrer">pima indians diabetes</a> to predict <strong>winnings</strong> of home team.</p>
  
  <p>So now it "predicts" whether the home team win (1) otherwise 0.</p>
  
  <p>Now I would like to modify the algorithm to predict exact score <code>home_score</code>, <code>away_score</code>. I know the outputs will be wrong it's just learning.</p>
  
  <p><strong>code</strong></p>
  
  <pre><code># load the dataset
  dataset = loadtxt('football_data.csv', delimiter=',')
  # split into input (X) and output (y) variables
  X = dataset[:, 0:4]
  y = dataset[:, 6]
  # define the keras model
  model = Sequential()
  model.add(Dense(12, input_dim=4, activation='relu'))
  model.add(Dense(8, activation='relu'))
  model.add(Dense(1, activation='sigmoid'))
  # compile the keras model
  model.compile(loss='binary_crossentropy', optimizer='adam', metrics=['accuracy'])
  # fit the keras model on the dataset
  model.fit(X, y, epochs=150, batch_size=10)
  # evaluate the keras model
  _, accuracy = model.evaluate(X, y)
  print('Accuracy: %.2f' % (accuracy * 100))
  
  # make class predictions with the model
  predictions = model.predict_classes(X)
  # summarize the first 5 cases
  for i in range(50):
      print('%s =&gt; %d (expected %d)' % (X[i].tolist(), predictions[i], y[i]))
  </code></pre>
  
  <p>Do you know how to do that?</p>