The Altair Community is migrating to a new platform to provide a better experience for you. In preparation for the migration, the Altair Community is on read-only mode from October 28 - November 6, 2024. Technical support via cases will continue to work as is. For any urgent requests from Students/Faculty members, please submit the form linked here
Doubt on results of k-Nearest Neighbors
Hi All,
I am running "04_NearestNeighbors" sample process (I have set k=2), the results show as below.
----------------------------------------------------
KNNClassification
2-Nearest Neighbour model for classification. The model contains 150 examples with 4 dimensions of the following classes:
Iris-setosa
Iris-versicolor
Iris-virginica
----------------------------------------------------
In-spite of setting k=2, it is not classifying category into two. Whatever number is assigned to k, the result remains same. Is there separate configuration for this algorithm?
Because as per the algorithm (http://en.wikipedia.org/wiki/K-nearest_neighbor_algorithm), it has to classify the items based on the distance.
Kindly clarify.
Thanks,
Best,
Veeranna Ronad.
I am running "04_NearestNeighbors" sample process (I have set k=2), the results show as below.
----------------------------------------------------
KNNClassification
2-Nearest Neighbour model for classification. The model contains 150 examples with 4 dimensions of the following classes:
Iris-setosa
Iris-versicolor
Iris-virginica
----------------------------------------------------
In-spite of setting k=2, it is not classifying category into two. Whatever number is assigned to k, the result remains same. Is there separate configuration for this algorithm?
Because as per the algorithm (http://en.wikipedia.org/wiki/K-nearest_neighbor_algorithm), it has to classify the items based on the distance.
Kindly clarify.
Thanks,
Best,
Veeranna Ronad.
0
Answers
Does the results change when the seed of a random generator is changed?
radone
I hope "seed of a random generator" means the value of 'k'. Yes, the result is not changing.
Thanks,
Best,
Veranna Ronad.