摘要: function [y,predict_class] = f_knn(tr,tr_memberships,te,k)%% FUZZY KNN classification%% [y,predict_class] = f_knn(tr,tr_memberships,te,k)%% tr: a NxD-matrix where N is the number of training samples% and D is the dimension of the feature space. Each row is % the representation of a training sample.% 阅读全文
posted @ 2011-06-30 15:46 hailong 阅读(539) 评论(0) 推荐(0) 编辑
摘要: Posted By Mr. Thursday 各位看到標題,如果沒有聽過KNN演算法,會不會覺得疑惑:KNN是甚麼呢?是不是CNN看久了,就變成DNN、ENN、最後變成KNN了呢?當然不是啦 XD!KNN全名是k-th nearest neighbor,中文意思是「第k位最接近的鄰居」。甚麼是「第k位最接近的鄰居」呢?假設在一個廣場上,有100個朋友,每位朋友都是你的鄰居,最接近你的鄰居,就是「第一位距離最近的鄰居」了,比第一位稍微遠一點的鄰居,就是「第二位距離最近的鄰居」了,以此類推,第10位距離最近的鄰居,就是k=10的時候了。至於KNN演算法是甚麼,又有甚麼特別呢?之前提過了「人工智慧與 阅读全文
posted @ 2011-06-30 10:27 hailong 阅读(766) 评论(0) 推荐(0) 编辑