gda_iris.m

来自「通过核来泛化的判别分析(GDA)代码」· M 代码 · 共 40 行

M
40
字号
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Example of the GDA using the Fisher's iris data %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% This file provides information for using the GDA MatLab code.
% Designed under MatLab for Windows version 5.2.0.3084
%
%
% Need the following files (must be known by MatLab, see File/Set Path ...):
%
% General purpose:
%
%  KernelFunction.m	The kernel current function.
%	EigenSystem.m		Evaluate and sort the eigen values and vectors.
%	DataSt.m				Center and normalize the data.
%	Iris.m				The Fisher's iris data (3 x 50 samples / 4 variables)
%
%	GDA specific:
%
%	BuildGDA.m			Build the GDA solution (give a data structure)
%	SpreadGDA.m			Spread test vectors into the GDA discriminant subspace.
%	PlotGDA.m			Plot data into one, or two, discriminant axes.

% Gaston Baudat & Fatiha Anouar / 21st October 2000 / Exton PA 19341 USA


% Begin

%   Build the GDA solution

Iris;														% Load the raw iris data
IrisData=DataSt(IrisData);							% Mean = 0, Standard Deviation = 1

dataGDA=BuildGDA(IrisData,[50,50,50]);			% Build GDA solution

%   2D plot of the whole data (1st and 2nd axis)

PlotGDA(IrisData,IrisData,dataGDA,[1,2],'+')	% PlotGDA uses SpreadGDA, see inside for more

% End

⌨️ 快捷键说明

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