private void createIG(List<Instance> instances, Mean mean){
        if(instances==null||mean==null) return;
        for(Instance instance : instances){
            if(instance.getLabel().toString().equalsIgnoreCase("1")){
                this._pY.update(1,1);
                Iterator<Integer> it = mean.getKeys();
                while(it.hasNext()){
                    int key = it.next();
                    double value = instance.getFeatureVector().get(key);
                    Probabilities pX = getProb(key, this._pXs);
                    ConditionalProbabilities pYByX = getConditionalProb(key, this._pYByXs);{
                        if(value>=mean.getMean(key)) {
                            pX.update(1,1);
                            pYByX.update(1, 1, 1);
                        }else{
                            pX.update(0,1);
                            pYByX.update(1,0,1);
                        }
                    }
                }
            }else {
                this._pY.update(0,1);
                Iterator<Integer> it = mean.getKeys();
                while(it.hasNext()){
                    int key = it.next();
                    double value = instance.getFeatureVector().get(key);
                    Probabilities pX = getProb(key, this._pXs);
                    ConditionalProbabilities pYByX = getConditionalProb(key, this._pYByXs);{
                        if(value>=mean.getMean(key)) {
                            pX.update(1,1);
                            pYByX.update(0,1,1);
                        }else{
                            pX.update(0,1);
                            pYByX.update(0, 0, 1);
                        }
                    }
                }
            }
        }
        Iterator<Integer> it = this._pXs.keySet().iterator();
        while(it.hasNext()){
            int key = it.next();
            this._IGs.put(key, InformationGain.gain(this._pXs.get(key), this._pY, this._pYByXs.get(key)));
        }
    }