Reputation: 1
I'm a little confused with the model to try to predict the next year on the list.
I can't get it to be an answer for years, is it not the right model for years?
modelsq = tf.keras.Sequential(
[
Dense(64, activation="relu", input_shape=(1,)),
Dense(32, activation="relu"),
Dense(1, activation="sigmoid"),
]
)
modelsq.compile(
optimizer="adam", loss="binary_crossentropy", metrics=["accuracy"]
)
modelsq.fit(
self.x_train["year"], self.y_train["year"], epochs=10, batch_size=32
)
predictions = modelsq.predict(self.p["year"])
print("predictions:", predictions)
predictions: [[1.]
[1.]
[1.]
[1.]
[1.]
[1.]
[1.]
[1.]]
Get the prediction of the year in the series ej:
1990, 1991, 1995...
Upvotes: 0
Views: 25