While calling
RandomTrainingFactory.generate( (long) (Math.random() * Long.MAX_VALUE), learnSetSize,1, 0, rangeBegin, rangeEnd);
I sometimes get values out of (rangeBegin; rangeEnd) range, e.g. while asking for a (-5;5) range I get values from (-15; -5) range.
It can be helped by using (Math.random() * Integer.MAX_VALUE) as a seed instead.
While calling RandomTrainingFactory.generate( (long) (Math.random() * Long.MAX_VALUE), learnSetSize,1, 0, rangeBegin, rangeEnd); I sometimes get values out of (rangeBegin; rangeEnd) range, e.g. while asking for a (-5;5) range I get values from (-15; -5) range.
It can be helped by using (Math.random() * Integer.MAX_VALUE) as a seed instead.