radial1d_drugowitsch
RadialMatch1D(*, a=None, b=None, mu=None, sigma_2=None, has_bias=True, input_bounds=None)
self.match
is a radial basis function–based matching function as
defined in Drugowitsch's book [PDF p. 256].
Parameters:
Name | Type | Description | Default |
---|---|---|---|
a |
float
|
Evolving parameter from which the position of the Gaussian is
inferred ( Exactly one of |
None
|
b |
float
|
Evolving parameter from which the standard deviation of the
Gaussian is inferred ( |
None
|
mu |
float
|
Position of the Gaussian. See |
None
|
sigma_2 |
float
|
Standard deviation. See |
None
|
has_bias |
bool
|
Whether to expect 2D data where we always match the first dimension (e.g. because it is all ones as a bias to implicitly fit the intercept). |
True
|
input_bounds |
pair of two floats or None
|
If |
None
|
Source code in berbl/match/radial1d_drugowitsch.py
_match_wo_bias(X)
Compute matching vector for given input assuming that the input doesn't have bias column.
We vectorize the following (i.e. feed the whole input through at once)::
for n in range(len(X)):
M[n] = np.exp(-0.5 / sigma_2 * (x - mu)**2)
:param X: input matrix (N × D_X)
with D_X == 1
:returns: matching vector (N)
of this matching function (i.e. of
this rule)
Source code in berbl/match/radial1d_drugowitsch.py
match(X)
Compute matching vector for given input. Depending on whether the input
is expected to have a bias column (see attribute self.has_bias
),
remove that beforehand.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
X |
array of shape
|
Input matrix. |
required |
Returns:
Type | Description |
---|---|
array of shape
|
Matching vector of this matching function for the given input. |
Source code in berbl/match/radial1d_drugowitsch.py
mutate(random_state)
[PDF p. 256]
Source code in berbl/match/radial1d_drugowitsch.py
random(random_state, input_bounds=None)
[PDF p. 256]