CGM is a simple package for learning a graph and model parameters at the
same time.

******************************************************
Training
******************************************************
For training, main function of CGM is 

function [model] = main_CGM_real_v1(prob, param,  maxiter, doTest)

The parameters are illustrated as follows:
prob.X: n_train*dim training data;
prob.y: n_train*p training label, where p denotes the number of labels \in {0, 1};
prob.X_te: n_test*dim testing data;
prob.y_te: n_test*p testing labels  \in {0, 1};
maxiter: number of maximum iterations for outer iteration, default 5;
param: parameters used in the subproblem optimization;
param.C: default value 1.0;
param.B: number of cliques added per iteration;
param.lambda: default value 0.00001; 
param.max_iter: maximum iterations for the subproblem optimization, default value 40;
param.out_put_loss: output loss or not, default value 1;
param.update_close_form: choose different updating rule, default value 1.
doTest: do prediction for each outer iteration, default 1; if you do not give         testing data, its value will be changed to 0.  

******************************************************
To start, you may run DEMO_EXP_SCENE.m
******************************************************


******************************************************
Prediction
******************************************************
The prediction of CGM can be done by calling function 

[result] = CGM_predict(prob, model)

To do so, you need to specify your testing data, i.e., prob.X_te, prob.y_te

******************************************************
Notice:
******************************************************
CGM require an important package, namely ConstraintMRF, for solving the decoding problem. This package is provided by Zhen Zhang <zzhang@zzhanglaptop>. You may contack him if you had any problems regarding the compiling.



******************************************************
Notification
******************************************************
The current codes are far from optimal ones, and there may have some bugs. If you find bugs or any comments, please kindly email Mingkui Tan <mingkui.tan@adelaide.edu.au>.  
Some future improvements include:
may change the feature mapping for specific applications:
the subproblem solver, i.e. PCD_SSVM, is not good enough for CGM, and I will improve it soon!



