sde_calibration Package
sde_calibration
Package
SDE calibration module. It provides an interface for several different methods that are used to infer the drift and diffusion coefficient of a diffusion process. The stochastic process is modelled by an SDE of the following form
where \(X \in \mathbb{R}\), \(W \in \mathbb{R}\) is a standard Wiener process, \(b \colon \mathbb{R} \to \mathbb{R}\) is the drift coefficient, and \(\sigma \colon \mathbb{R} \to \mathbb{R}\) is the diffusion coefficient. The task of calibrating the SDE involves estimating the drift and diffusion coefficient from an observed trajectory of the process \(X_t\). Note that the drift coefficient of the SDE is the same of the corresponding diffusion process. In contrast, the diffusion coefficient of the SDE \(\sigma\) and the corresponding diffusion process \(\Sigma\) are related as follows:
See also
For more information on SDEs and diffusion processes, c.f.
estimators
Module
- class sde_calibration.estimators.Estimator(data, logger=None, **preprocessor_arguments)
Bases:
abc.ABC
Abstract base class for any kind of estimator that is used. It defines the basic functionalities like data handling, preprocessing, and logging.
- Parameters
data (pd.DataFrame) – The time series data that should be used for the estimation. The DataFrame needs to have the fields ‘t’ and ‘X’.
logger (logging.Logger, optional) –
A logger that should be used for logging and/or displaying intermediate resutls.
|default|
None
**preprocessor_arguments –
Keyword arguments that are further passed to the
preprocessor class
.
- Return type
None
- Raises
TypeError – If the data provided is not of type pandas.DataFarme.
KeyError – If the data provided has keys different from t and X.
TypeError – If the keyword arguments provided are not valid for the preprocessor class.
- abstract fit()
Method that is implement by child classes is order to perform the process of fitting the data. Every estimator is supposed to have this method.
- abstract get_num_parameters()
Returns the number of parameters in the model that is used by a certain estimator.
- Returns
Number of parameters.
- Return type
int
- class sde_calibration.estimators.RegressionEstimator(data, logger=None, **preprocessor_arguments)
Bases:
sde_calibration.estimators.Estimator
Derived from the Estimator class. This class directly extracts the data and sets up the preprocessor in the form that is required to either estimate the drift or diffusion term. For further information on the parameters see the the documentation of the
Estimator
.- compile(mode='drift')
Method used to compile the model. For every regression estimator. It is crucial to specify whether the drift or diffusion coefficient should be approximated before the estimator can be fit or called.
- Parameters
mode (str, optional) –
A string giving the mode of estimation. Possible options are:
drift
diffusion
|default|
'drift'
- Return type
None
- Raises
ValueError – If the provided string for the mode is invalid.
- get_mode()
Interface that provides the mode that the regression estimator is currently operating in.
- Returns
Returns the current mode. Possible values are:
drift
diffusion
- Return type
str
exceptions
Module
- exception sde_calibration.exceptions.NotCompiledError
Bases:
Exception
Exception that is raised if an estimator is not yet compiled. For many methods this is crucial to compile in order to enable the training and prediction.
Subpackages
- classic_estimators Package
- common Package
- dnn_estimators Package
dnn_estimators
Packageadversarial_regressor
Modulegan_losses
Moduleinvariant_density_estimator
Modulemetrics
Modulemixture_density_estimator
Moduleneural_network
Moduleneural_regressor
Modulenon_parametric_regressor
Moduleparametric_regressor
Modulesde_informed_gan
Modulesde_informed_generator
Module- Subpackages