[BUG] ProximityForest: `n_dimensions` hardcoded to 1, so only the first dimension is ever used
Describe the bug
While reading sktime/classification/distance_based/_proximity_forest.py I noticed n_dimensions = 1 # todo use other dimensions in three getters:
msm_distance_measure_getter(L311)erp_distance_measure_getter(L432)lcss_distance_measure_getter(L457)
Since stats.randint(low=0, high=n_dimensions) excludes the upper bound, dim_to_use is always 0. So on multivariate input, dimensions 1+ never get picked for split candidates.
To Reproduce
from scipy import stats
sampler = stats.randint(low=0, high=1)
print([sampler.rvs() for _ in range(5)])
# [0, 0, 0, 0, 0]Expected behavior
n_dimensions inferred from X (something like X.shape[1]) instead of the hardcoded 1.
Additional context
I haven't checked yet whether the distance functions handle dim_to_use > 0 correctly, so it might need more than just changing this line. I can try a PR if this is something you want fixed. Or is it a known limitation?
Versions
sktime: 1.1.0, scikit-base: 1.1.1, numpy: 2.5.3, scipy: 1.18.1, pandas: 3.0.6 python: 3.14.2, Windows-11
Source: sktime/sktime