bayesbay.likelihood.Target
- class bayesbay.likelihood.Target(name, dobs, covariance_mat_inv=None, noise_is_correlated=False, std_min=0.01, std_max=1, std_perturb_std=0.1, correlation_min=0.01, correlation_max=1, correlation_perturb_std=0.1)
Observed data with noise that can be treated as an unknown
- Parameters:
name (str) – name of the data, for display purposes
dobs (np.ndarray) – numerical data
covariance_mat_inv (Union[Number, np.ndarray], optional) – the inverse of the data covariance matrix, either a number or a full matrix, by default None
noise_is_correlated (bool, optional) – whether the noise between data points is correlated or not, by default False
std_min (Number, optional) – the minimum value of the standard deviation of data noise, by default 0.01
std_max (Number, optional) – the maximum value of the standard deviation of data noise, by default 1
std_perturb_std (Number, optional) – the perturbation standard deviation of the standard deviation of data noise, by default 0.1
correlation_min (Number, optional) – the miminum value of the correlation of data noise, by default 0.01
correlation_max (Number, optional) – the maximum value of the correlation of data noise, by default 1
correlation_perturb_std (Number, optional) – the perturbation standard deviation of the standard deviation of data noise, by default 0.1
Reference Details
- is_hierarchical
whether the data noise is unknown (i.e. to be inverted for)
- name
- initialize(state)
initializes the data noise parameters
- Parameters:
state (State) – the current state in the Bayesian inference, in which DataNoiseState is to be set
- inverse_covariance_times_vector(state, vector)
calculates the dot product of the covariance inverse matrix with a given vector
- Parameters:
state (State) – the current state state
vector (np.ndarray) – the vector to apply the dot product on
- Returns:
the result from the dot product operation
- Return type:
np.ndarray
- log_determinant_covariance(state)
the log of the determinant of the covariance matrix
The determinant of the data covariance matrix is calculated assuming an exponential decay in the noise correlation between adjacent data points [1], i.e.,
\[\lvert \mathbf{C}_e \rvert = \sigma^{2n} (1 - r^2)^{n-1},\]where \(\sigma\) denotes the standard deviation, \(r\) the correlation, and \(n\) the size of the data vector.
- Parameters:
state (State) – the current Bayesian inferernce state
- Returns:
the log of the determinant
- Return type:
float
References