Learn R Programming

⚠️There's a newer version (1.14) of this package.Take me there.

PerMallows (version 1.1)

Permutations and Mallows distributions

Description

This package includes functions to work with the Mallows, Generalized Mallows and Weighted Mallows models. The considered distances are Kendall's $\tau$, Cayley, Hamming and Ulam and it includes functions for making inference, sampling and learning such distributions, some of which are novel in the literature. As a by-product, PerMallows also includes operations for permutations, paying special attention in those related with the Kendall's-$\tau$, Cayley, Ulam and Hamming distances and the random generation of permutations.

Copy Link

Version

Install

install.packages('PerMallows')

Monthly Downloads

375

Version

1.1

License

GPL (>= 2)

Maintainer

Ekhine Irurozki

Last Published

June 25th, 2014

Functions in PerMallows (1.1)

data.3

Sample of permutations
expectation.mm

Compute the expected distance, MM under the Hamming distance
permutation2decomposition

Get the decomposition vector
count.perms.cycles

Count permutations with a given number of cycles
lgmm

Learn a Generalized Mallows Model
count.perms.fixed.points

Count permutations with a given number of fixed points
r.derangement

Generate a collection of derangements
data.2

Sample of permutations
r.dist.d

Generate a collection of permutations at a given distance
lgmm.theta

MLE for theta - Generalized Mallows Model
count.perms.distance

Count permutations at a distance
dmm

Calculate the probability of a permutation in a MM
data

Sample of permutations
generate.aux.files

Generates the files for Ulam
inversion.at

Inversion operator
lmm.theta

MLE for theta - Mallows Model
identity.permutation

Generate identity the permutation
count.derangements

Count derangements
rgmm

Sample a Generalized Mallows Model
swap

Swap two items of a permutation
permutations.of

Generate every permutation of perm.length item
inverse.permutation

Generate inverse permutation
data.1

Sample of permutations
count.perms

Count permutations at a distance
decomp2perm

Get a permutation consistent with a decomposition vector
inverse.perm

Generate inverse permutation
marginal

Compute the marginal probability, GMM under the Hamming distance
lmm

Learn a Mallows Model
runif.permutation

Random permutation
distance

Compute the distance between permutations
expectation.gmm

Compute the expected distance, GMM under the Hamming distance
order.ratings

Convert rating to permutation
is.permutation

Check if its argument is a permutation
data.order

Sample of permutations
freq.matrix

Compute the frequency matrix
perm.sample.small

Sample of permutations
compose

Compose permutations
maxi.dist

Get the maximum value of the distance ebtween permutations
read.perms

Read a text file with a collection of permtuations
insert.at

Insert operator
insert

Insert operator
data.apa

Sample of permutations APA
rmm

Sample a Mallows Model
dgmm

Calculate the probability of a permutation in a GMM
cycle2str

Friendly display the cycles
decomposition2permutation

Get a permutation consistent with a decomposition vector
read.permutation.file

Read a text file with a collection of permtuations
datapos

Sample of permutations
perm2cycles

Decompose a permutation in a set of cycles
r.perms.cycles

Generate a collection of permutations with a given number of cycles
perm2decomp

Get the decomposition vector
cycles2permutation

Get the permutation given the cycles
permutation2cycles

Decompose a permutation in a set of cycles
rdist

Generate a collection of permutations at a given distance
perm.sample.med

Sample of permutations
cycles2perm

Get the permutation given the cycles
inversion

Inversion operator
count.perms.unfixed.points.gtet

Count permutations with at least a given number of unfixed points