interfaces
Defines top-level interfaces of tensorwaves.
-
class
Estimator
[source]
Bases: abc.ABC
Estimator for discrepancy model and data.
-
abstract
__call__
()[source]
Evaluate discrepancy.
- Return type
float
-
abstract
gradient
()[source]
Compute the gradient of the data set.
- Return type
list
-
abstract property
parameters
Get dict
of parameters.
- Return type
dict
-
abstract
update_parameters
(new_parameters)[source]
Update the collection of parameters.
- Return type
None
-
class
Function
[source]
Bases: abc.ABC
Interface of a callable function.
The parameters of the model are separated from the domain variables. This
follows the mathematical definition, in which a function defines its domain
and parameters. However specific points in the domain are not relevant.
Hence while the domain variables are the argument of the evaluation
(see __call__()
), the parameters are controlled via a
getter and setter (see parameters()
). The reason for this
separation is to facilitate the events when parameters have changed.
-
abstract
__call__
(dataset)[source]
Evaluate the function.
- Parameters
dataset (dict
) – a dict
with domain variable names as keys.
- Return type
list
- Returns
list
or numpy.array
of values.
-
abstract property
parameters
Get dict
of parameters.
- Return type
dict
-
abstract
update_parameters
(new_parameters)[source]
Update the collection of parameters.
- Return type
None
-
class
Kinematics
[source]
Bases: abc.ABC
Abstract interface for computation of kinematic variables.
-
abstract
convert
(events)[source]
Convert a set of momentum tuples (events) to kinematic variables.
- Return type
dict
-
abstract
is_within_phase_space
(events)[source]
Check which events lie within phase space.
- Return type
list
-
abstract property
phase_space_volume
Compute volume of the phase space.
- Return type
float
-
class
Optimizer
[source]
Bases: abc.ABC
Optimize a fit model to a data set.
-
abstract
optimize
(estimator, initial_parameters)[source]
Execute optimization.
- Return type
dict
-
class
PhaseSpaceGenerator
[source]
Bases: abc.ABC
Abstract class for generating phase space samples.
-
abstract
generate
(size, random_generator)[source]
Generate phase space sample.
- Return type
dict
-
class
UniformRealNumberGenerator
[source]
Bases: abc.ABC
Abstract class for generating uniform real numbers.
-
abstract
__call__
(size, min_value=0.0, max_value=1.0)[source]
Generate random floats in the range from [min_value,max_value).
- Return type
Union
[float
, list
]
-
abstract property
seed
Get random seed.
- Return type
dict