Skip to content

enhance: tutorial 1 using ann.#282

Merged
ndem0 merged 4 commits intomathLab:masterfrom
kshitij-maths:tut-1-ann
Apr 9, 2026
Merged

enhance: tutorial 1 using ann.#282
ndem0 merged 4 commits intomathLab:masterfrom
kshitij-maths:tut-1-ann

Conversation

@kshitij-maths
Copy link
Copy Markdown
Member

Overview

This PR adds a new tutorial (tutorial-1-ann.ipynb) that demonstrates the construction of a Reduced Order Model (ROM) using Artificial Neural Networks (ANN) instead of the traditional Radial Basis Function (RBF) approach.

The tutorial follows the workflow established in the original Tutorial 1 but the RBF is replaced with an ANN.

Key Changes

  • New Tutorial: Created tutorial-1-ann.ipynb showcasing the ANN-ROM workflow.
  • Performance Comparison: Included a new comparative analysis section between ANN and RBF. This demonstrates the ANN's better accuracy (measured via relative $L^2$ error) on this specific dataset.

Technical Details

  • POD Rank: Maintained a consistent rank (n_snapshots - 1) across both the ANN and RBF models to ensure a comparable and fair benchmark.
  • Metrics: Utilized Leave-One-Out (LOO) Cross-Validation to assess the L2 relative error.
  • Visualization: Added log-scale error plots to visualize the performance gap between the two interpolation methods.

Verification Results

On the provided thermal dataset, the ANN achieved significantly lower error rates compared to the RBF:

  • Mean LOO Error (ANN): ~10⁻² to 10⁻³
  • Mean LOO Error (RBF): ~10⁻¹

Related Issue

This PR fixes issue #179

@ndem0
Copy link
Copy Markdown
Member

ndem0 commented Mar 30, 2026

Dear @kshitij-maths, thanks!
The tutorial is fine, but there are several things I do not understand:

  • tutorial-2 already shows the usage of ANN (and also AE). I'm a little bit lost in understanding the take-home message: what are the additional information can I get from this tutorial?
  • Why is the name tutorial-1-ann? Shouldn't it be tutorial-5?
  • The link is missing in the README
  • check the tutorial is also present in the documentation files
  • please use the data from mathlab huggingface https://huggingface.co/SISSAmathLab

@kshitij-maths
Copy link
Copy Markdown
Member Author

kshitij-maths commented Mar 30, 2026

Dear @ndem0, thanks!

@ndem0
Copy link
Copy Markdown
Member

ndem0 commented Apr 8, 2026

Dear @kshitij-maths, why did you change the .rst files?

@kshitij-maths
Copy link
Copy Markdown
Member Author

Dear @ndem0, I did that to include it in the documentation.

  • check the tutorial is also present in the documentation files

@ndem0
Copy link
Copy Markdown
Member

ndem0 commented Apr 9, 2026

No, you actually changed the structure of (some of) the documentation files, in particular:

database.rst
parameter.rst
reducedordermodel.rst
regular_grid.rst
snapshot.rst

Those files don't control the presence of the tutorials in the documentation, they actually change the documentation of these classes. Please revert it. The only file to change is tutorials.rst.

@kshitij-maths
Copy link
Copy Markdown
Member Author

kshitij-maths commented Apr 9, 2026

Yes, you're right. Is it okay now?

@ndem0 ndem0 merged commit 491c625 into mathLab:master Apr 9, 2026
16 checks passed
@kshitij-maths kshitij-maths deleted the tut-1-ann branch April 9, 2026 12:18
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