public class BooleanSpace extends java.lang.Object implements ParameterSpace<java.lang.Boolean>
ParameterSpace<Boolean>
; Defines {True, False} as a parameter space
If argument to setValue is less than or equal to 0.5 it will return True else FalseConstructor and Description |
---|
BooleanSpace() |
Modifier and Type | Method and Description |
---|---|
java.util.List<ParameterSpace> |
collectLeaves()
Collect a list of parameters, recursively.
|
java.util.Map<java.lang.String,ParameterSpace> |
getNestedSpaces()
Get a list of nested parameter spaces by name.
|
java.lang.Boolean |
getValue(double[] input)
Generate a candidate given a set of values.
|
boolean |
isLeaf()
Is this ParameterSpace a leaf? (i.e., does it contain other ParameterSpaces internally?)
|
int |
numParameters()
Get the total number of parameters (hyperparameters) to be optimized.
|
void |
setIndices(int... indices)
For leaf ParameterSpaces: set the indices of the leaf ParameterSpace.
|
java.lang.String |
toString() |
public java.lang.Boolean getValue(double[] input)
ParameterSpace
getValue
in interface ParameterSpace<java.lang.Boolean>
input
- A set of values, each in the range [0,1], of length ParameterSpace.numParameters()
public int numParameters()
ParameterSpace
numParameters
in interface ParameterSpace<java.lang.Boolean>
public java.util.List<ParameterSpace> collectLeaves()
ParameterSpace
collectLeaves
in interface ParameterSpace<java.lang.Boolean>
public java.util.Map<java.lang.String,ParameterSpace> getNestedSpaces()
ParameterSpace
getNestedSpaces
in interface ParameterSpace<java.lang.Boolean>
public boolean isLeaf()
ParameterSpace
isLeaf
in interface ParameterSpace<java.lang.Boolean>
public void setIndices(int... indices)
ParameterSpace
ParameterSpace.numParameters()
. Throws exception if ParameterSpace.isLeaf()
is false.setIndices
in interface ParameterSpace<java.lang.Boolean>
indices
- Indices to set. Length should equal ParameterSpace.numParameters()
public java.lang.String toString()
toString
in class java.lang.Object