LidarLDA_foldin: Title

View source: R/LidarLDA_foldin.R

LidarLDA_foldinR Documentation

Title

Description

Title

Usage

LidarLDA_foldin(
  y,
  n,
  nclust,
  gamma,
  ngibbs,
  nburn,
  phi.post,
  phi.estim,
  theta.post
)

Arguments

y

P x H matrix containing the number of returns for each pixel in each height class

n

P x H matrix containing the number of incoming light pulses for each pixel in each height class

nclust

maximum number of clusters (K)

gamma

parameter between 0 and 1 for the prior of the truncated stick-breaking prior

ngibbs

number of iterations for the MCMC algorithm

nburn

number of iterations to discard as burn in

phi.post

logical value (T or F) indicating if samples from the posterior distribution for phi are being provided or not

phi.estim

if phi.post is true, then the algorithm expects that this will be a large matrix containing samples from the posterior distribution for phi. Each row of this matrix should contain a separate sample. If phi.post is false, then this function expects that this is a K x H matrix containing an estimate (e.g., the posterior mean) of phi.

theta.post

should samples from the posterior distribution for theta be returned (TRUE or FALSE)? If FALSE, just the posterior mean is returned

Value

This function returns a list containing several elements:

  • llk: log-likelihood for each iteration. This is a vector of size ngibbs.

  • theta: estimated relative abundance of each cluster in each pixel. This consists of a matrix where rows are samples from the posterior distribution.


drvalle1/LidarLDA documentation built on July 27, 2024, 7:24 a.m.