简体   繁体   中英

Calculate Y with new values of X with Neural Network Regression

I´m building a neural network regression with Keras, and I need predict the next value of Y with new data input.

ie (Historical Data)

  • AB C DEFGHI

  • 0 60 65.0 8450 7 5 2003 2003 196.0 706

  • 1 20 80.0 9600 6 8 1976 1976 0.0 978

  • 2 60 68.0 11250 7 5 2001 2002 162.0 486

  • 3 70 60.0 9550 7 5 1915 1970 0.0 216

  • 4 60 84.0 14260 8 5 2000 2000 350.0 655

where: Y(I)= B0 + B1X1 + B2X2... [A,B,C,D] then my neural network model is fitted (model.fit)

My next row with new data input:

  • 5 24 43.0 8000 9 10 1200 5000 170 New Value

so, i need predict this new value (empty space) with the new data (24, 43, 8000...) with the trained network (weights...)

how can i do?

You can use predict like so

Xnew = [[...], [...]]
test_predictions = model.predict(Xnew)

Here is an example

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM