%DEMO This is an examplar file on how the MLFE program could be used 
%The main function is "MLFE_train.m" and "MLFE_test.m"
%
%
% Copyright: Qian-Wen Zhang (cowenzhang@tencent.com,zhangqw@seu.edu.cn),
%   Yun Zhong(zeuszhong@tencent.com),
%   Min-Ling Zhang (mlzhang@seu.edu.cn)
%   Tencent SPPD, Chengdu 610041, China  &&
%   School of Computer Science and Engineering, Southeast University,
%   Nanjing 211189, China
%

% Loading the file containing the necessary inputs for calling the MLFE function
load 'sample data'

% Set parameters for the MLFE algorithm
para.tol  = 1e-5; %tolerance
para.epsi = 0.001; %threshold paramenter, more than epsi should be penalized
para.beta1    =2;  %penalty parameter                  
para.beta2    =10; 
para.beta3    =1;
para.ker  = 'rbf'; %type of kernel function
para.par  =1*mean(pdist(train_data)); %kernel parameter
C.c1=1; %control parameters
C.c2=2;

% Calling the main functions
model = MLFE_train(train_data,train_target',para,C);
[OneError,Coverage,RankingLoss,Average_Precision,MacF1,MicF1,Outputs,Pre_Labels] = MLFE_test(test_data, train_data,test_target, model);



