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)
returns anobject of class aws
with slots
y
dim(y)
numeric(0)
integer(0)
logical(0)
Segmentation results, class numbers 1-3
Estimates of regression function, length: length(y)
Mean absolute error for each iteration step if u was specified, numeric(0) else
approx. variance of the estimates of the regression function. Please note that this does not reflect variability due to randomness of weights.
numeric(0)
numeric(0)
numeric(0), ratio of distances wghts[-1]/wghts[1]
0
effective hmax
provided or estimated error variance
scorr
"Gaussian"
NULL
integer code for lkern, 1="Plateau", 2="Triangle", 3="Quadratic", 4="Cubic", 5="Gaussian"
effective value of lambda
effective value of ladjust
aws
memory
FALSE
FALSE
varmodel
estimated parameters of the variance model
the arguments of the call to aws.gaussian
y
contains the observed response data. dim(y)
determines the dimensionality and extend of the grid design.
center of second class
half width of second class
hmax
specifies the maximal bandwidth. Defaults to hmax=250, 12, 5
for dd=1, 2, 3
, respectively.
Describe hpre
Bandwidth used for an initial nonadaptive estimate. The first estimate
of variance parameters is obtained from residuals with respect to this estimate.
optional logical mask, same dimensionality as y
Implemented are "Constant", "Linear" and "Quadratic" refering to a polynomial model of degree 0 to 2.
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.
The vector scorr
allows to specify a first order correlations of the noise for each coordinate direction,
defaults to 0 (no correlation).
factor to increase the default value of lambda
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.
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
Small variance estimates are replaced by varprop
times the mean variance.
Intermediate results are fixed if the test statistics exceeds the critical value by ext
.
If graph=TRUE
intermediate results are illustrated after each iteration step. Defaults to graph=FALSE
.
If demo=TRUE
the function pauses after each iteration. Defaults to demo=FALSE
.
Field of view. Size of region (sample size) to adjust for in multiscale testing.
Joerg Polzehl, polzehl@wias-berlin.de, https://www.wias-berlin.de/people/polzehl/
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.
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
aws
, aws.gaussian