6
$\begingroup$

Issue not present in version "10.4.1 for Linux x86 (64-bit) (April 11, 2016)"


trainingset = {"A" -> 1, "B" -> 4, "C" -> 6};
classifier = 
 Classify[trainingset, 
  Method -> {"NearestNeighbors", "NeighborsNumber" -> 5, 
    "DistanceFunction" -> CosineDistance}]

I'm getting the message

Unknown option "DistanceFunction" in Classify

However, when I evaluate

ClassifierInformation[classifier, "Properties"]

I see "DistanceFunction" in the list of properties returned.

I see the same thing in the OpenCV toolbox. In KnearestNeighbors function, I can not change the DistanceFunction despite Euclidean distance not being the best choice, specially with big data.

$\endgroup$
1
  • 1
    $\begingroup$ It seems that is a bug in the Classify function $\endgroup$ Jan 15, 2016 at 22:20

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.