function [result] = CGM_predict(prob, model)
%%do prediction
%require prob.X_te and prob.y_te
for j = 1:size(prob.X_te,1)
     x_inst = prob.X_te(j,:);
     [y_infer]= predict_most_vialated_feature_mapping_v1(prob, model.G, model.w, x_inst);
     y_pred(j,:) = y_infer;
end
%compute various measures
[HammingLoss, Macro_F1, Micro_F1, Macro_Precision, Micro_Precision,  Macro_Recall, Micro_Recall, F_all, Precision_all, Recall_all] = compute_measures(y_pred, prob.y_te);
result.HammingLoss(1) = HammingLoss;
result.Macro_F1(1) = Macro_F1;
result.Micro_F1(1) = Micro_F1;
result.Precision_all(1) = max(Precision_all,Macro_Precision);
result.Recall_all(1) = Macro_Recall;