public class ResampleUtils
extends java.lang.Object
Constructor and Description |
---|
ResampleUtils() |
Modifier and Type | Method and Description |
---|---|
static boolean |
hasInstanceWeights(Instances insts)
Checks whether there are any instance weights other than 1.0 set.
|
static Instances |
resampleWithWeightIfNecessary(Instances insts,
java.util.Random rand)
Resamples the dataset using
Instances.resampleWithWeights(Random)
if there are any instance weights other than 1.0 set. |
public static boolean hasInstanceWeights(Instances insts)
insts
- the dataset to checkpublic static Instances resampleWithWeightIfNecessary(Instances insts, java.util.Random rand)
Instances.resampleWithWeights(Random)
if there are any instance weights other than 1.0 set. Simply returns the
dataset if no instance weights other than 1.0 are set.insts
- the dataset to resamplerand
- the random number generator to use