function result = run_LEAD(X,Label,train_sq,test_sq,address)
prob.num_label = size(Label,2);
prob.Dim = size(X,2);%size(X,2)
svm.type='Linear';
svm.para=[];  
for i=1:5
    param.lambda = 0.0001;
    % Calling the main function LEAD
    prob.X = X(train_sq{i},1:prob.Dim);
    prob.y = Label(train_sq{i},:);
    prob.X_te = X(test_sq{i},1:prob.Dim);
    prob.y_te = Label(test_sq{i},:);
    prob.num_inst = size(prob.X,1);
    prob.num_inst_te = size(prob.X_te,1);
    DAG = generate_DAG_for_LEAD(prob.y);

    [HammingLoss,RankingLoss,OneError,Coverage,Average_Precision,Outputs,Pre_Labels]=LEAD(prob.X,prob.y',prob.X_te,prob.y_te',DAG,svm);
    [HammingLoss, Macro_F1, Micro_F1, Macro_Precision, Micro_Precision,  Macro_Recall, Micro_Recall, F_all, Precision_all, Recall_all] = compute_measures(Pre_Labels', prob.y_te);
    result.HammingLoss(i) = HammingLoss
    result.Macro_F1(i) = Macro_F1;
    result.Micro_F1(i) = Micro_F1;
    result.Precision_all(i) = Precision_all;
    result.Recall_all(i) = Recall_all;
    save(address,'result');
end

result.mean_HammingLoss = mean(result.HammingLoss);
result.mean_Macro_F1 = mean(result.Macro_F1);
result.mean_Micro_F1 = mean(result.Micro_F1);
result.mean_Precision_all = mean(result.Precision_all);
result.mean_Recall_all = mean(result.Recall_all);

result.std_HammingLoss = std(result.HammingLoss);
result.std_Macro_F1 = std(result.Macro_F1);
result.std_Micro_F1 = std(result.Micro_F1);
result.std_Precision_all = std(result.Precision_all);
result.std_Recall_all = std(result.Recall_all);
save(address,'result');