noise_proposal
noise_variance_probability(kernel_gram, current_noise_variance, proposed_noise_variance, data)
Calculate the posterior probability for a proposed noise variance, given the current kernel gram matrix and current noise variance.
See equation 21 in Saad2023.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
kernel_gram
|
Float[ndarray, 'D D']
|
The gram matrix of the kernel. |
required |
current_noise_variance
|
ScalarFloat
|
The current noise variance. |
required |
proposed_noise_variance
|
ScalarFloat
|
The proposed noise variance. |
required |
data
|
Dataset
|
The data containing the observations, as a Dataset object. |
required |
Returns:
Type | Description |
---|---|
ScalarFloat
|
The posterior probability for the proposed noise variance. |
Source code in gallifrey/moves/noise_proposal.py
64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 |
|
noise_variance_proposal(key, kernel_gram, noise_variance, data)
Sample a new proposal for the noise variance, and the log probability of the proposal.
See equation 21 in Saad et al. 2023.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
key
|
PRNGKeyArray
|
The random key. |
required |
kernel_gram
|
Float[ndarray, 'D D']
|
The gram matrix of the kernel. |
required |
noise_variance
|
ScalarFloat
|
The current noise variance. |
required |
data
|
Dataset
|
The data containing the observations, as a Dataset object. |
required |
Returns:
Type | Description |
---|---|
ScalarFloat
|
The new noise variance. |
ScalarFloat
|
The log probability of the proposal. |
Source code in gallifrey/moves/noise_proposal.py
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 |
|