First time here? Checkout the FAQ!
x
+1 vote
264 views
asked in Machine Learning by (210 points)  

Here is LSTM predict model and i want to convert Linear Regression.

...
model.fit(x_train, y_train, epochs=10, batch_size=16)

trainPredict = model.predict(x_train)
testPredict = model.predict(x_test)
# invert predictions
trainPredict = scaler.inverse_transform(trainPredict)
trainY = scaler.inverse_transform([y_train])
testPredict = scaler.inverse_transform(testPredict)
testY = scaler.inverse_transform([y_test])

I tried,

y = trainPredict
x = range(0,len(y))
XGBModel = XGBRegressor()
XGBModel.fit(x,y, verbose=False)

And the result is :

Check failed: preds.Size() == info.labels_.Size() (1 vs. 56969) labels are not correctly providedpreds.size=1, label.size=56969'

I don't know why this error occurs. How can I solve this problem?

  

Please log in or register to answer this question.

...