function [hit] = classifier(data1,data2,data3,window_size,n_train,n_test,n_features,noise_level,n_snr_averaging,n_decomp,n_neigh,cumulant_start,cumulant_end)
train_data1 = data1(1:window_size*n_train);
train_data2 = data2(1:window_size*n_train);
train_data3 = data3(1:window_size*n_train);

train_feat1 = feature_extract(train_data1,window_size,n_decomp,cumulant_start,cumulant_end);
train_feat2 = feature_extract(train_data2,window_size,n_decomp,cumulant_start,cumulant_end);
train_feat3 = feature_extract(train_data3,window_size,n_decomp,cumulant_start,cumulant_end);

training = [train_feat1;train_feat2;train_feat3];
group = [ones(n_train,1);zeros(n_train,1);-ones(n_train,1)];

test_data1 = data1(window_size*n_train+1:window_size*(n_train+n_test));
test_data2 = data2(window_size*n_train+1:window_size*(n_train+n_test));
test_data3 = data3(window_size*n_train+1:window_size*(n_train+n_test));

hit = 0;
i = 1;
while(i <= n_snr_averaging)
    ntest_data1 = awgn(test_data1,noise_level,'measured');
    ntest_data2 = awgn(test_data2,noise_level,'measured');
    ntest_data3 = awgn(test_data3,noise_level,'measured');
    
    test_feat1 = feature_extract(ntest_data1,window_size,n_decomp,cumulant_start,cumulant_end);
    test_feat2 = feature_extract(ntest_data2,window_size,n_decomp,cumulant_start,cumulant_end);
    test_feat3 = feature_extract(ntest_data3,window_size,n_decomp,cumulant_start,cumulant_end);
    
    dom_feat_index1 = feature_select(train_feat1,train_feat2,train_feat3,test_feat1,cumulant_start,cumulant_end,n_decomp);
   
    j = 1;
    while(j <= n_test)
        class = knn_classify(test_feat1(j,dom_feat_index1(1:n_features)),train_feat1(:,dom_feat_index1(1:n_features)),train_feat2(:,dom_feat_index1(1:n_features)),train_feat3(:,dom_feat_index1(1:n_features)),n_neigh,n_train);
        if(class == 1)
            hit = hit + 1;
        end
        j = j + 1;
    end
    
    dom_feat_index2 = feature_select(train_feat1,train_feat2,train_feat3,test_feat2,cumulant_start,cumulant_end,n_decomp);
    j = 1;
    while(j <= n_test)
        class = knn_classify(test_feat2(j,dom_feat_index1(1:n_features)),train_feat1(:,dom_feat_index1(1:n_features)),train_feat2(:,dom_feat_index1(1:n_features)),train_feat3(:,dom_feat_index1(1:n_features)),n_neigh,n_train);
        if(class == 0)
            hit = hit + 1;
        end
        j = j + 1;
    end
    
        
    dom_feat_index3 = feature_select(train_feat1,train_feat2,train_feat3,test_feat3,cumulant_start,cumulant_end,n_decomp);
    j = 1;
    while(j <= n_test)
        class = knn_classify(test_feat3(j,dom_feat_index1(1:n_features)),train_feat1(:,dom_feat_index1(1:n_features)),train_feat2(:,dom_feat_index1(1:n_features)),train_feat3(:,dom_feat_index1(1:n_features)),n_neigh,n_train);
        if(class == -1)
            hit = hit + 1;
        end
        j = j + 1;
    end
    i = i + 1;
end
hit = hit/(n_snr_averaging*n_test*3)*100;
end