public class GaussianRBF extends RBF
RBF
whose response is dictated by a Gaussian kernel. More specifically, this RBF returns
e^(-1 * d(x, c)^2 / e^2), where d(x, c) is the distance from a query state s to a defined "center,"
c, of this RBF and e is a bandwidth parameter on (0, +infinity) that affects the range of influence of this RBF. The
larger the bandwidth value, the more uniform the response it gives to any arbitrary input state. The distance
between the query state and the center state is determined by a provided distance function.Modifier and Type | Field and Description |
---|---|
protected double |
epsilon
The bandwidth parameter.
|
centeredState, metric
Constructor and Description |
---|
GaussianRBF(double[] centeredState,
DistanceMetric metric,
double epsilon)
Initializes.
|
GaussianRBF(double[] centeredState,
double epsilon)
Initializes using an
EuclideanDistance distance metric. |
Modifier and Type | Method and Description |
---|---|
static java.util.List<RBF> |
generateGaussianRBFsForStates(java.util.List<State> states,
DenseStateFeatures fvGen,
DistanceMetric metric,
double epsilon)
Creates a
List of GaussianRBF units
for each State provided using the given DenseStateFeatures , metric, and epsilon value. |
static java.util.List<RBF> |
generateGaussianRBFsForStates(java.util.List<State> states,
DenseStateFeatures fvGen,
double epsilon)
Creates a
List of GaussianRBF units
for each State provided using the given DenseStateFeatures , and epsilon value
and using a default EuclideanDistance metric for all units. |
double |
responseFor(double[] input)
Returns the RBF response from its center state to the query input state.
|
protected double epsilon
public GaussianRBF(double[] centeredState, DistanceMetric metric, double epsilon)
centeredState
- the centered state for this unit represented as a double arraymetric
- the distance metric with which to compare statesepsilon
- the Gaussian bandwidth value; the larger the value, the more uniform a response this unit givespublic GaussianRBF(double[] centeredState, double epsilon)
EuclideanDistance
distance metric.centeredState
- the centered state for this unit represented as a double arrayepsilon
- the Gaussian bandwidth value; the larger the value, the more uniform a response this unit givespublic double responseFor(double[] input)
RBF
responseFor
in class RBF
input
- the query input state represented with a double array.public static java.util.List<RBF> generateGaussianRBFsForStates(java.util.List<State> states, DenseStateFeatures fvGen, DistanceMetric metric, double epsilon)
List
of GaussianRBF
units
for each State
provided using the given DenseStateFeatures
, metric, and epsilon value.states
- the State
objects around which a GaussianRBF
will be createdfvGen
- the DenseStateFeatures
used to convert states to a double array usable by RBF
units.metric
- the DistanceMetric
to useepsilon
- the bandwidth parameter.List
of GaussianRBF
units.public static java.util.List<RBF> generateGaussianRBFsForStates(java.util.List<State> states, DenseStateFeatures fvGen, double epsilon)
List
of GaussianRBF
units
for each State
provided using the given DenseStateFeatures
, and epsilon value
and using a default EuclideanDistance
metric for all units.states
- the State
objects around which a GaussianRBF
will be createdfvGen
- the DenseStateFeatures
used to convert states to a double array usable by RBF
units.epsilon
- the bandwidth parameter.List
of GaussianRBF
units.