private static double[] convertConfidenceToProbability(double y[],double confidences[]){
  double p[]=new double[confidences.length];
  for (int j=0; j < confidences.length; j++) {
    p[j]=confidences[j] * y[j] + (1. - confidences[j]) * Math.abs(y[j] - 1.);
  }
  return p;
}

private static double [ ] convertConfidenceToProbability ( double y [ ] , double confidences [ ] ) { double p [ ] = new double [ confidences . length ] ; for ( int j = 0 ; j < confidences . length ; j ++ ) { p [ j ] = confidences [ j ] * y [ j ] + ( 1. - confidences [ j ] ) * Math . abs ( y [ j ] - 1. ) ; } return p ; }
return multi - label probabilities . where p ( y_j = y [ j ] ) = confidence [ j ] , then return [ p ( y_j = 1 ) , . . . , p ( y_l = 1 ) ] .
