MATLAB File Help: dml.prior View code for dml.prior Default Topics
dml.prior
  prior used to created smoothing and shrinkage priors.
 
    DESCRIPTION
 
    This helper function is currently only used by dml.blogreg. See
    dml.enet.laplacian for a related function.
 
    input:
    dims = the dimensions [D1 ... DN] of the measured space (e.g., X x Y x Z x T)
    strength = n vector [I1 ... IN] specifying the strengths within each
    dimension (the non-zero off-diagonal elements); NOTE: negative strengths give
    positive correlations; positive strengths give negative correlations
    and therefore more complex patterns
 
    options:
    'mask' is an optional boolean array specifying which index elements 
      of the full matrix should be used as variables (default = [] = all)
 
    'circulant' is an optional vector specifying for which dimensions we 
      should connect the boundaries to make a torus-like shape. This has the
      advantage that the variance is constant but forces boundary values to be the same. 
      (default = [0 0 0 ...] = no compensation). See Gaussian Markov Random
      field book by Rue for details.
 
    output:
    precision matrix K
    covariance matrix C
    correlation matrix R
    average correlation between neighbouring elements a
 
    EXAMPLE
    [K,C,R,a] = dml.prior([28 28],[-100 -100]);
    imagesc(reshape(R(14*28+8,:),[28 28])); axis square; colorbar
    [K,C,R,a] = dml.prior([28 28],[100 100]);
    imagesc(reshape(R(14*28+8,:),[28 28])); axis square; colorbar
 
    NOTE
    allow neighbourhood structure in the implementation
 
    DEVELOPER
    Marcel van Gerven (m.vangerven@donders.ru.nl)