[tengzhenzhen15@lu01 gpor]$ for ((i=0; i<=19; i++)) do ./gpor -S 0.4 X4058_300_gpor/mytask_train.$((i)); done

  

[yuanhao15@lu01 gpor]$ ./svorex -P 1 -F 1 -Z 0 -Co 10 ../svorim/X4058_300_im/mytask_train.0

[tengzhenzhen15@lu01 gpor]$ ./gpor -S 0.4 X4058_300_gpor/mytask_train.0

  

% load pyrim
% NumTrain = 50; % load machine
%NumTrain = 150; % load housing
% NumTrain = 300; % load abalone
% NumTrain = 1000; % load bank32nh
% NumTrain = 3000; % load cpuact
% NumTrain = 4000; % load calhousing
% NumTrain = 5000; % load census
% NumTrain = 6000; load X4058
NumTrainforScaling = [300,400] ;
% name='X4058_300_im'
name='X4058_300_gpor' i=1; % path= 'C:\Users\hd\Desktop\'
path= 'G:\'; NumTrain = NumTrainforScaling(i);
% X0=[X,y];
% n0 = size(X0,2);
% X0 = sortrows(X0,n0);
% X = X0(:,1:end-1);
% y = X0(:,end); for k = 1:20
n = size(X,1);
NumTest = n - NumTrain;
id = id0(k,:); traindata = X(id(1:NumTrain),:);
targets = y(id(1:NumTrain));
TestData = X(id(NumTrain+1:n),:);
TestTargets = y(id(NumTrain+1:n)); X1=[traindata,targets];
n0 = size(X1,2);
X1 = sortrows(X1,n0); fname1 = strcat(path,name,'\mytask_train.',num2str(k-1));
fname2 = strcat(path,name,'\mytask_test.',num2str(k-1));
fname3 = strcat(path,name,'\mytask_targets.',num2str(k-1)); % libsvmwrite(fname1, targets, sparse(traindata));
% libsvmwrite(fname2, TestTargets, sparse(TestData));
fname4 = strcat('E:\MATLAB\R2015a\bin\ADMM\CalOutData\mytask_targets.',num2str(k-1)); save(fname1,'X1','-ascii')
save(fname2,'TestData','-ascii')
save(fname3,'TestTargets','-ascii')
save(fname4,'TestTargets','-ascii')
end % load calhousing
% NumTrainforScaling = [300,400] ;
%
% i=1;
% NumTrain = NumTrainforScaling(i);
% for k=1:20
% k=i;
% % for k = 1:10
% n = size(X,1);
% NumTest = n - NumTrain;
% % id = randperm(n);
% id = id0(k,:);
% traindata = X(id(1:NumTrain),:);
% targets = y(id(1:NumTrain));
% TestData = X(id(NumTrain+1:n),:);
% TestTargets = y(id(NumTrain+1:n));
%
% % X1=[traindata,targets];
%
% % fname1 = strcat('C:\Users\hd\Desktop\machine\mytask_train.',num2str(k-1));
% % fname2 = strcat('C:\Users\hd\Desktop\machine\mytask_test.',num2str(k-1));
%
% % fname1 = strcat('C:\Users\hd\Desktop\housing\mytask_train.',num2str(k-1));
% % fname2 = strcat('C:\Users\hd\Desktop\housing\mytask_test.',num2str(k-1));
%
% % fname1 = strcat('C:\Users\hd\Desktop\abalone\mytask_train.',num2str(k-1));
% % fname2 = strcat('C:\Users\hd\Desktop\abalone\mytask_test.',num2str(k-1));
%
% % fname1 = strcat('C:\Users\hd\Desktop\bank32nh\mytask_train.',num2str(k-1));
% % fname2 = strcat('C:\Users\hd\Desktop\bank32nh\mytask_test.',num2str(k-1));
%
% % fname1 = strcat('C:\Users\hd\Desktop\cpuact\mytask_train.',num2str(k-1));
% % fname2 = strcat('C:\Users\hd\Desktop\cpuact\mytask_test.',num2str(k-1));
%
% % fname1 = strcat('C:\Users\hd\Desktop\calhousing\mytask_train.',num2str(k-1));
% % fname2 = strcat('C:\Users\hd\Desktop\calhousing\mytask_test.',num2str(k-1));
%
% % fname1 = strcat('C:\Users\hd\Desktop\census\mytask_train.',num2str(k-1));
% % fname2 = strcat('C:\Users\hd\Desktop\census\mytask_test.',num2str(k-1));
%
% fname1 = strcat('C:\Users\hd\Desktop\',name,'\mytask_train.',num2str(k-1));
% fname2 = strcat('C:\Users\hd\Desktop\',name,'\mytask_test.',num2str(k-1));
% libsvmwrite(fname1, targets, sparse(traindata));
% libsvmwrite(fname2, TestTargets, sparse(TestData));
%
%
% % save(fname1,'X1','-ascii')
% % save(fname2,'TestData','-ascii')
% % save(fname3,'TestTargets','-ascii')
%
% % libsvmwrite(fname1, targets, sparse(traindata));
% % libsvmwrite(fname2, TestTargets, sparse(TestData));

  

clear
Acc=[]; AbsAcc=[];
for k =1:20
fname1 = strcat('E:\MATLAB\R2015a\bin\ADMM\CalOutData\mytask_targets.',num2str(k-1));
% fname2 = strcat('E:\MATLAB\R2015a\bin\ADMM\CalOutData\output_file.',num2str(k-1));
fname2 = strcat('E:\MATLAB\R2015a\bin\ADMM\CalOutData\mytask_cguess.',num2str(k-1));
PredYi=textread(fname1);
Yi=textread(fname2);
D=PredYi-Yi;
TrueD = D;
TrueD(abs(TrueD)>0,1)=1;
Error(k) = mean(TrueD);
AbsErr(k) = mean(abs(D));
end

  

[tengzhenzhen15@lu01 gpor]$ for ((i=0; i<=19; i++)) do ./gpor -S 0.4 pyrim/mytask_train.$((i)); done

[tengzhenzhen15@lu01 gpor]$ for ((i=0; i<=19; i++)) do ./gpor machine/mytask_train.$((i)); done

[tengzhenzhen15@lu01 gpor]$ for ((i=0; i<=19; i++)) do ./gpor housing/mytask_train.$((i)); done

  

GPOR的更多相关文章

  1. nodejs+edatagrid读取本地excel表格

     

  2. Wilcoxon test

    clear load NPSVOR name={'SCV1V1','SVC1VA','SVR','CSSVC','SVMOP','NNOP','ELMOP','POM',... 'NNPOM', 'S ...

  3. plot a critical difference diagram , MATLAB code

    plot a critical difference diagram , MATLAB code 建立criticaldifference函数 function cd = criticaldiffer ...

  4. DataOdinalRegression

    clear name={'SCV1V1','SVC1VA','SVR','CSSVC','SVMOP','NNOP','ELMOP','GPOR','KDLOR','POM',... 'NNPOM', ...

随机推荐

  1. 使用escape编码地址栏中的中文字符

    在通过地址栏传递参数的时候,有时候会遇到中文参数,在获取这种中文参数值得时候, 往往会出现乱码, 解决办法如下: 在传递参数的使用 escape 函数进行编码,获取的时候再进行解码即可. 例如: va ...

  2. CUBRID学习笔记 36 在net中添加多行记录

    using System.Data.Common; using CUBRID.Data.CUBRIDClient; namespace Sample { class Add_MultipleRows ...

  3. 《Linux内核设计的艺术》学习笔记(三)Jcond指令

    参考书籍:<Assembly Language for x86 Processors (7th Edition)> ◆ JMPI指令: JMPI是x86实模式下的段间跳转指令: BOOTS ...

  4. HTML笔记(一)

    HTML注释格式如下: <!-- 这里是注释 --> HTML中的标题(heading)通过h1~h6来定义. 文本格式化标签: 标签 描述 <b> 定义粗体文本. <b ...

  5. HDU1045 Fire Net(DFS)

    题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1045 Fire Net Time Limit: 2000/1000 MS (Java/Others)  ...

  6. 一个js(javascript)使用案例

    <script type="text/javascript"> var Row; $(function () { // $("#Sel").clic ...

  7. Spring对hibernate的事物管理

    把Hibernate用到的数据源Datasource,Hibernate的SessionFactory实例,事务管理器HibernateTransactionManager,都交给Spring管理.一 ...

  8. NTT【51nod】1514 美妙的序列

    题意:1~n 的全排列中,有多少个排列满足任意从中间切成两段后,左边段的最大值大于右边段的最小值? 例如:n为3时有3种 2 3 1 3 1 2 3 2 1 解释:比如 2 3 1 (2) (3 1) ...

  9. Java中HashMap案例

    package ch8; import java.util.*; /** * Created by Jiqing on 2016/11/27. */ public class MapTest { pu ...

  10. Java用WebSocket + tail命令实现Web实时日志

    原文:http://blog.csdn.net/xiao__gui/article/details/50041673 在Linux操作系统中,经常需要查看日志文件的实时输出内容,通常会使用tail - ...