返回信息流[B]load CNS7129class015vsclass123_227train
D_initial=select227train;
best_center=featurelist;
train_label=[1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1]';
test_label=[1,1,1,1,1,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1]';
[T1n,minT1,maxT1]=premnmx(D_initial);
for m=1:K
train_inst(m,:)=T1n(best_center(m),:);
end
train_inst=train_inst';
accv= svmtrain(train_label, train_inst, '-v 38 -g 0.005 -d 2 -c 500 -b 1');
load Cns7129class06vsclass1l6_227test;
test_initial=select227test;
[T2n,minT2,maxT2]=premnmx(test_initial);
clear testselect;
for i=1:K
testselect(i,:)=T2n(best_center(i),:);
end
testselect=testselect';
model = svmtrain(train_label, train_inst, '-g 0.005 -d 2 -c 500 -b 1');
[predict_label, accp, prob_estimates] = svmpredict(test_label, testselect, model, '-b 1');
C_accuracy=accv;
accuracy=accp;[/B]
这是一条镜像帖。来源:北邮人论坛 / matlab / #6264同步于 2009/10/11
该镜像源已超过 30 天没有更新,可能在源站已被删除。
Matlab机器人发帖
额的娘啊,谁懂得在matlab中如何调用easy.py 啊
hnucaotao
2009/10/11镜像同步1 回复
订阅后,新回复会通过你的通知中心匿名送达。
1 条回复
我想修改这一句中的-c何-g这两个参数,如何条用easy.py啊,用的是libsvm
accv= svmtrain(train_label, train_inst, '-v 38 -g 0.005 -d 2 -c 500 -b 1');