%%%% for HCC
times = 100;
acc = zeros(times,1);
for ii = 1:times
    mdata = importdata('HCCidemodscore.txt');
    ndata = zscore(mdata');
    data = ndata';
    Xlab = importdata('HCClabel.txt');
    cp = cvpartition(Xlab,'kfold',5);
    dtClassFun = @(xtrain,ytrain,xtest)(eval(classregtree(xtrain,ytrain),xtest));
    dtCVErr  = crossval('mcr',data',Xlab', ...
          'predfun', dtClassFun,'partition',cp);
    acc(ii) = 1-dtCVErr;
end
ac = mean(acc)  %%  0.6213


%%%% for Breast Cancer
times = 100;
acc = zeros(times,1);
for ii = 1:times
    mdata = importdata('BreastCanceridemodscore.txt');
    ndata = zscore(mdata');
    data = ndata';
    Xlab = importdata('BreastCancerlabel.txt');
    cp = cvpartition(Xlab,'kfold',5);
    dtClassFun = @(xtrain,ytrain,xtest)(eval(classregtree(xtrain,ytrain),xtest));
    dtCVErr  = crossval('mcr',data',Xlab', ...
          'predfun', dtClassFun,'partition',cp);
    acc(ii) = 1-dtCVErr;
end
ac = mean(acc)  %%   0.5350
