Skip to contents

Spatial Random Field Model

Spatial Random Field Model

Details

R6 class wrapping a C++ spatial random field model. Use srf_model() to create instances.

Methods


Method new()

Create a new SrfModel. Use srf_model() instead.

Usage

SrfModel$new(ptr, model_type = "mdgm")

Arguments

ptr

External pointer to a C++ Model object.

model_type

Character string: "mdgm" or "mrf".


Method has_emission()

Check if the model has an emission layer.

Usage

SrfModel$has_emission()

Returns

Logical.


Method nvertices()

Get the number of vertices.

Usage

SrfModel$nvertices()

Returns

Integer.


Method ncolors()

Get the number of colors (categories).

Usage

SrfModel$ncolors()

Returns

Integer.


Method emission_type()

Get the emission family type.

Usage

SrfModel$emission_type()

Returns

Character string ("bernoulli", "gaussian", "poisson") or NULL for standalone models.


Method model_type()

Get the spatial model type.

Usage

SrfModel$model_type()

Returns

Character string: "mdgm" or "mrf".


Method get_ptr()

Get the internal C++ pointer. For internal use only.

Usage

SrfModel$get_ptr()

Returns

External pointer.

Methods


Method new()

Usage

MdgmModel$new(ptr, model_type = "mdgm")


Method has_emission()

Usage

MdgmModel$has_emission()


Method nvertices()

Usage

MdgmModel$nvertices()


Method ncolors()

Usage

MdgmModel$ncolors()


Method emission_type()

Usage

MdgmModel$emission_type()


Method model_type()

Usage

MdgmModel$model_type()


Method get_ptr()

Usage

MdgmModel$get_ptr()