knnclass.m~

来自「支持向量机工具箱」· M~ 代码 · 共 24 行

M~
24
字号
function [class] = knnclass(tst,X,I,K)% [class] = knnclass(tst,X,I,K)%% KNNCLASS is an implementation of K-Nearest Neighbours %  classifier. The Euclidean distance is used.%% Input:%  tst [DxNtst] Ntst testing patterns.%  X [D,Ntrn] Ntrn training points of dimension D.%  I [1,Ntrn] Ntrn labels of the training points.%  K [1x1] number of nearest neighbours.%% Output:%  class [1xNtst] estimated class labels for each testing pattern.%% Statistical Pattern Recognition Toolbox, Vojtech Franc, Vaclav Hlavac% (c) Czech Technical University Prague, http://cmp.felk.cvut.cz% Written Vojtech Franc (diploma thesis)% Modifications% 26-feb-2001 V.Franc

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?