Perfect — let’s demystify that RMSE score with a concrete mini‑walk‑through.
---
## 📐 RMSE Formula Used
For \( N \) equally spaced period points in your match range \( [T_1, T_2] \):
\[
\text{RMSE} = \sqrt{\frac{\sum_{i=1}^{N} \left( S_\text{record}(T_i) - S_\text{target}(T_i) \right)^2}{N}}
\]
Where:
- \( S_\text{record}(T_i) \) = spectral ordinate of the record (or mean spectrum) at period \( T_i \).
- \( S_\text{target}(T_i) \) = target spectrum ordinate at period \( T_i \).
- Units: same as your spectral plot (often cm/s² for PSA).
---
## 🔢 Worked Example (fake numbers)
Imagine you’ve set **T₁ = 0.2 s** and **T₂ = 1.0 s**, and the program checks at **5 points** in that range.
| Period \(T_i\) (s) | \(S_\text{record}\) | \(S_\text{target}\) | Difference | Squared Diff |
|-------------------:|--------------------:|--------------------:|-----------:|-------------:|
| 0.20 | 210 | 200 | 10 | 100 |
| 0.40 | 300 | 320 | -20 | 400 |
| 0.60 | 280 | 270 | 10 | 100 |
| 0.80 | 240 | 250 | -10 | 100 |
| 1.00 | 200 | 190 | 10 | 100 |
**Step 1** – Sum of squared diffs: \(100 + 400 + 100 + 100 + 100 = 800\)
**Step 2** – Divide by number of points: \(800 / 5 = 160\)
**Step 3** – Square root: \(\sqrt{160} \approx 12.65\)
**Interpretation** → The RMSE is **12.65 cm/s²**.
If your target spectrum ordinates are around ~250 cm/s², that’s about **5% average deviation**, which would show as a score ≈ 0.05 if normalized by the target values, as ITACA REXELweb does.
---
## 🗝️ Key Takeaways
- **Lower score = better match** in the specified period window.
- Always compare scores computed with the same T₁–T₂ and target definition.
- The manual’s `"mean_score"` is just the average RMSE over the set’s components, so you can quickly spot the most compatible suite.
---
If you like, I can also explain **exactly how the normalization is applied** in ITACA REXELweb so those 12.65 cm/s² turn into something like 0.05 in the output — want me to unpack that step?