how can i implement knn algorithm without using matlab built in knnsearch etc

3 ビュー (過去 30 日間)
maryam
maryam 2014 年 2 月 22 日
コメント済み: Walter Roberson 2014 年 2 月 25 日
I have a data in struct form.
X 1x1 22528528 struct
y 1x1 88528 struct
X.devel 256*4000
X.test 256*2000
X.train 256*5000
how can I convert struct into double and then how implent knn on it

回答 (1 件)

Walter Roberson
Walter Roberson 2014 年 2 月 22 日
result = YourKNNFunction(X.devel)
where YourKNNFunction is a function you write. (One presumes that if you know you need to use KNN then you have an article describing what KNN is intended to do.)
  2 件のコメント
maryam
maryam 2014 年 2 月 25 日
I need to know will I use X.train with y.train and X.devel with Y.devel and so on
Walter Roberson
Walter Roberson 2014 年 2 月 25 日
Yes.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeStatistics and Machine Learning Toolbox についてさらに検索

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by