# Keras Numpy Error: Why does accuracy go to zero?

I am trying to follow this tutorial. Everything works when I copy and paste the data, but when I try to replace the dataset with a random numpy matrix, my accuracy goes to zero. It shouldn't go to zero because the Y matrix is a column in the X matrix, so in theory the training process should figure that out and the accuracy should go to 100%, but it doesn't.

import numpy
import pandas
from keras.models import Sequential
from keras.layers import Dropout, Dense
seed = 7
numpy.random.seed(seed)

dataset = numpy.random.rand(800, 9)

# split into input (X) and output (Y) variables
X = dataset[:,0:8]
Y = dataset[:,  7]

# create model
model = Sequential()

# Compile model

# Fit the model
model.fit(X, Y, nb_epoch=10, batch_size=10, verbose=0)

# evaluate the model
scores = model.evaluate(X, Y)
print("%s: %.2f%%" % (model.metrics_names[1], scores[1]*100))


You're trying to compute the accuracy of a regression problem, i.e. the portion of examples on which the output is floating-point equal to the input. Unsurprisingly, this never happens. Pass metrics=['mean_squared_error'] instead.