Skip to contents

R6 class for the \(\mathcal{G}_I^0(\alpha, \gamma, L)\) law (see dg0i()) with maximum likelihood estimation (analytic score, quasi-Newton optimisation on a transformed scale with several starting points), closed-form Shannon entropy (Ferreira and Nascimento, 2020) and the asymptotic variance of its estimator.

References

Ferreira, J. A. and Nascimento, A. D. C. (2020). Shannon entropy for the G0I model: a new segmentation approach. IEEE Journal of Selected Topics in Applied Earth Observations and Remote Sensing, 13, 2547–2553. doi:10.1109/JSTARS.2020.2997666

Super class

SARModel -> G0I

Methods

Inherited methods


G0I$new()

Create a G0I model.

Usage

G0I$new(alpha = -2, gamma = 1, L = 1)

Arguments

alpha

Roughness (< 0).

gamma

Scale (> 0).

L

Number of looks (> 0).


G0I$density()

(Log-)density.

Usage

G0I$density(x, log = FALSE)

Arguments

x

Numeric vector of intensities.

log

Return log-densities?


G0I$random()

Simulate intensities.

Usage

G0I$random(n)

Arguments

n

Number of observations.


G0I$fit()

Fit by maximum likelihood.

Usage

G0I$fit(x, L = NULL, start = NULL)

Arguments

x

Numeric vector of positive intensities.

L

Known number of looks. If NULL (default) it is estimated.

start

Optional named vector of starting values (alpha, gamma and, if estimated, L).


G0I$entropy()

Shannon entropy.

Usage

G0I$entropy()


G0I$clone()

The objects of this class are cloneable with this method.

Usage

G0I$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

Examples

set.seed(1)
z <- rg0i(1000, alpha = -3, gamma = 2, L = 4)
m <- G0I$new()$fit(z, L = 4)
m
#> <G0I> fitted to n = 1000 observations
#>   alpha = -3.13702
#>   gamma = 2.0585
#>   L = 4 (fixed)
#>   logLik = -838.747
#>   Shannon entropy = 0.824063
m$entropy_variance()
#> [1] 0.001294807
G0I$new()$fit(z)$params # L estimated
#> $alpha
#> [1] -3.957879
#> 
#> $gamma
#> [1] 2.803738
#> 
#> $L
#> [1] 3.006068
#>