buildBbas <- function (S,mat_conf,alpha,model){
  # 	S: vector (N,1) of the finding set labels
  #   mat_conf: the confusion matrix estimated on learning data
  #   alpha: discounting coefficient
  
  #   bbas for each finding labels 
  #                    matrix 2^nbclasses lines
  #                            N columns
  
  source("./bba_type.r")
  mat_masse= bba_type(mat_conf,alpha,model)
  N=length(S);
  
  bbas=matrix(0,2^dim(mat_conf)[1],N)
  for (j in 1:N){
    bbas[,j]=mat_masse[,S[j]]
  }
    
  return (bbas)
}
