class_docstr: Unit test class for testing scikit-learn converter.
class_docstr_tok: ["Unit","test","class","for","testing","scikit-learn","converter","."]
docstr: Validate the float samples returned from the converted scikit KNeighborsClassifier
docstr_tok: ["Validate","the","float","samples","returned","from","the","converted","scikit","KNeighborsClassifier"]
code: def validate_float_samples(self, spec, expected):
      """Validate the float samples returned from the converted scikit KNeighborsClassifier"""
      num_dimensions = (
          spec.kNearestNeighborsClassifier.nearestNeighborsIndex.numberOfDimensions
      )
      for index, sample in enumerate(
          spec.kNearestNeighborsClassifier.nearestNeighborsIndex.floatSamples
      ):
          for dim in range(0, num_dimensions):
              self.assertAlmostEqual(
                  sample.vector[dim], expected[index][dim], places=6
              )
  
file_path: turicreate/src/external/coremltools_wrap/coremltools/coremltools/test/sklearn_tests/test_k_neighbors_classifier.py
imports: import unittest
  import numpy
  from scipy import sparse
  from coremltools._deps import _HAS_SKLEARN
label_desc: Use image node_id 14 for calling the KNeighborsClassifierScikitTest obj's underlying member method code with example usage: obj.validate_float_samples(spec, expected) without return types