public double pluralityValue(){
        int positiveCases =0;
        int negativeCases =0;

        for( Map.Entry<Integer, List<Double>> entry : trainingSet.entrySet() )
        {
            if(entry.getValue().get(0) == positiveClass)  //Clase positiva
                positiveCases++;
            else
                negativeCases++;
        }
        
        if(negativeCases <= positiveCases)
            return positiveClass;
        else
            return negativeClass;
    }