我想预测以下价格:
X=dataset.iloc[:,1:12]
Y=dataset.iloc[:,0:1]
X_train, X_test, Y_train, Y_test = train_test_split(X, Y, test_size=0.3)
//this is my neural network
model=Sequential([
Dense(32,activation='relu',input_shape=(10,)),
Dense(32,activation='relu'),
Dense(1,activation='sigmoid'),
])
model.compile(loss='binary_crossentropy',
optimizer='sgd',
metrics=['accuracy'])
hist = model.fit(X_train, Y_train,
batch_size=20, epochs=100,
validation_data=(X_test, Y_test))
我的精度为0。
帮我解决这个问题。
我还更改了损失函数,但准确性并未提高。