您现在的位置:首页 >> ★免费资源 >> 源码下载 >> 内容

MATLAB代做-python代做-FPGA代做- 八分类器

时间:2019-6-1 3:43:20 点击:

  核心提示: 八分类器...
load tezheng.mat;
 wine_labels=[1;1;1;1;1;1;1;1;1;2;2;2;2;2;2;2;2;2;3;3;3;3;3;3;3;3;3;4;4;4;4;4;4;4;4;4;5;5;5;5;5;5;5;5;5;6;6;6;6;6;6;6;6;6;7;7;7;7;7;7;7;7;7;8;8;8;8;8;8;8;8;8];
 train_wine = [tezheng(1:6,:);tezheng(10:15,:);tezheng(19:24,:);tezheng(28:33,:);tezheng(37:42,:);tezheng(46:51,:);tezheng(55:60,:);tezheng(64:69,:)];
train_wine_labels = [wine_labels(1:6);wine_labels(10:15);wine_labels(19:24);wine_labels(28:33);wine_labels(37:42);wine_labels(46:51);wine_labels(55:60);wine_labels(64:69)];

test_wine = [tezheng(7:9,:);tezheng(16:18,:);tezheng(25:27,:);tezheng(34:36,:);tezheng(43:45,:);tezheng(52:54,:);tezheng(61:63,:);tezheng(70:72,:)];
test_wine_labels = [wine_labels(7:9);wine_labels(16:18);wine_labels(25:27);wine_labels(34:36);wine_labels(43:45);wine_labels(52:54);wine_labels(61:63);wine_labels(70:72)];

[train_wine,pstrain] = mapminmax(train_wine');        
pstrain.ymin =0;
pstrain.ymax = 1;
[train_wine,pstrain] = mapminmax(train_wine,pstrain);
[test_wine,pstest] = mapminmax(test_wine');
pstest.ymin = 0;
pstest.ymax = 1;
[test_wine,pstest] = mapminmax(test_wine,pstest);
train_wine = train_wine';
test_wine = test_wine';

[bestacc,bestc,bestg] = SVMcg(train_wine_labels,train_wine,-5,5,-5,5,8,1,1,1.5);
cmd = ['-c ',num2str(bestc),' -g ',num2str(bestg)];
model = svmtrain(train_wine_labels,train_wine,cmd);
[pre,acc] = svmpredict(test_wine_labels,test_wine,model);

联系:highspeedlogic

QQ :1224848052

微信:HuangL1121

邮箱:1224848052@qq.com

网站:http://www.mat7lab.com/

网站:http://www.hslogic.com/

微信扫一扫:

作者:八分类器 来源:八分类器
  • 您是如何找到本站的?
  • 百度搜索
  • Google搜索
  • 查阅资料过程中
  • 论坛发现
  • 百度贴吧发现
  • 朋友介绍
本站最新成功开发工程项目案例
相关文章
  • 没有相关文章
相关评论
发表我的评论
  • 大名:
  • 内容:
  • matlab代做|matlab专业代做|matlab淘宝代做(www.hslogic.com) © 2019 版权所有 All Rights Reserved.
  • Email:highspeed_logic@163.com 站长QQ: 1224848052

    专业代做/代写/承接、MATLAB、SIMULINK、FPGA项目、博士/硕士/本科毕业设计、课题设计、论文,毕业论文,Coursework、Eassy、Assignment