public final class HyperParams extends Object
Modifier and Type | Method and Description |
---|---|
static HyperParamValues<Double> |
around(double value,
double step) |
static HyperParamValues<Integer> |
around(int value,
int step) |
static List<List<?>> |
chooseHyperParameterCombos(Collection<HyperParamValues<?>> ranges,
int howMany,
int perParam) |
static int |
chooseValuesPerHyperParam(int numParams,
int candidates) |
static HyperParamValues<Double> |
fixed(double fixedValue) |
static HyperParamValues<Integer> |
fixed(int fixedValue) |
static HyperParamValues<?> |
fromConfig(com.typesafe.config.Config config,
String key) |
static HyperParamValues<Double> |
range(double min,
double max) |
static HyperParamValues<Integer> |
range(int min,
int max) |
static <T> HyperParamValues<T> |
unorderedFromValues(Collection<T> values) |
public static HyperParamValues<Double> fixed(double fixedValue)
public static HyperParamValues<Double> range(double min, double max)
public static HyperParamValues<Double> around(double value, double step)
public static HyperParamValues<Integer> fixed(int fixedValue)
public static HyperParamValues<Integer> range(int min, int max)
public static HyperParamValues<Integer> around(int value, int step)
public static <T> HyperParamValues<T> unorderedFromValues(Collection<T> values)
public static HyperParamValues<?> fromConfig(com.typesafe.config.Config config, String key)
config
- application configurationkey
- config key to accessHyperParamValues
appropriate to the value. If an int
or
double
, returns fixed(int)
or fixed(double)
respectively.
If a List<int>
or List<double>
, returns range(int,int)
or
range(double,double)
respectively.public static List<List<?>> chooseHyperParameterCombos(Collection<HyperParamValues<?>> ranges, int howMany, int perParam)
ranges
- ranges of hyperparameters to try, one per hyperparametershowMany
- how many combinations of hyperparameters to returnperParam
- how many different hyperparameter values to try per hyperparameterhowMany
is smaller than the total number of combinations, a random
subset of all combinations are returned. The order is shuffled randomly. If no parameters
are specified or perParam
is 0, a single empty combination is returned.public static int chooseValuesPerHyperParam(int numParams, int candidates)
numParams
- number of different hyperparameterscandidates
- minimum number of candidates to be builtCopyright © 2014–2017. All rights reserved.