Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

opttdev

Optimizing Classification by Minimizing Table Deviance


Description

opttdev is a iterative re-assignment classification algorithm that assigns samples to clusters to minimize the total deviance of a table with respect to the row-wise relative abundance of the elements

Usage

opttdev(comm,clustering,maxitr=100,minsiz=5)

Arguments

comm

a vegetation or other taxon table with samples as rows and taxa as columns

clustering

an index of cluster membership for each sample. May be either a numeric vector of length equal to the number of samples, or an object that inherits from class ‘cluster’

maxitr

the maximum number of iterations to attempt

minsiz

the minimum size cluster to consider reassigning a sample out of

Details

Iterative re-allocation algorithms temporarily re-assign each sample to each of the other possible clusters and calculate a goodness-of-clustering statistic for each re-assignment. The best of all possible re-assignments is then executed and the algorithm iterates until there are no more good re-assignments or the maximum number of iterations is reached. In opttdev, the goodness-of-clustering statistic is total table deviance as calculated by tabdev. See the help file for tabdev for more detail.

Value

a list which inherits from class ‘opttdev’, ‘clustering’ with components:

numitr

the number of iterations performed

dev

a vector of total table deviance at each iteration of length ‘numitr’

clustering

the vector of cluster memberships (as integers) for each sample

Note

Like many iterative re-assignment algorithms, opttdev is likely to be VERY slow from a random start or poor initial condition. opttdev is maybe better used to polish existing classifications

Author(s)

David W. Roberts droberts@montana.edu

References

See Also

Examples

## Not run: data(shoshveg) # returns a data.frame of vegetation
## Not run: data(shoshsite)
## Not run: res <- opttdev(shoshveg,
                  as.numeric(cut(shoshsite$elevation,5)))
## End(Not run) 
## Not run: # likely to be VERY slow

optpart

Optimal Partitioning of Similarity Relations

v3.0-3
GPL (>= 2)
Authors
David W. Roberts <droberts@montana.edu>
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.