public Double getAttUmbral(int i){
        TreeMap<Integer, List<Double>> attSortedMap = getAttSortedMap(i);
        double gain,maxGain = 0.0,value,bestUmbral = 0.0;
        Map.Entry<Integer, List<Double>> prevEntry = null;

        for( Map.Entry<Integer, List<Double>> entry : attSortedMap.entrySet() )
        {
            if(prevEntry != null)
            {
                value = entry.getValue().get(1);
                if(prevEntry.getValue().get(1) < value)
                {
                    gain = getAttGain(attSortedMap,value);
                    if(gain > maxGain)
                    {
                        maxGain = gain;
                        bestUmbral = value;
                        //System.out.print("Key: "+entry.getKey()+" => Value: "+bestUmbral+", Gain: "+maxGain+'\n');                
                    }
                }
            }
            prevEntry = entry;
        }
        //System.out.print('\n');
        return bestUmbral;
    }