aws.segment {aws}  R Documentation 
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)
y 

level 
center of second class 
delta 
half width of second class 
hmax 

hpre 
Describe 
mask 
optional logical mask, same dimensionality as 
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 Biweight and Triweight 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 
ladjust 
factor to increase the default value of lambda 
wghts 

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 
varprop 
Small variance estimates are replaced by 
ext 
Intermediate results are fixed if the test statistics exceeds the critical value by 
graph 
If 
demo 
If 
fov 
Field of view. Size of region (sample size) to adjust for in multiscale testing. 
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.
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 13 
theta = "numeric" 
Estimates of regression function, 
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 
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 
This function is still experimental and may be changes considerably in future.
Joerg Polzehl, polzehl@wiasberlin.de, http://www.wiasberlin.de/people/polzehl/
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). PropagationSeparation Approach for Local Likelihood Estimation. Probability Theory and Related Fields. 3 (135) 335  362. DOI:10.1007/s0044000504641
require(aws)