public class ModelUtils
extends java.lang.Object
Used by interpreted models as well as by generated model code.
WARNING: The class should have no other H2O dependencies since it is provided for generated code as h2o-model.jar which contains only a few files.
Constructor and Description |
---|
ModelUtils() |
Modifier and Type | Method and Description |
---|---|
static int[] |
sampleOOBRows(int nrows,
float rate,
java.util.Random sampler)
Sample out-of-bag rows with given rate with help of given sampler.
|
static int[] |
sampleOOBRows(int nrows,
float rate,
java.util.Random sampler,
int[] oob)
In-situ version of
sampleOOBRows(int, float, Random) . |
public static int[] sampleOOBRows(int nrows, float rate, java.util.Random sampler)
nrows
- number of rows to sample from.rate
- sampling ratesampler
- random "dice"public static int[] sampleOOBRows(int nrows, float rate, java.util.Random sampler, int[] oob)
sampleOOBRows(int, float, Random)
.oob
- an initial array to hold sampled rows. Can be internally reallocated.sampleOOBRows(int, float, Random)