code: public static RegressionDataSet getWeightSampledDataSet(RegressionDataSet dataSet, int[] sampledCounts)
      {
          RegressionDataSet destination = new RegressionDataSet(dataSet.getNumNumericalVars(), dataSet.getCategories());
  
          for (int i = 0; i < sampledCounts.length; i++)
          {
              if(sampledCounts[i] <= 0)
                  continue;
              DataPoint dp = dataSet.getDataPoint(i);
              destination.addDataPoint(dp, dataSet.getTargetValue(i), dataSet.getWeight(i)*sampledCounts[i]);
          }
  
          return destination;
      }
docs: Creates a new data set from the given sample counts. Points sampled
  multiple times will be added once to the data set with their weight
  multiplied by the number of times it was sampled.
  @param dataSet the data set that was sampled from
  @param sampledCounts the sampling values obtained from
  {@link #sampleWithReplacement(int[], int, java.util.Random) }
  @return a new sampled classification data set