Why Use K-Means for Time Series Data? (Part Two) | by Anais Dotis In “Why use K-Means for Time Series Data? (Part One)“, I give an overview of how to use different statistical functions and K-Means Clustering for anomaly detection for time series data. I recommend checking that out if you’re unfamiliar with either. In this post I will share: Some code showing how K-Means is used Why you shouldn’t use K-Means for contextual time series anomaly detection with clusteringintervalkmeansperiodseriestimewindowwindowing