#' Got the reliable negative set.
#' @param dataset  The data input as a data frame
#' @param kfold  an integer for the number of folds
#' @param K  the number of the negatives
#' @param N  the times of randomly selecting   
#' @param fmla  an object of class : a symbolic description of the model to be fitted 
#' @seealso \code{\link{formula}} for details
#' \code{\link{mean_AUC}} which this function wraps.
#' @export
RN<-function(dataset=mmu_feature,kfold,fmla,N,K){

maxauc=0.5;

positive = dataset[dataset$Y==1, ]

unlabel = dataset[dataset$Y==0, ] 

num_unlabel = nrow(unlabel) 

RNlabel = sample(1:num_unlabel, K, replace = FALSE)

for(roll in 1:N)
{
  b = sample(1:num_unlabel, K, replace = FALSE)
  
  PN = unlabel[b,]
  
  data = rbind(positive,PN)
  
  avgAUC = mean_AUC(data,kfold,fmla);
  
  
  if(avgAUC > maxauc)
  {  maxauc = avgAUC
  RNlabel = b
  }
  
}

RN = unlabel[RNlabel,]
return (RN)
}





