How yangwohenmai/lstm works
Project Type and Purpose
• This is a learning‐oriented code repository for LSTM time‐series forecasting. It contains:
• A series of tutorial scripts (“LSTM系列”, “长短期记忆(LSTM)”) demonstrating data preparation, single/multi-step univariate and multivariate forecasting with Keras/TensorFlow.
• A no-framework, from-scratch LSTM implementation (“LSTM无框架源码实现”) with its own mini-library (xDLbase) for activators, RNN cells, optimizers, sessions, etc.
• A small stock prediction example (“stock_predict”) that loads CSV data, trains Keras models, and saves checkpoints.
File Structure Analysis
• Top-level directories:
• LSTM系列 & 长短期记忆(LSTM): tutorial scripts + datasets (CSV).
• LSTM_Fly: quick LSTM regression examples on “airline-passengers.csv”.
• LSTM无框架源码实现: custom LSTM engine with src/config, src/xDLbase (core modules), src/xutils, plus example scenario.
• stock_predict: dedicated stock-forecasting pipeline with model checkpoints.
• README.md: project overview and curated links.
• Patterns:
• “Examples” layer: Python scripts that orchestrate data loading → preprocessing → model building → training → evaluation → prediction.
• “Framework” layer: two parallel stacks:
1) Keras/TensorFlow API
2) Custom “xDLbase” modules implementing core NN primitives.
• “Data” layer: CSV files under each example subfolder.
• “Artifacts” layer: model weights (HDF5, checkpoints), plots.
Insights from README
• Confirms focus on time-series forecasting using LSTM, with pipelines for data cleaning, feature extraction, modeling, and prediction.
• Emphasizes TensorFlow/Keras for most examples but also showcases a raw LSTM implementation.
Detail Level
• Every major folder as a component if it represents a distinct role (e.g., LSTM无框架源码实现/xDLbase vs LSTM系列).
• Similar example scripts under a “Tutorial Examples” cluster, annotated with sub-folders.
• Stock_predict pipeline as a standalone example branch.
• Flows for training vs inference phases.