Hi,
I defined a NearestNeighbors classifier, but it defaults to 2 neighbors. I’m sure there is an obvious way to change the number of neighbors (k)
but I don’t seem to find it.
Any help would be appreciated,
best, Marc
Hi,
I defined a NearestNeighbors classifier, but it defaults to 2 neighbors. I’m sure there is an obvious way to change the number of neighbors (k)
but I don’t seem to find it.
Any help would be appreciated,
best, Marc
OK, just found it,
c = Classify[trainingset, Method->{“NearestNeighbors”, “NeighborsNumber”->1}]
cheers, marc