anchor.diff:          ]),
         };
   
  -      final featuresColumnRanges = {
  -        goodFeatureRange, bestFeatureRange,
  -      };
  +      final featuresIdxs = {goodFeatureColIdx, bestFeatureColIdx};
   
         final assessor = SplitAssessorMock();
         final splitter = DecisionTreeSplitterMock();
  -      final categoricalValues = [
  -        Vector.fromList([1, 1, 1]),
  -        Vector.fromList([2, 2, 2]),
  -        Vector.fromList([3, 3, 3]),
  -      ];
  -      final rangeToCategoricalValues = {ignoredFeatureRange: categoricalValues};
  -
  -      when(splitter.split(observations, goodFeatureRange, outcomesRange))
  +      final categoricalValues = [1, 2, 3];
  +      final colIdxToUniqueValues = {ignoredFeatureColIdx: categoricalValues};
  +
  +      when(splitter.split(observations, goodFeatureColIdx, targetColIdx))
             .thenReturn(goodSplit);
  -      when(splitter.split(observations, bestFeatureRange, outcomesRange))
  +      when(splitter.split(observations, bestFeatureColIdx, targetColIdx))
             .thenReturn(bestSplit);
   
         when(assessor.getAggregatedError(goodSplit.values,
  -          outcomesRange)).thenReturn(0.51);
  +          targetColIdx)).thenReturn(0.51);
         when(assessor.getAggregatedError(bestSplit.values,
  -          outcomesRange)).thenReturn(0.1);
  +          targetColIdx)).thenReturn(0.1);
   
         final selector = GreedySplitSelector(assessor, splitter);
  -      final stump = selector.select(observations, outcomesRange,
  -          featuresColumnRanges, rangeToCategoricalValues);
  +      final stump = selector.select(observations, targetColIdx,
  +          featuresIdxs, colIdxToUniqueValues);
   
         expect(stump.keys, equals(bestSplit.keys));
         expect(stump.values, equals(bestSplit.values));
   
  -      verifyNever(splitter.split(observations, ignoredFeatureRange,
  -          outcomesRange));
  +      verifyNever(splitter.split(observations, ignoredFeatureColIdx,
  +          targetColIdx));
       });
     });
   }
  
positive.code:         ]),
        };
  
        final featuresRanges = [
          worstRange, bestRange, worseRange, goodRange,
        ];
        final assessor = SplitAssessorMock();
        final splitter = DecisionTreeSplitterMock();
  
        when(splitter.split(samples, worstRange, outcomesRange))
            .thenReturn(worstSplit);
        when(splitter.split(samples, worseRange, outcomesRange))
            .thenReturn(worseSplit);
        when(splitter.split(samples, goodRange, outcomesRange))
            .thenReturn(goodSplit);
        when(splitter.split(samples, bestRange, outcomesRange))
            .thenReturn(bestSplit);
  
        when(assessor.getAggregatedError(worstSplit.values,
            outcomesRange)).thenReturn(0.999);
        when(assessor.getAggregatedError(worseSplit.values,
            outcomesRange)).thenReturn(0.8);
        when(assessor.getAggregatedError(goodSplit.values,
            outcomesRange)).thenReturn(0.4);
        when(assessor.getAggregatedError(bestSplit.values,
            outcomesRange)).thenReturn(0.1);
  
        final selector = GreedySplitSelector(assessor, splitter);
        final actualSplit = selector
            .select(samples, outcomesRange, featuresRanges);
  
        expect(actualSplit.keys, equals(bestSplit.keys));
        expect(actualSplit.values, equals(bestSplit.values));
  
negative.code:     test('should find best split when splitting the samples by nominal '
          'feature', () {
        final samples = Matrix.fromList([
          [10, 1, 50, 1],
          [12, 2, 52, 2],
          [11, 3, 53, 3],
        ]);
  
        final targetColIdx = 3;
  
        final badFeatureIdx = 0;
        final bestFeatureIdx = 1;
        final goodFeatureIdx = 2;
  
        final badSplit = {
          DecisionTreeNodeMock(): Matrix.fromList([
  