Learn R Programming

shallot (version 0.4.1)

attraction: Attraction

Description

This function creates an attraction from a permutation and a decay in preparation for use in the ewens.attraction, ewens.pitman.attraction, and ddcrp functions. For details on each of these arguments, please see the links below.

Usage

attraction(permutation, decay)
# S3 method for shallot.attraction
print(x, ...)
# S3 method for shallot.attraction
as.matrix(x, ...)

Arguments

permutation

An object of class shallot.permutation encoding the permutation of the items.

decay

An object of class shallot.decay detailing the transformation from distances to attractions.

x

An object of class shallot.attraction.

...

Currently ignored.

Value

An object of class shallot.attraction.

References

Dahl, D. B., Day, R., and Tsai, J. (2017), Random Partition Distribution Indexed by Pairwise Information, Journal of the American Statistical Association, accepted. <DOI:10.1080/01621459.2016.1165103>

See Also

ddcrp, decay, ewens.attraction, ewens.pitman.attraction, permutation

Examples

Run this code
# NOT RUN {
permutation <- permutation(n.items=50,fixed=FALSE)
decay <- decay.exponential(temperature(1.0),dist(scale(USArrests)))
attraction(permutation, decay)
# }

Run the code above in your browser using DataLab