diff --git a/src/rail/estimation/algos/k_nearneigh.py b/src/rail/estimation/algos/k_nearneigh.py index 4e8d348..057ce41 100644 --- a/src/rail/estimation/algos/k_nearneigh.py +++ b/src/rail/estimation/algos/k_nearneigh.py @@ -192,6 +192,7 @@ def _process_chunk(self, start, end, data, first): dists, idxs = self.kdtree.query(testcolordata, k=self.numneigh) dists += TEENY test_ens = _makepdf(dists, idxs, self.trainszs, self.sigma) + zmode = test_ens.mode(grid=self.zgrid) test_ens.set_ancil(dict(zmode=zmode)) self._do_chunk_output(test_ens, start, end, first) diff --git a/tests/sklearn/test_algos.py b/tests/sklearn/test_algos.py index d4a1c79..bdd754b 100644 --- a/tests/sklearn/test_algos.py +++ b/tests/sklearn/test_algos.py @@ -3,9 +3,9 @@ import pytest import scipy.special -from rail.core.algo_utils import one_algo +from rail.utils.testing_utils import one_algo from rail.core.stage import RailStage -from rail.core.utils import RAILDIR +from rail.utils.path_utils import RAILDIR from rail.core.data import TableHandle from rail.estimation.algos import k_nearneigh, sklearn_neurnet, random_forest