get_map: Creates MAP (maximum a posteriori) sparse matrix from thetas

View source: R/RcppExports.R

get_mapR Documentation

Creates MAP (maximum a posteriori) sparse matrix from thetas

Description

This is basically a combination of thetas_to_priors, get_posts, and samp_posts so one does not have to store the posteriors in memory (that is more for Bayesian uses).

Usage

get_map(thetas, datum, NNarray, threshh = 0.001)

Arguments

thetas

3 real numbers representing the three hyperparameters

datum

an N * n matrix of the data (N replications of n locations/variables)

NNarray

an n * m2 matrix giving the m nearest neighbors previous in the ordering (or outputting NAs if not available [i.e. there are not m previous points]) that are ordered from closest to furthest away. It is OK to have m2 large, as it will be reduced to match the size of the posterior means (i.e. number of columns in the third element of the posteriors), but never have m2 < 2.

threshh

threshold for number of neighbors (for thetas_to_priors); defaults to 1e-3


katzfuss-group/NPvecchia documentation built on April 15, 2022, 2:23 a.m.