decay.reciprocal: Decay Functions

Description Usage Arguments Details Author(s) References See Also Examples

View source: R/shallot.R

Description

These functions specify the decay to map distances to attractions.

Usage

1
2
3
4
5
6
7
8
decay.reciprocal(temperature, distance)

decay.exponential(temperature, distance)

decay.subtraction(temperature, distance, multiplier = 1.01)

## S3 method for class 'shallot.decay'
print(x, ...)

Arguments

temperature

An object of class shallot.temperature.

distance

An object of class dist.

multiplier

An scalar greater than 1.0 to ensure that attractions from decay.subtraction are finite.

x

An object of class shallot.decay.

...

Currently ignored.

Details

There are currently three choices for decay functions: reciprocal, exponential, and subtraction.

The reciprocal decay maps a distance d to an attraction a as follows: a = 1/d^t, where t is the temperature.

The exponential decay maps a distance d to an attraction a as follows: a = exp(-t*d), where t is the temperature.

The subtract decay maps a distance d to an attraction a as follows: a = (m-d)^t, where t is the temperature and m is the maximum distance in distance multiplied by the supplied multiplier.

Author(s)

David B. Dahl dahl@stat.byu.edu

References

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

See Also

dist, temperature, attraction

Examples

1
2
3
4
5
temp <- temperature(1.0)
distance <- dist(scale(USArrests))
decay1 <- decay.reciprocal(temp,distance)
decay2 <- decay.exponential(temp,distance)
decay3 <- decay.subtraction(temp,distance)

shallot documentation built on Nov. 10, 2020, 5:09 p.m.