StepclassV2
逐步判别分析的主函数
用于分类
[sel,c,c0,re,P]=StepclaassV2(data,[50 50 50],data,10)
输入变量
x为训练集.每行为一个样本,每列为一个变量.
Class_x,为训练集的分类情况,一行,为各类样本数量,例如[5 6 9]
Test为待分类样本.
输出变量:sel为选择的变量序号,c,c0为拟合出的判别函数.re为对Test的判别结果,P为其后验概率.
author 王新 2012.4.8
例子Sample:
load fisheriris
x=meas
Class_x=[50,50,50]
Test=meas(1:5,:)
Fa1=4
[sel,c,c0,re,P]=StepclaassV2(x,Class_x,Test,Fa1)( Stepwise discriminant analysis for the classification of the main function [sel, c, c0, re, P] = StepclaassV2 (data, [50 50 50], data, 10) input variables x as the training set, each conduct a sample of each as a variable. Class_x, the classification for the training set, a row, the number of samples for all types, for example, [5 6 9] Test sample to be classified. output variable: sel for the selected variables serial number, c, c0 is fitted discriminant function. re discrimination results for the Test, P its posterior probability. author Wang 2012.4.8 examples Sample: load fisheriris x = meas Class_x = [50,50,50] Test = meas (1:5, :) Fa1 = 4 [sel, c, c0, re, P] = StepclaassV2 (x, Class_x, Test, Fa1))
- 2020-09-18 12:27:56下载
- 积分:1
15883873p42222
说明: 创建一个复数类,定义属性:实部、虚部。定义方法:复数加法、复数减法、复数乘法、求实部,求虚部,将复数输出,判断两个复数相等。通过一个类举例验证这些方法(Create a complex number class, custom attributes: the real part, imaginary part. Definition method: complex addition, complex subtraction, multiplication, complex, realistic Department, seeking the imaginary part, the complex output, determine the two complex numbers are equal. Verified through a class example of these methods)
- 2010-04-06 09:11:17下载
- 积分:1