knn_belief_fusion <- function (train,trainLabel,test,trueLabel,k){

# Belief K-NN classifier
  
  source("./paramperf.r")
  source("./EKNN.r")
  source("./knndsinit.r")
   
  
   init<-knndsinit(train, trainLabel)
   re <- EKNN(train, trainLabel, k, init$para_gamma, init$para_alpha, test_method=0, test)
   
   
   restest=rbind(trueLabel ,foundLabel=re$predictLabel)
   
   res<-paramperf(restest)
 
   return (list(foundLabel=re$predictLabel,matr_conf=res[1] ,vect_prob_classif=res[2],vect_prob_erreur=res[3],matr_sort_classif=t(re$predictMass))) 
 }
 