⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 testdich.m

📁 四种支持向量机用于函数拟合与模式识别的Matlab示例程序
💻 M
字号:
function [X,I,alpha,theta] = testdich( dim, datanum )% TESTDICH randomly creates test examples for dichotomy problem.%  [X,I] = testgidich( dim, datanum )%% TESTDICH creats test data randomly for the algorithms which try %  to split two finite point sets by a hyperplane (e.g. Perceptron-like%  algorithms). The created data are linearly separable. % % Input:%  dim [1x1] dimension of generated data.%  datanum [1x1] number of generated data (size of the test set).%% Output:%  X [dim x datanum] contains generated test points.%  I [1 x datanum] contains labnels of test points (1 or 2).%  alpha [dim x 1] a normal vector of the hyperplane which correctly %      splits test data.%  theta [1x1] a threshold of the hyperplane.%% See also%   TESTANDR, PERCEPTR, KOZINEC, EKOZINEC, LINSVM%% 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.FrancX = 2*rand(dim, datanum )-1;I= zeros(1,datanum);alpha = 2*rand(dim,1)-1;theta = rand(1);I=linclass(X,alpha,0);X = X + theta/sum(alpha);

⌨️ 快捷键说明

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