/// Create a new NN bound estimator.
Create a new NN bound estimator.
Create a new NN bound estimator .
pub fn new(
        test_x: &ArrayView2<f64>,
        test_y: &ArrayView1<Label>,
        distance: D,
        nlabels: usize,
    ) -> NNBoundEstimator<D> {
        // NOTE: the value of max_n here does not matter, as it is
        // only used for computing max_k, which is fixed to 1
        // for the KNNStrategy:NN.
        let max_n = 1;
        NNBoundEstimator {
            knn: KNNEstimator::new(test_x, test_y, max_n, distance, KNNStrategy::NN),
            nlabels,
        }
    }
pub fn new ( test_x : & ArrayView2 < f64 > , test_y : & ArrayView1 < Label > , distance : D , nlabels : usize , ) -> NNBoundEstimator < D > { // NOTE: the value of max_n here does not matter, as it is // only used for computing max_k, which is fixed to 1 // for the KNNStrategy:NN. let max_n = 1 ; NNBoundEstimator { knn : KNNEstimator :: new ( test_x , test_y , max_n , distance , KNNStrategy :: NN ) , nlabels , } }
Create a new NN bound estimator.
Create a new NN bound estimator .
test_x
&ArrayView2<f64>
test_y
&ArrayView1<Label>
distance
D
nlabels
usize