Skip to content

Add LSTM vs CNN timeseries classification example for FordA dataset #2120

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

gsklavounakos
Copy link

This PR adds a new example under 'examples/timeseries/' that compares LSTM and 1D CNN models for univariate timeseries classification on the FordA dataset from the UCR/UEA archive.

Highlights:

  • Uses LSTM and 1D CNN architectures under identical training settings.
  • Includes preprocessing, model definition, training with early stopping and checkpointing.
  • Visualizes training/validation accuracy and loss for both models.
  • Evaluates final test accuracy and loss.
  • Models and plots are saved locally.

Tested with:

  • Python 3.10.8
  • TensorFlow 2.15+
  • CPU and GPU (oneDNN optimization enabled)

Files Added:

  • 'examples/timeseries/lstm_vs_cnn_timeseries_classification.py'
  • 'examples/timeseries/md/lstm_vs_cnn_timeseries_classification.md'

The example follows Keras-IO educational example standards, including model structure, visualization, and reproducibility, is self-contained, and has been tested locally.

Copy link

google-cla bot commented Jun 5, 2025

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@gsklavounakos gsklavounakos force-pushed the add-lstm-vs-cnn-example branch from 1259277 to 58c74f1 Compare June 5, 2025 22:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants