description: simplest example for LSTM ANN in python

# import packages

1 | import numpy |

# initial dataset

1 | test_set = [0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8] |

# transform data into [current_data, next_data]

1 | dataX, dataY = [], [] |

# reshape data

1 | dataX = numpy.reshape(dataX, (dataX.shape[0], 1, 1)) |

# create and fit the LSTM network

1 | model = Sequential() |

# make predictions

1 | test = numpy.array(test_set) |

# plot baseline and predictions

1 | plt.plot(test_set) |