Feature-driven Time Series Clustering

Donato Tiano, Angela Bonifati, Raymond T. NgEdbt 2021

Introduction

Clustering time series data—grouping unlabeled sequences based on inherent similarities—is a fundamental task in data science with applications ranging from finance to medicine. However, real-world data often presents two significant hurdles: heterogeneity and variable sequence lengths. Traditional state-of-the-art algorithms, such as k-Shape, frequently rely on raw data comparisons or require fixed-length inputs. In fields like healthcare, where patient records may span different durations, direct point-to-point comparisons are often impossible or misleading due to noise.

FeatTS is a novel semi-supervised clustering framework designed to overcome these limitations. Instead of comparing raw data, FeatTS extracts high-dimensional statistical features and employs a graph-based community detection approach to group series into robust, interpretable clusters.

Methodology

The FeatTS pipeline is structured into four distinct stages to transform raw time series into meaningful clusters.

The FeatTS pipeline overview, illustrating the flow from feature extraction to final quality evaluation.

1. Feature Extraction and Selection

Using the tsfresh library, the system extracts hundreds of statistical features, such as mean, variance, and trend. To manage "feature bloat," the Benjamini-Yekutieli procedure ranks these features by their relevance to available labels. Subsequently, Principal Feature Analysis (PFA)—a variant of PCA that preserves original feature values—is applied to eliminate redundancy while retaining 90% of the information.

2. Graph Encoding

For every selected feature, FeatTS constructs a separate graph where each time series is represented as a node. Edges between nodes are weighted based on the distance between series for that specific feature. To emphasize strong similarities, the graphs are pruned to retain only the top 80% of edges (those representing the smallest distances).

3. Community Detection

The "Greedy Modularity Algorithm" is applied to these individual feature graphs. This process treats clusters as "communities" of densely connected nodes. By performing this for every feature, the system generates an ensemble of perspectives on how the data might be grouped.

4. Co-occurrence Matrix and Final Clustering

The results from all feature-specific communities are aggregated into a weighted co-occurrence matrix. If two time series frequently appear in the same community across different features, their similarity score in the matrix increases.

Example of a co-occurrence matrix showing similarity scores between different time series datasets.

Finally, K-Medoid clustering is performed on this matrix to produce the final, consolidated groups.

Key Insights

The FeatTS framework introduces several conceptual shifts in how time series clustering is approached:

  • Human-Centric Interpretability: By utilizing statistical features like "trend" or "spectral entropy" rather than raw data points, the resulting clusters become interpretable. A researcher can see exactly which statistical property caused two patients to be grouped together, which is vital for clinical trust.
  • The Power of Ensembles: Rather than picking a single "best" feature, FeatTS looks at the consensus across many features. This community detection approach acts as a filter, where noise in one feature is cancelled out by the stability of others.
  • Solving the Length Problem: Because features like "mean" or "variance" can be calculated for a sequence of any length, FeatTS bypasses the need for complex time-warping or padding techniques required by raw-data methods.
  • Discovery of New Sub-types: Unlike classifiers stuck with predefined labels, FeatTS can sub-divide existing labels into an arbitrary number of clusters, potentially discovering new sub-types of a disease or behavior.

Results and Performance

The framework was evaluated on two primary datasets:

  • UCR Archive: On 64 standard benchmark datasets, FeatTS outperformed state-of-the-art methods like k-Shape and Seeded kMeans in 37 instances, demonstrating its broad applicability.
  • Clinical Case Study: Using kidney disease data from the George Pompidou Hospital, FeatTS achieved an Adjusted Mutual Information (AMI) score of 0.56–0.58, significantly higher than the 0.44–0.48 achieved by Seeded kMeans. The system also demonstrated robust scalability on datasets with up to 4,000 time series.

Conclusion and Future Work

FeatTS demonstrates that an ensemble of feature-driven communities can provide more robust and interpretable clustering than raw-data methods. While the current iteration relies on a small percentage of labeled data (20%) for feature selection, future work aims to transition the pipeline to a fully unsupervised model. Additionally, the authors plan to refine the graph pruning heuristics and integrate feature relevance degrees more directly into the community detection weights to further enhance accuracy.

Summary updated

BibTeX
@inproceedings{tiano2021feature,
  author = {Donato Tiano and Angela Bonifati and Raymond T. Ng},
  title = {{Feature-driven Time Series Clustering}},
  booktitle = {Edbt},
  year = {2021},
  doi = {10.5441/002/edbt.2021.33},
}
Figure