LTPDA Toolbox™ | contents | ![]() ![]() |
MHSAMPLE The Metropolis - Hastings algorithm %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% The Metropolis - Hastings algorithm: Samples a given likelihood function. Warning: The function mhsample does not performs sanity checks on the inputs. It assumes that the given data-sets are in frequency domain and correctly defined. CALL: b = mhsample(out, pl) INPUTS: out - analysis objects with measured outputs pl - parameter list OUTPUTS: b - pest object contatining estimated information Parameters Description %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Method Details | |
---|---|
Access | public |
Defining Class | ao |
Sealed | 0 |
Static | 0 |
Sets for this method … |
---|
Default |
Default |
|||
---|---|---|---|
no description | |||
Key | Default Value | Options | Description |
INNAMES | '' | none | Input names. Used for ssm models |
OUTNAMES | '' | none | Output names. Used for ssm models |
MODEL | '' | none | Model to fit. |
FITPARAMS | [] | none | A cell array of evaluated parameters. |
INPUT | '' | none | A matrix array of input signals. |
NSAMPLES | 1000 | none | number of samples of the chain. |
COV | [] | none | covariance of the gaussian jumping distribution. |
SCALE MATRIX | '' | none | A matrix array of noise spectrum (PSD) used to compute the likelihood. It is possible to input just a scale matrix, containing the desirable weights. |
LOG-LIKELIHOOD | '' | none | The log-likelihood to sample with the MH or Simplex algorithm. If left empty, then the standard Gaussian approximation will be employed. |
RANGE | [] | none | Range where the parameteters are sampled. |
SEARCH | 1 |
|
Set to true to use bigger jumps in parameter space during annealing and cool down. |
PROPOSAL SAMPLER | [] | none | Set the proposal PDF to sample from. If left empty the multivariate Gaussian is used. |
PROPOSAL PDF | [] | none | Input the proposal PDF. This is needed when the proposal PDF is not symmetric.If this field is empty, a symmetric PDF is assumed. Check help for details. |
HEAT | 1 | none | The heat index flattening likelihood surface during annealing. |
TC | [0 1] | none | An array of two values [i j], setting the i-th and j-th sample for the cooling down. |
X0 | [] | none | The proposed initial values. |
UPDATE FIM FREQ | [] | none | Provide with the desired frequency where the FIM should be updated. |
JUMPS | [] | none | An array of four numbers setting the rescaling of the covariance matrix during the search phase. |
PLOT TRACES | [] | none | Select indexes of the parameters to be plotted. |
PLOT DIAGNOSTICS | 0 |
|
Set to true to plot diagnostigs at the end of the sampling. |
DEBUG | 0 |
|
Set to true to get debug information of the MCMC process. |
INMODEL | '' | none | Input model. Still under test |
OUTMODEL | '' | none | Output model. Still under test |
FPRINT | 100 | none | Print progress on screen every specified numeber of samples. |
TXT | 0 |
|
Set to true to print the acceptance ratio to a txt file during the MH sampling. |
PRIOR | '' | none | blah |
LOG PARAMETERS | '' | none | Select the parameters to be treated in log scale. |
ANNEAL | 'simul' |
|
Choose type of annealing during sampling. Default value is simulated annealing. Choose "thermo" for annealing with a thermostat. SNR is computed and if it is larger than a fixed value SNR0 (provided also in the plist), then the chains are heated by a factor of (SNR(1)/SNR0)^2. |
MODELFREQDEPENDENT | 1 |
|
Set to true to use frequency dependent s models, set to false when using constant models |
LOGSPACE | 1 |
|
False-True key to choose the way of sampling. |
SNR0 | 200 | none | Fixed value for thermostated annealing. |
FREQUENCIES VECTOR | 200 | none | A vector of frequencies. Used for the update of the Fisher Matrix during the MH sampling. |
NAVS | 5 | none | The number of averages to use when calculating PSD and CPSD. |
PARAMSVALUES | 1 | none | The numerical values of the parameters. |
PINV | 1 |
|
Use the Penrose-Moore pseudoinverse |
TOL | [] | none | Tolerance for the Penrose-Moore pseudoinverse |
DIFFSTEP | [] | none | Numerical differentiation step for ssm models |
NGRID | [] | none | Number of points in the grid to compute the optimal differentiation step for ssm models |
STEPRANGES | [] | none | An array with upper and lower values for the parameters ranges. To be used to compute the optimal differentiation step for ssm models. |
FREQUENCIES | [] | none | The frequencies to perform the analysis. |
FSOUT | [] | none | Resampling. |
F1 | [] | none | Initial frequency for the analysis. |
F2 | [] | none | Final frequency for the analysis. |
NOISE SCALE | 'PSD' |
|
Select the way to handle the noise/weight data. Can use the PSD/CPSD or the LPSD/CLPSD functions. |
NFFT | -1 | none | The number of samples in each fft [default: length of input data]. A string value containing the variable 'fs' can also be used, e.g., plist('Nfft', '2*fs') |
WIN | 'BH92' |
|
The window to be applied to the data to remove the discontinuities at edges of segments. [default: taken from user prefs] Only the design parameters of the window object are used. Enter a string value containing the window name e.g. plist('Win', 'Kaiser', 'psll', 200) plist('Win', 'BH92') |
PSLL | 200 | none | The peak sidelobe level for Kaiser windows. Note: it is ignored for all other windows |
OLAP | -1 | none | The segment percent overlap [-1 == take from window function] |
ORDER, N | 0 |
|
The order of segment detrending:
|
TIMES, SPLIT | [] | none | The time range to analyze. If not empty, sets the time interval to operate on. As in ao/split, the interval can be specified by:
|
Some information of the method ao/mhsample are listed below: | |
---|---|
Class name | ao |
Method name | mhsample |
Category | Signal Processing |
Package name | ltpda |
VCS Version | 3542afe99dea25c636b7ac3b82a9f6f8be9d447d |
Min input args | 1 |
Max input args | -1 |
Min output args | 1 |
Max output args | -1 |
![]() |
Method: ao/mcmc_td | Method: ao/modelSelect | ![]() |
©LTP Team