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

댓글을 달려면 로그인하십시오.

답변 (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.

카테고리

Help CenterFile Exchange에서 Matrix Indexing에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by