※ 引述《brooky (未夠班)》之銘言:
: When trying to use knn, I get a error message like below,
: ## 錯誤在knn(train.data, validation.data, cl, use.all = FALSE) :
: ## too many ties in knn
: ## try using test data to see if that is because training data has
: ## too many similar instances
: where "train.data" is my training data and "validation.data" is the data I
: used for validation.
: My question is, does that means there are too many similar instances
: in training instances?
: Did anyone ever get into this problem?
: Any suggestion would be appreciated.
: Thanks.
The code I used is like below,
test.predicted.1000 <- knn( kdd.train.trans[, 1:trans_col_num],
kdd.test.50000.00.trans[1:1000, 1:trans_col_num], cl));
I found that when the testing instance is small,
ex: smaller than 300, this line is ok.
But when the testing instance get bigger, "too many ties in knn"
show up again.
Any suggestion?