The function implements a modification of the adaptive weights smoothing algorithm for segmentation into three classes. The

aws.segment(y, level, delta = 0, hmax = NULL, hpre = NULL, mask =NULL,
            varmodel = "Constant", lkern = "Triangle", scorr = 0, ladjust = 1,
            wghts = NULL, u = NULL, varprop = 0.1, ext = 0, graph = FALSE,
            demo = FALSE, fov=NULL)

Arguments

y

y contains the observed response data. dim(y) determines the dimensionality and extend of the grid design.

level

center of second class

delta

half width of second class

hmax

hmax specifies the maximal bandwidth. Defaults to hmax=250, 12, 5 for dd=1, 2, 3, respectively.

hpre

Describe hpre Bandwidth used for an initial nonadaptive estimate. The first estimate of variance parameters is obtained from residuals with respect to this estimate.

mask

optional logical mask, same dimensionality as y

varmodel

Implemented are "Constant", "Linear" and "Quadratic" refering to a polynomial model of degree 0 to 2.

lkern

character: location kernel, either "Triangle", "Plateau", "Quadratic", "Cubic" or "Gaussian". The default "Triangle" is equivalent to using an Epanechnikov kernel, "Quadratic" and "Cubic" refer to a Bi-weight and Tri-weight kernel, see Fan and Gijbels (1996). "Gaussian" is a truncated (compact support) Gaussian kernel. This is included for comparisons only and should be avoided due to its large computational costs.

scorr

The vector scorr allows to specify a first order correlations of the noise for each coordinate direction, defaults to 0 (no correlation).

ladjust

factor to increase the default value of lambda

wghts

wghts specifies the diagonal elements of a weight matrix to adjust for different distances between grid-points in different coordinate directions, i.e. allows to define a more appropriate metric in the design space.

u

a "true" value of the regression function, may be provided to report risks at each iteration. This can be used to test the propagation condition with u=0

varprop

Small variance estimates are replaced by varprop times the mean variance.

ext

Intermediate results are fixed if the test statistics exceeds the critical value by ext.

graph

If graph=TRUE intermediate results are illustrated after each iteration step. Defaults to graph=FALSE.

demo

If demo=TRUE the function pauses after each iteration. Defaults to demo=FALSE.

fov

Field of view. Size of region (sample size) to adjust for in multiscale testing.

Details

The image is segmented into three parts by performing multiscale tests of the hypotheses H1 value >= level - delta and H2 value <= level + delta. Pixel where the first hypotesis is rejected are classified as -1 (segment 1) while rejection of H2 results in classification 1 (segment 3). Pixel where neither H1 or H2 are rejected ar assigned to a value 0 (segment 2). Critical values for the tests are adjusted for smoothness at the different scales inspected in the iteration process using results from multiscale testing, see e.g. Duembgen and Spokoiny (2001). Critical values also depend on the size of the region of interest specified in parameter fov.

Within segment 2 structural adaptive smoothing is performed while if a pair of pixel belongs to segment 1 or segment 3 the corresponding weight will be nonadaptive.

Value

returns anobject of class aws with slots

y = "numeric"

y

dy = "numeric"

dim(y)

x = "numeric"

numeric(0)

ni = "integer"

integer(0)

mask = "logical"

logical(0)

segment = "integer"

Segmentation results, class numbers 1-3

theta = "numeric"

Estimates of regression function, length: length(y)

mae = "numeric"

Mean absolute error for each iteration step if u was specified, numeric(0) else

var = "numeric"

approx. variance of the estimates of the regression function. Please note that this does not reflect variability due to randomness of weights.

xmin = "numeric"

numeric(0)

xmax = "numeric"

numeric(0)

wghts = "numeric"

numeric(0), ratio of distances wghts[-1]/wghts[1]

degree = "integer"

0

hmax = "numeric"

effective hmax

sigma2 = "numeric"

provided or estimated error variance

scorr = "numeric"

scorr

family = "character"

"Gaussian"

shape = "numeric"

NULL

lkern = "integer"

integer code for lkern, 1="Plateau", 2="Triangle", 3="Quadratic", 4="Cubic", 5="Gaussian"

lambda = "numeric"

effective value of lambda

ladjust = "numeric"

effective value of ladjust

aws = "logical"

aws

memory = "logical"

memory

homogen = "logical"

FALSE

earlystop = "logical"

FALSE

varmodel = "character"

varmodel

vcoef = "numeric"

estimated parameters of the variance model

call = "function"

the arguments of the call to aws.gaussian

Note

This function is still experimental and may be changes considerably in future.

References

J. Polzehl, H.U. Voss, K. Tabelow (2010). Structural adaptive segmentation for statistical parametric mapping, NeuroImage, 52, pp. 515--523. DOI:10.1016/j.neuroimage.2010.04.241

Duembgen, L. and Spokoiny, V. (2001). Multiscale testing of qualitative hypoteses. Ann. Stat. 29, 124--152.

Polzehl, J. and Spokoiny, V. (2006). Propagation-Separation Approach for Local Likelihood Estimation. Probability Theory and Related Fields. 3 (135) 335 - 362. DOI:10.1007/s00440-005-0464-1

Author

Joerg Polzehl, polzehl@wias-berlin.de, http://www.wias-berlin.de/people/polzehl/

See also

Examples