public abstract static class HyperSpaceWalker.BaseWalker<MP extends Model.Parameters,C extends HyperSpaceSearchCriteria> extends java.lang.Object implements HyperSpaceWalker<MP,C>
The external Grid / Hyperparameter search API uses a HashMap
Modifier and Type | Class and Description |
---|---|
static class |
HyperSpaceWalker.BaseWalker.WalkerFactory<MP extends Model.Parameters,C extends HyperSpaceSearchCriteria>
Java hackery so we can have a factory method on a class with type params.
|
HyperSpaceWalker.BaseWalker<MP extends Model.Parameters,C extends HyperSpaceSearchCriteria>, HyperSpaceWalker.CartesianWalker<MP extends Model.Parameters>, HyperSpaceWalker.HyperSpaceIterator<MP extends Model.Parameters>, HyperSpaceWalker.RandomDiscreteValueWalker<MP extends Model.Parameters>
Modifier and Type | Field and Description |
---|---|
protected java.lang.String[] |
_hyperParamNames
Cached names of used hyper parameters.
|
protected java.util.Map<java.lang.String,java.lang.Object[]> |
_hyperParams
Hyper space description - in this case only dimension and possible values.
|
protected long |
_maxHyperSpaceSize
Compute max size of hyper space to walk.
|
protected C |
_search_criteria |
Constructor and Description |
---|
HyperSpaceWalker.BaseWalker(MP params,
java.util.Map<java.lang.String,java.lang.Object[]> hyperParams,
ModelParametersBuilderFactory<MP> paramsBuilderFactory,
C search_criteria) |
Modifier and Type | Method and Description |
---|---|
protected long |
computeMaxSizeOfHyperSpace() |
java.lang.String[] |
getHyperParamNames()
Returns hyper parameters names which are used for walking the hyper parameters space.
|
long |
getMaxHyperSpaceSize()
Return estimated maximum size of hyperspace, not subject to any early stopping criteria.
|
protected MP |
getModelParams(MP params,
java.lang.Object[] hyperParams) |
ModelParametersBuilderFactory<MP> |
getParametersBuilderFactory() |
MP |
getParams()
Return initial model parameters for search.
|
protected java.lang.Object[] |
hypers(int[] hidx,
java.lang.Object[] hypers)
Given a list of indices for the hyperparameter values return an Object[] of the actual values.
|
protected int |
integerHash(int[] ar) |
C |
search_criteria()
Search criteria for the hyperparameter search including directives for how to search and
when to stop the search.
|
boolean |
stopEarly(Model model,
ScoringInfo[] sk)
Based on the last model, the given array of ScoringInfo, and our stopping criteria should we stop early?
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
iterator
protected final C extends HyperSpaceSearchCriteria _search_criteria
search_criteria()
protected final java.util.Map<java.lang.String,java.lang.Object[]> _hyperParams
protected final java.lang.String[] _hyperParamNames
protected final long _maxHyperSpaceSize
public HyperSpaceWalker.BaseWalker(MP params, java.util.Map<java.lang.String,java.lang.Object[]> hyperParams, ModelParametersBuilderFactory<MP> paramsBuilderFactory, C search_criteria)
paramsBuilderFactory
- hyperParams
- public C search_criteria()
search_criteria
in interface HyperSpaceWalker<MP extends Model.Parameters,C extends HyperSpaceSearchCriteria>
public boolean stopEarly(Model model, ScoringInfo[] sk)
stopEarly
in interface HyperSpaceWalker<MP extends Model.Parameters,C extends HyperSpaceSearchCriteria>
public java.lang.String[] getHyperParamNames()
HyperSpaceWalker
getHyperParamNames
in interface HyperSpaceWalker<MP extends Model.Parameters,C extends HyperSpaceSearchCriteria>
public long getMaxHyperSpaceSize()
HyperSpaceWalker
getMaxHyperSpaceSize
in interface HyperSpaceWalker<MP extends Model.Parameters,C extends HyperSpaceSearchCriteria>
public MP getParams()
HyperSpaceWalker
getParams
in interface HyperSpaceWalker<MP extends Model.Parameters,C extends HyperSpaceSearchCriteria>
public ModelParametersBuilderFactory<MP> getParametersBuilderFactory()
getParametersBuilderFactory
in interface HyperSpaceWalker<MP extends Model.Parameters,C extends HyperSpaceSearchCriteria>
protected long computeMaxSizeOfHyperSpace()
protected java.lang.Object[] hypers(int[] hidx, java.lang.Object[] hypers)
protected int integerHash(int[] ar)