Calculator Inputs
Enter one series per line. Use Label | values, Label: values, or Label, values. Separate values with commas, spaces, or semicolons.
Example Data Table
| Series | T1 | T2 | T3 | T4 | T5 | T6 | T7 |
|---|---|---|---|---|---|---|---|
| Alpha | 12 | 14 | 18 | 20 | 25 | 28 | 30 |
| Beta | 10 | 13 | 17 | 21 | 24 | 27 | 31 |
| Gamma | 40 | 38 | 35 | 33 | 30 | 28 | 26 |
| Delta | 42 | 39 | 36 | 32 | 29 | 27 | 25 |
| Epsilon | 8 | 9 | 10 | 10 | 11 | 12 | 12 |
This sample demonstrates upward, downward, and nearly flat patterns. It is useful for testing metric sensitivity and comparing how shape-based grouping changes assignments.
Formula Used
Euclidean Distance
d(x,y) = √Σ(xt - yt)². This measures straight-line separation between equally aligned observations.
Manhattan Distance
d(x,y) = Σ|xt - yt|. This emphasizes cumulative point-by-point deviation.
Cosine Distance
d(x,y) = 1 - (x·y / ||x|| ||y||). This focuses on directional similarity rather than scale.
Dynamic Time Warping
DTW(i,j) = |xi-yj| + min(DTW(i-1,j), DTW(i,j-1), DTW(i-1,j-1)). This aligns similar shapes despite local shifts.
K-Medoids Objective
J = Σ d(xi, mc(i)). Each series is assigned to the nearest medoid, then medoids are updated to reduce total distance.
Silhouette Score
s(i) = (b(i) - a(i)) / max(a(i), b(i)). Higher values indicate better separation and stronger internal cohesion.
How to Use This Calculator
- Paste at least two time series, one line per sequence.
- Choose the desired cluster count based on expected pattern groups.
- Select a distance metric that matches your analytical goal.
- Apply normalization when magnitude differences should not dominate clustering.
- Enable resampling if non-DTW metrics must compare unequal lengths.
- Use smoothing to reduce noise before computing distances.
- Run clustering and review assignments, medoids, cost, and silhouette score.
- Inspect the plot and distance matrix before exporting CSV or PDF.
Frequently Asked Questions
1. What does this calculator cluster?
It clusters multiple numeric sequences that evolve over time. Each line represents one series, and the calculator groups similar trajectories into clusters using distance-based pattern comparison.
2. Why use k-medoids instead of k-means?
K-medoids works directly with a distance matrix, so it supports DTW and non-Euclidean measures. It also picks real series as representatives, which improves interpretability.
3. When should I choose DTW?
Choose DTW when similar shapes may occur with slight timing shifts. It aligns local sections before measuring dissimilarity, which is helpful for temporal pattern matching.
4. What does the silhouette score mean?
The silhouette score summarizes how well each series fits its assigned cluster compared with the nearest alternative cluster. Values closer to one generally indicate cleaner separation.
5. Should I normalize every dataset?
Not always. Normalize when scale differences hide shape similarity. Skip normalization when absolute magnitude is meaningful and should influence the clustering outcome.
6. What if my series lengths are different?
DTW can compare unequal lengths naturally. For Euclidean, Manhattan, and cosine distance, enable resampling or provide equal-length inputs to avoid invalid comparisons.
7. Can I export the results?
Yes. After computation, use the CSV button for structured tabular output and the PDF button for a formatted report containing summary values and assignment tables.
8. Is this suitable for production modeling?
It is best for fast exploration, education, and prototyping. Production workflows may require larger pipelines, validation studies, domain features, and more scalable clustering implementations.