framework
framework copied to clipboard
KNearestNeighbors.Scores(double[],double[]) throws IndexOutOfRangeException
What would you like to submit? (put an 'x' inside the bracket that applies)
- [ ] question
- [x ] bug report
- [ ] feature request
Issue description KNearestNeighbors.Scores(double[],double[]) throws IndexOutOfRangeException when called via Decide(double[][]) and GeneralConfusionMatrix.Estimate(KNN, double[][], int[])
I've confirmed that none of the arrays I'm feeding in contain any nulls, and that they're all of matching dimensions.
I'm able to call Learn without issue. I get the exception whether I pass in the training set or a test set.
var knn = new KNearestNeighbors(k);
var (xTrain, xTest, yTrain, yTest) = SplitIntoTestAndTraining(inputFeatures, outputs, 0.20d);
knn.Learn(xTrain, yTrain);
var d = knn.Decide(xTest);
var diagnostics = GeneralConfusionMatrix.Estimate(knn, xTest, yTest);
return new TrainedKNN(_scaler.ScalerBounds, knn, default, k);``
call stack:

exception detail:

I can reproduce this problem in 3.7.0, 3.8.0, and 3.8.2-alpha.