Time‑Series Classification — a Practical Field Guide (with a Telco Churn Walkthrough)
Introduction: From Static Snapshots to Evolving Sequences
Time‑Series Classification — a Practical Field Guide (with a Telco Churn Walkthrough)
Introduction: From Static Snapshots to Evolving Sequences
Most real-world data doesn’t stand still — it evolves over time. Customer activity, sensor readings, network performance, or stock prices are all examples of time series data.
Time-series classification (TSC) is the task of assigning a label to an entire sequence — not a single snapshot. Instead of using one record with static features (like age, income, or plan type), we feed the model a timeline of observations and ask it to learn patterns across time: rising trends, sudden drops, periodic cycles, or subtle shifts that precede certain outcomes.

Time Series Classification: each customer has multiple feature; each feature contains a sequence of data; they are related with one label
In contrast, classical classification treats every sample as a fixed-length vector of independent features.
- Each record represents a static moment — for instance, predicting churn from a customer’s current demographics and plan attributes.
- Time-series classification, however, learns from how those attributes change over time — for example, a gradual decline in usage or increasing latency leading to churn.

In short:
Classical classification sees the state, while time-series classification sees the story.
By capturing temporal dynamics, TSC enables models to detect behavioral evolution rather than static correlation — a crucial advantage in domains like healthcare monitoring, predictive maintenance, financial fraud detection, and telecom churn forecasting.
toy telco example (from the notebook)
[embed]Google Colab Edit descriptioncolab.research.google.com
This notebook contains all the components covered in the article. It is recommended to use it to reproduce and practice everything discussed here.
For more time series related content, you can also check github repository
This notebook synthesize customer‑day panels (90 days, ~10 behavioral features such as Consumption_amount, Data_volume, etc.). Churners show a gradual decline before the label is assigned. We evaluate multiple families:
- Feature‑based ML: Random Forest on R/F/M‑style aggregates.
- Distance‑based: k‑NN with Dynamic Time Warping (DTW).
- Deep sequence models: LSTM and InceptionTime (a strong 1D‑CNN).
- Fusion: combine time‑series with static features (age, plan, tenure).
Along the way we handle class imbalance (class weights / sampling) and enforce proper time windows to avoid leakage.
1) Feature‑based classifiers (fast, interpretable)

Before diving into time-series classification, it’s worth recalling how classical machine learning typically approaches the problem.
Instead of feeding raw 90-day sequences directly into a model, we first summarize each time series into a fixed-length vector — a compact set of features that captures the overall behavior of the signal.
Common transformations include:
- Recency / Frequency / Monetary (RFM) scores — capturing how recently and how often an event occurred, and its magnitude.
- Rolling-window statistics — such as 3×30-day averages, medians, or standard deviations to describe periodic behavior.
- Temporal dynamics — including last-k day deltas, slopes, trend breaks, and volatility to represent directional changes.
By performing these aggregations, we effectively compress 90 days of temporal data into a concise tabular format. This fixed-length representation can then be used as input to traditional classifiers such as Random Forests, XGBoost, or Logistic Regression — models that expect independent, non-sequential features.
For more time series feature engineering, check this article

Metrics of Random Forest on summarized time series classification
2) Distance‑based nearest neighbors (surprisingly strong baselines)
One of the simplest time-series classification methods is the k-Nearest Neighbors (k-NN) algorithm combined with a distance measure such as Dynamic Time Warping (DTW) instead of Euclidean distance.
- Unlike classical ML models that compare individual features, k-NN with DTW compares entire sequences directly.
- DTW is particularly useful because it can align time series that are out of phase, handling temporal shifts or variable speeds in the data.
- When using distance-based weighting (
weights="distance"), closer neighbors contribute more strongly to the final prediction, making the method both intuitive and robust.
Pros:
- Minimal tuning and easy to implement
- Excellent baseline performance
Cons:
- Computationally expensive — the naive approach scales as O(N²·T²)
sktime is a powerful Python library for time series analysis — particularly strong in classification tasks, where it offers far greater versatility and breadth of model options compared to packages like Darts or PyTorch Forecasting.
from sktime.classification.distance_based import KNeighborsTimeSeriesClassifier

This is the simpliest Time Series Classification, the result is pretty bad
3) Deep sequence models (learn the shape for you)
Now we start introduce advanced time series classification
a) LSTM/GRU
When patterns unfold gradually over time, Recurrent Neural Networks (RNNs) — particularly LSTM (Long Short-Term Memory) and GRU (Gated Recurrent Unit) models — excel. These architectures are designed to retain information across long sequences, making them ideal for time series with smooth trends, delayed effects, or long-range dependencies that simpler models might miss.

In this notebook, I manually defined a LSTM Model, you can also use sktime LSTMFCNClassifier.

LSTM Model looks pretty good
b) 1D‑CNNs: InceptionTime
InceptionTime is a deep learning architecture designed specifically for time-series classification, inspired by the Inception modules from computer vision (originally used in Google’s InceptionNet).
Instead of applying a single convolutional kernel size across the entire sequence, InceptionTime runs multiple convolutions in parallel, each with a different kernel length.
- Parallel convolutions at different kernel sizes capture multi‑scale motifs.
- Strong accuracy on many archives with excellent throughput.
- In
sktime, you can pass**class_weight** and nested panel data.

Performance great!!!
c) ResNetClassifier
The ResNetClassifier adapts the well-known Residual Network (ResNet) architecture from computer vision to time-series classification.
Instead of stacking convolutional layers sequentially, it uses residual blocks — shortcuts that connect earlier layers directly to later ones. These skip connections help the network learn deeper hierarchical features while avoiding the vanishing-gradient problem that often hampers very deep models.
Strengths:
- Captures both fine-grained and global temporal features efficiently.
- Trains stably even at great depth due to residual connections.
- Offers high accuracy with relatively modest hyperparameter tuning.
Conclusion

1). Both models successfully captured churn behavior.
2). The LSTM model performed slightly better than the Random Forest.
- This improvement arises because the LSTM model preserves the temporal dynamics of customer behavior — it learns how usage and engagement evolve over time, rather than relying on static, aggregated summaries.
3). Advanced Deep Learning model significantly outperform others
Fusion: Combining Sequential and Static Features
So far, our models have focused on behavioral features — those that evolve over time, such as data consumption, signal strength, or latency.
However, in many real-world problems, we also have static features — attributes that remain constant for each entity, such as a customer’s age, gender, location, or plan type. These features often carry valuable contextual information that complements the temporal signals.
The question, then, is:
how can we combine static features with time-series data in a single model?
There are several strategies to achieve this fusion.
- The simplest is to broadcast static attributes across time so they become additional constant channels in the input tensor.
- A more flexible alternative is a dual-input architecture, where one branch processes the sequential data (e.g., via LSTM, CNN, or ROCKET) and another branch processes the static features through a multilayer perceptron (MLP). The outputs of both branches are then concatenated before classification.

By merging static and dynamic perspectives, we allow the model to learn not just how behavior changes over time, but also who or what kind of entity exhibits that behavior — leading to richer and more accurate predictions.
Popular Time Series Package:
메타데이터
- post_id
- 271fa59b9bd0
- slug
- time-series-classification-a-practical-field-guide-with-a-telco-churn-walkthrough-271fa59b9bd0
- url
- https://medium.com/@injure21/time-series-classification-a-practical-field-guide-with-a-telco-churn-walkthrough-271fa59b9bd0
- canonical_url
- https://medium.com/@injure21/time-series-classification-a-practical-field-guide-with-a-telco-churn-walkthrough-271fa59b9bd0
- author_url
- https://medium.com/@injure21
- status
- ok
- fetched_at
- 2026-06-25 12:15:08