14 Antworten auf „Python through LSTM on time Assortment Prophecy“

  1. Thanks. Could you elaborate on this shape
    np.append(batch[:,1:,:],[[pred_list[i]]]

    I understand what we do but do not understand the shape and how to derive this

  2. Thank you Ian for the tutorial, it helped me a lot. I do have a question. How do i decide on n_input for a larger data? Does this value effect the accuracy of the model?

  3. hello, i got this error when i run this code (IN 25)

    index=future_dates[-n_input:].index, columns=['Prediction'])
    ValueError: Shape of passed values is (24, 1), indices imply (12, 1)

    How do i fix this?

  4. Dear Sir!!! i haven't good knowledge about Machine Learning and these thing but i want to study …..Sir how i predict like this example next five year Air Passengers..

  5. hi ian,
    I seem to get an error when fitting the generator.

    AttributeError: 'TimeseriesGenerator' object has no attribute 'shape'

    I converted the training data to numpy array before passing into the time series generator.
    I am currently working on a sales prediction project by using timeseriesgenerator.
    Everything seems to be going well until the fitting part. It returns

    AttributeError: ‘TimeseriesGenerator’ object has no attribute ‘shape’

    the code is like this:

    n_input = 30
    n_features = 1
    generator = TimeseriesGenerator(X_train,y_train,length = n_input,batch_size=16)
    model = keras.models.Sequential()
    model.add(keras.layers.LSTM(100,activation = ‘relu’,return_sequences=True,input_shape (n_input,n_features)))
    model.add(keras.layers.LSTM(50,activation = ‘relu’,return_sequences = True))
    model.add(keras.layers.LSTM(25))
    model.add(keras.layers.Dense(1))

    when it reaches fitting it shows this error.
    could you please tell what might be a possible reason behind it?

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert.