---
title: 'DrCIF: Diverse Representation Canonical Interval Forest'
url: https://www.emergentmind.com/topics/diverse-representation-canonical-interval-forest-drcif
type: topic
---

# DrCIF: Diverse Representation Canonical Interval Forest

The Diverse Representation Canonical Interval Forest (DrCIF) is an interval-based ensemble classifier for time series classification, introduced as a core component of the HIVE-COTE 2.0 meta-ensemble. DrCIF unifies and extends the principle of extracting discriminatory phase-dependent features from time series intervals by leveraging multiple transformations, an enlarged and diverse feature pool, and a randomized forest-based learning structure. Its design synthesizes strengths of previous interval classifiers—most notably TSF and RISE—and surpasses them in both accuracy and representational richness by targeting local features across raw, differenced, and frequency domains, utilizing both classical summary statistics and the comprehensive catch22 feature suite [2104.07551].

## 1. Motivation and Context

HIVE-COTE’s central thesis is that combining classifiers built on diverse time series representations maximizes classification accuracy due to the complementary discriminatory information encoded across domains. In HIVE-COTE 1.0, interval-based constituents included the Time Series Forest (TSF), which utilizes random intervals with classic summary features, and the Random Interval Spectral Ensemble (RISE), which extracts features from spectral representations. DrCIF replaces both by integrating the strengths of these approaches with substantial extensions: it captures local, phase-sensitive features at multiple scales, across both the time and frequency domains, thus greatly enriching the candidate feature set available to interval-based trees. This design is motivated by empirical observations that representations such as the raw series, its first difference, and its periodogram characterize distinct aspects of data, each useful for discrimination in specific contexts [2104.07551].

## 2. Core Representations and Feature Extraction

DrCIF operates on three distinct representations for each series $x$ of length $m$ (for each dimension $1$ to $d$ in multivariate settings):

- **Raw series:** $X_1 = (x_1, x_2, \ldots, x_m)$
- **First difference:** $\Delta x_i = x_{i+1} - x_i, \quad i=1,\ldots,m-1$ ($X_2$ of length $m-1$)
- **Periodogram:** $P(f) = |\sum_{t=1}^m x_t e^{-2\pi i f t/m}|^2, \quad f = 1,\ldots,\lfloor m/2 \rfloor$ ($X_3$ of length $\lfloor m/2 \rfloor$)

From each sequence, $k$ random intervals are selected per base tree. Each interval is defined by a start point $s \in \{1, \ldots, r_m - L_{\max}\}$ and a length $\ell \in \{\ell_{\min}, \ldots, L_{\max}\}$, with $\ell_{\min}=3$ and $L_{\max} = \lfloor r_m/2 \rfloor$, where $r_m$ is the effective length of the representation. In the multivariate case, an interval is also randomly assigned to a dimension $o \in \{1,\ldots,d\}$.

Within each interval, DrCIF computes a subset of $a$ features drawn randomly from a candidate pool of 29 features:

- **7 classical features:** mean, standard deviation, least-squares slope, median, interquartile range, minimum, and maximum.
- **22 catch22 features:** a canonical subset representing measures of autocorrelation, entropy, distributional characteristics, and fluctuation properties (see Lubba et al., 2019 for detailed definitions).

This results in each tree extracting $3 \cdot k \cdot a$ features per series.

| Representation      | Interval Source                | Feature Types                    |
|---------------------|-------------------------------|----------------------------------|
| Raw series          | $x_1,\ldots,x_m$              | 7 classic, 22 catch22            |
| First difference    | $x_{i+1} - x_i$               | 7 classic, 22 catch22            |
| Periodogram         | $P(f)$, $f=1,\ldots,\lfloor m/2 \rfloor$ | 7 classic, 22 catch22   |

## 3. Forest Construction and Training Procedure

DrCIF employs an ensemble of $r$ unpruned “time-series trees,” with each tree trained on randomly subsampled features extracted from randomly chosen intervals of all three representations. Each node split in the tree is determined by maximizing information gain over the selected $a$ features. The impurity function can be either Gini impurity,
$$
\mathrm{Gini}(p) = 1 - \sum_{c=1}^C p_c^2,
$$
or entropy,
$$
H(p) = -\sum_{c=1}^C p_c \log p_c,
$$
where $p = (p_1, \dots, p_C)$ is the class frequency vector in a node with $C$ classes.

**Key hyperparameters and their defaults:**
- $r$ (number of trees): 500
- $k$ (intervals per representation per tree): $k = 4 + \frac{\sqrt{d} \cdot \sqrt{r_m}}{3}$
- $a$ (features per tree): 10

The trees are grown without pruning, utilizing only the $3ka$ features per tree determined by random attribute subsampling and interval selection. Classification is performed by majority vote over all $r$ trees.

**Pseudocode for training a DrCIF tree:**  
Given a training set $\{X_i, y_i\}_{i=1}^n$:
1. Draw a random subset $U$ of $a$ features from the 29 candidates.
2. For each representation ($y \in \{1,2,3\}$), repeat $k$ times:
   - Randomly select $(s, \ell, o)$ for interval position, length, and dimension.
   - For each series $i$ and feature $c$, compute $\phi_c = f_{u_c}(X_i^{(y)}[o]_{s \dots s+\ell-1})$.
3. Construct an unpruned tree with ${\{\phi_i, y_i\}_{i=1}^n}$, splitting nodes by information gain.

## 4. Computational Complexity and Implementation

Let $m$ be the time series length, $n$ the number of series, $T$ the number of trees, $k$ the intervals per representation, and $a$ the attributes per tree. The dominant computational cost in DrCIF arises from feature extraction:

- **Feature extraction per tree:** $O(n \cdot 3k a m)$
- **Tree construction per tree:** $O(n \cdot 3k a \log n)$
- **Total training time:** $O(T n k a m)$

Memory requirements are dominated by storage for a single feature matrix ($n \times 3ka$) and a single tree during construction; total ensemble storage is $O(T \cdot |\text{nodes}|)$.

Key efficiency optimizations include:
- Randomized interval selection, avoiding exhaustive $O(m^2)$ search
- Attribute subsampling ($a \ll 3k$) per tree
- Vectorized computation and reuse of intermediate statistics for classic summaries (means, variances)

## 5. Empirical Performance and Benchmarks

DrCIF demonstrates superior empirical performance among interval-based classifiers. On 112 univariate UCR datasets, averaged over 30 stratified resamples, DrCIF outperforms TSF, CIF, RISE, STSF, and similar interval ensembles. Statistical comparisons using pairwise Wilcoxon signed-rank tests with Holm correction at $\alpha=0.05$ show DrCIF as the top-ranked interval classifier: test-set accuracy is approximately 1–1.5 percentage points higher than CIF and 2–3 points higher than TSF, with $p < 0.01$. DrCIF’s contributions are central to HIVE-COTE 2.0’s performance, enabling the meta-ensemble to surpass all leading single-representation algorithms (including ROCKET, InceptionTime, TS-CHIEF, and HIVE-COTE 1.0) on both univariate (UCR) and multivariate (UEA) benchmarks [2104.07551].

## 6. Significance and Role in Meta-Ensembles

DrCIF exemplifies the design principle that leveraging multiple transformed views of time series and an expanded interval-feature space produces improved discrimination and robustness. Its unification of time, difference, and spectral domain features with diverse summary statistics enables more informative splits within its trees, which ultimately translates to robust majority-vote classification. Within HIVE-COTE 2.0, DrCIF’s strengths are critical to the ensemble’s overall accuracy improvements, as it effectively replaces and improves upon both phase-dependent and spectral interval constituents previously used.

*This suggests that interval ensembles like DrCIF provide a highly effective mechanism for exploiting temporal locality and multi-domain redundancy in supervised time series classification, especially when equipped with diverse and empirically validated feature sets* [2104.07551].

Source: https://www.emergentmind.com/topics/diverse-representation-canonical-interval-forest-drcif