Re: [请益] "too many ties in knn"

楼主: brooky (未够班)   2006-05-28 21:38:20
※ 引述《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?

Links booklink

Contact Us: admin [ a t ] ucptt.com