docs: public Instance filterInstance(Instance inst){
          for (int i = 0; i < inst.numAttributes(); i++) {
              double noiseFrac = i == inst.classIndex() ? this.classNoiseFractionOption.getValue()
                      : this.attNoiseFractionOption.getValue();
              if (inst.attribute(i).isNominal()) {
                  DoubleVector obs = (DoubleVector) this.attValObservers.get(i);
                  if (obs == null) {
                      obs = new DoubleVector();
                      this.attValObservers.set(i, obs);
                  }
                  int originalVal = (int) inst.value(i);
                  if (!inst.isMissing(i)) {
                      obs.addToValue(originalVal, inst.weight());
                  }
                  if ((this.random.nextDouble() < noiseFrac)
                          && (obs.numNonZeroEntries() > 1)) {
                      do {
                          inst.setValue(i, this.random.nextInt(obs.numValues()));
                      } while (((int) inst.value(i) == originalVal)
                              || (obs.getValue((int) inst.value(i)) == 0.0));
                  }
              } else {
                  GaussianEstimator obs = (GaussianEstimator) this.attValObservers.get(i);
                  if (obs == null) {
                      obs = new GaussianEstimator();
                      this.attValObservers.set(i, obs);
                  }
                  obs.addObservation(inst.value(i), inst.weight());
                  inst.setValue(i, inst.value(i) + this.random.nextGaussian()
                          * obs.getStdDev() * noiseFrac);
              }
          }
          //return new InstanceExample(inst);
          return inst;
      }