Chronix

Multivariate Analysis

Real systems produce many correlated time-series simultaneously — CPU, memory, disk I/O, network throughput, request latency. Analyzing each series independently misses cross-variable….

On this page

Real systems produce many correlated time-series simultaneously — CPU, memory, disk I/O, network throughput, request latency. Analyzing each series independently misses cross-variable relationships that are often the key to understanding system behavior.

Multivariate analysis examines multiple time-series jointly.

Why Multivariate?

Example: The Hidden Correlation

Consider detecting a memory leak:

MetricBehaviorUnivariate Detection
Memory usageSlowly increasingPossibly flagged (if strong enough)
Garbage collectionIncreasing frequencyPossibly flagged
Response latencyStable (so far)No alert
Joint patternMemory ↑, GC ↑, latency stable → impending failureRequires multivariate analysis

A univariate detector might miss the early warning because no individual metric has crossed a threshold. The joint pattern — correlated growth in two metrics — is the actual signal.

Methods Implemented in Chronix

MethodTypeUse CaseSection
Pearson / Spearman / KendallCorrelationDetect linear/monotonic relationshipsCorrelation
Mahalanobis DistanceDistanceMultivariate outlier detectionMahalanobis
Isolation ForestTree-basedHigh-dimensional anomaly detectionIsolation Forest
PCADecompositionDimensionality reduction, anomaly detectionPCA
VARAutoregressiveMulti-series forecastingVAR

Data Representation

Multivariate time-series data is represented as a matrix $\mathbf{Y}$:

$$ \mathbf{Y} = \begin{bmatrix} y_{1,1} & y_{1,2} & \cdots & y_{1,p} \ y_{2,1} & y_{2,2} & \cdots & y_{2,p} \ \vdots & \vdots & \ddots & \vdots \ y_{n,1} & y_{n,2} & \cdots & y_{n,p} \end{bmatrix} $$

where $n$ is the number of time steps and $p$ is the number of variables (metrics). Each row is a multivariate observation — a snapshot of all metrics at one instant.

Preprocessing for Multivariate Analysis

Alignment

All series must be aligned to the same time grid. Missing values are handled through:

  1. Forward fill — carry last known value
  2. Linear interpolation — interpolate between neighbors
  3. Exclusion — drop time steps with any missing value

Standardization

Because metrics have different scales (CPU in %, memory in GB, latency in ms), all multivariate methods require standardization:

$$ z_{t,j} = \frac{y_{t,j} - \bar{y}_j}{s_j} $$

This centers each variable at zero with unit variance, ensuring no single variable dominates distance calculations or covariance matrices.

Curse of Dimensionality

As the number of variables $p$ grows, several problems emerge:

IssueThresholdMitigation
Covariance matrix estimation$p > n/5$Regularization (shrinkage)
Distance concentration$p > 20$PCA dimensionality reduction
Computational cost$p > 100$Feature selection

Chronix addresses high dimensionality through PCA-based dimensionality reduction before applying distance-based or tree-based detectors.

Improve this page on GitHub