To Compile the file: 

1) In this folder, run 'make' in MATLAB
2) Go to the "../libsvm-nobias-3.14/matlab" folder, run 'make' in MATLAB
3) Go to the "../liblinear-1.96/matlab" folder, run 'make' in MATLAB
4) Go to the "../../../LinearSVM" folder, run 
     gcc predict_liblinear.c -o predict_liblinear -lm  

For the usage of DCPred++, please check the following four examples: 

demo_a9a.m
demo_letter.m
demo_usps.m
demo_covtype.m

For plotting the prediction time vs accuracy curve, please check the following exapmles: 

demo_a9a_curve.m
demo_letter_curve.m
demo_usps_curve.m
demo_covtype_curve.m

Main functions: 

dcpred_model = dcpred_train(ytrain, Xtrain, levels, gamma, C, ratio, ratio_clustering)
%   Usage:
%
%   [model] = dcpred_train(trainy, trainX, levels, gamma, c)
%   
%   Input Arguments: 
%         trainy -- training labels (n by 1 double array)
%         trainX -- training samples (n by d "sparse" double array)
%         levels -- number of hierarchical levels
%         gamma -- gamma in RBF kernel
%         c -- the penalty in kernel SVM
%         ratio -- the ratio of landmark points (optional)
%         ratio_clustering -- the smallest clustering size (optional)
%
%   Output Aruments: 
%         dcpred_model -- the structure contains: 
%               dcpred_model.hyperplanes: the clustering hyperplanes (with shifts)
%               dcpred_model.num_map: the number of inner products for each cluster
%               dcpred_model.landmarks{i}: the landmark points for the i-th cluster
%               dcpred_model.quad{i}:  the quadratic spanning terms in the i-th cluster
%               dcpred_model.w{i}: the linear SVM model
%               dcpred_model.isoneclass{i}: 1000--two classes
%               dcpred_model.levels 

function [labels] = dcpred_predict(y, X, dcpred_model, gamma)
%
%    Usage:
%
%    [labels] = dcpred_predict(X, dcpred_model, gamma)
%

