Usage
## S3 method for class 'matrix,missing':
apcluster(s, x,
p=NA, q=NA, maxits=1000, convits=100, lam=0.9,
includeSim=FALSE, details=FALSE, nonoise=FALSE, seed=NA)
## S3 method for class 'character,ANY':
apcluster(s, x,
p=NA, q=NA, maxits=1000, convits=100, lam=0.9,
includeSim=TRUE, details=FALSE, nonoise=FALSE, seed=NA, ...)
## S3 method for class 'function,ANY':
apcluster(s, x,
p=NA, q=NA, maxits=1000, convits=100, lam=0.9,
includeSim=TRUE, details=FALSE, nonoise=FALSE, seed=NA, ...)
Arguments
s
an $l\times l$ similarity matrix or a similarity
function either specified as the name of a package-provided
similarity function as character string or a user provided
function object.
x
input data to be clustered; if x
is a matrix or data
frame, rows are interpreted as samples and columns are
interpreted as features; apart from matrices or data frames,
x
may be any other structure
p
input preference; can be a vector that specifies
individual preferences for each data point. If scalar,
the same value is used for all data points. If NA
,
exemplar preferences are initialized according to the
q
if p=NA
, exemplar preferences are initialized
according to the distribution of non-Inf values in s
.
If q=NA
, exemplar preferences are set to the median
of non-Inf values in s
maxits
maximal number of iterations that should be executed
convits
the algorithm terminates if the examplars have not
changed for convits
iterations
lam
damping factor; should be a value in the range [0.5, 1);
higher values correspond to heavy damping which may be
needed if oscillations occur
includeSim
if TRUE
, the similarity matrix (either computed
internally or passed via the s
argument) is stored to the
slot sim
of the returned
APResult
object. The default is <
details
if TRUE
, more detailed information about the
algorithm's progress is stored in the output object
(see APResult
)
nonoise
apcluster
adds a small amount of noise to
s
to prevent degenerate cases; if TRUE
,
this is disabled
seed
for reproducibility, the seed of the random number
generator can be set to a fixed value before
adding noise (see above), if NA
, the seed remains
unchanged
...
all other arguments are passed to the selected
similarity function as they are