How to solve this problem in matlab??

1 回表示 (過去 30 日間)
Aanqq
Aanqq 2020 年 12 月 12 日
編集済み: Aanqq 2020 年 12 月 13 日
1. Download the data file. The last value in each row contains the target label for that row, and the remaining values are the features. Split the data into 10 approximately equally-sized "folds".
  3 件のコメント
Walter Roberson
Walter Roberson 2020 年 12 月 12 日

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

回答 (1 件)

Image Analyst
Image Analyst 2020 年 12 月 12 日
Hints:
For 2:
X = rescale(X, 0, 1);
For 4
K = 1:2:15
for index = 1 : length(K)
thisk = K(index);
% Call knnsearch()
% Compute accuracy
for index2 = 1 : length(X)
accuracy(index) = ......whatever
end
end
plot(K, accuracy, 'b.', 'LineWidth', 2, 'MarkerSize', 20)
You can finish it if you look up knnsearch() and figure out what it does.
  1 件のコメント
Aanqq
Aanqq 2020 年 12 月 12 日
Thank you so much

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

カテゴリ

Help Center および File ExchangeMatrix Indexing についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by