handson-ml3
handson-ml3 copied to clipboard
chapter-15, cell[41], Multivariate Time Series
After training mulvar_model with train_mulvar_ds and valid_mulvar_ds, I am trying to predict the model on mulvar_test using model.predict(mulvar_test). and it's returning the array of floats containing 914 values(914 values maybe because of the shape of mulvar_test is (914, 5 ) ) and i guess thats the array of predictions on rail. all i want to know if there's any way that model.predict will return only one value instead of array 914 values?
model.predict should return a list of predictions the same size as the number of inputs. So you'd have to select an input range of just one value, or alternately select a value by index from the prediction array afterwards.