PerMallows: Permutations and Mallows Distributions

Includes functions to work with the Mallows and Generalized 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 to those related with the Kendall's-tau, Cayley, Ulam and Hamming distances. It is also possible to generate random permutations at a given distance, or with a given number of inversions, or cycles, or fixed points or even with a given length on LIS (longest increasing subsequence).

Author
Ekhine Irurozki <ekhine.irurozqui@ehu.eus>, Borja Calvo <borja.calvo@ehu.eus>, Jose A. Lozano <ja.lozano@ehu.eus>
Date of publication
2016-08-03 11:13:54
Maintainer
Ekhine Irurozki <ekhine.irurozqui@ehu.eus>
License
GPL (>= 2)
Version
1.12

View on CRAN

Man pages

compose
Compose permutations
count.perms
Count permutations at a distance
cycle2str
Friendly display the cycles
cycles2perm
Get the permutation given the cycles
data.apa
Sample of permutations APA
data.order
Sample of permutations
decomp2perm
Get a permutation consistent with a decomposition vector
dgmm
Calculate the probability of a permutation in a GMM
distance
Compute the distance between permutations
dmm
Calculate the probability of a permutation in a MM
expectation.gmm
Compute the expected distance, GMM under the Hamming distance
expectation.mm
Compute the expected distance, MM under the Hamming distance
freq.matrix
Compute the frequency matrix
generate.aux.files
Generates the files for Ulam
identity.permutation
Generate identity the permutation
insert
Insert operator
inverse.perm
Generate inverse permutation
inversion
Inversion operator
is.permutation
Check if its argument is a permutation
lgmm
Learn a Generalized Mallows Model
lgmm.theta
MLE for theta - Generalized Mallows Model
lmm
Learn a Mallows Model
lmm.theta
MLE for theta - Mallows Model
marginal
Compute the marginal probability, GMM under the Hamming...
maxi.dist
Get the maximum value of the distance ebtween permutations
order.ratings
Convert rating to permutation
perm2cycles
Decompose a permutation in a set of cycles
perm2decomp
Get the decomposition vector
perm.sample.med
Sample of permutations
perm.sample.small
Sample of permutations
permutations.of
Generate every permutation of perm.length item
rdist
Generate a collection of permutations at a given distance
read.perms
Read a text file with a collection of permtuations
rgmm
Sample a Generalized Mallows Model
rmm
Sample a Mallows Model
runif.permutation
Random permutation
swap
Swap two items of a permutation

Files in this package

PerMallows
PerMallows/inst
PerMallows/inst/CITATION
PerMallows/inst/test.txt
PerMallows/src
PerMallows/src/Kendall.h
PerMallows/src/Lap.h
PerMallows/src/Ferrers_diagram.cpp
PerMallows/src/Generic.cpp
PerMallows/src/Ulam_disk.cpp
PerMallows/src/Ulam.h
PerMallows/src/Ulam.cpp
PerMallows/src/Cayley.cpp
PerMallows/src/main.cpp
PerMallows/src/Newton_raphson.h
PerMallows/src/Cayley.h
PerMallows/src/Ulam_disk.h
PerMallows/src/Exponential_model.h
PerMallows/src/Hamming.h
PerMallows/src/Ferrers_diagram.h
PerMallows/src/Generic.h
PerMallows/src/Kendall.cpp
PerMallows/src/Newton_raphson.cpp
PerMallows/src/Hamming.cpp
PerMallows/src/Wrapper.cpp
PerMallows/NAMESPACE
PerMallows/data
PerMallows/data/perm.sample.small.rda
PerMallows/data/perm.sample.med.rda
PerMallows/data/data.apa.rda
PerMallows/data/data.order.rda
PerMallows/R
PerMallows/R/PerMallows.R
PerMallows/vignettes
PerMallows/vignettes/PerMallows.tex
PerMallows/MD5
PerMallows/DESCRIPTION
PerMallows/man
PerMallows/man/identity.permutation.Rd
PerMallows/man/lmm.theta.Rd
PerMallows/man/decomp2perm.Rd
PerMallows/man/compose.Rd
PerMallows/man/rgmm.Rd
PerMallows/man/swap.Rd
PerMallows/man/order.ratings.Rd
PerMallows/man/perm.sample.med.Rd
PerMallows/man/cycles2perm.Rd
PerMallows/man/freq.matrix.Rd
PerMallows/man/data.apa.Rd
PerMallows/man/expectation.gmm.Rd
PerMallows/man/count.perms.Rd
PerMallows/man/distance.Rd
PerMallows/man/permutations.of.Rd
PerMallows/man/read.perms.Rd
PerMallows/man/inverse.perm.Rd
PerMallows/man/inversion.Rd
PerMallows/man/data.order.Rd
PerMallows/man/insert.Rd
PerMallows/man/lmm.Rd
PerMallows/man/generate.aux.files.Rd
PerMallows/man/expectation.mm.Rd
PerMallows/man/perm.sample.small.Rd
PerMallows/man/dgmm.Rd
PerMallows/man/lgmm.Rd
PerMallows/man/lgmm.theta.Rd
PerMallows/man/perm2decomp.Rd
PerMallows/man/perm2cycles.Rd
PerMallows/man/maxi.dist.Rd
PerMallows/man/cycle2str.Rd
PerMallows/man/rdist.Rd
PerMallows/man/dmm.Rd
PerMallows/man/marginal.Rd
PerMallows/man/runif.permutation.Rd
PerMallows/man/rmm.Rd
PerMallows/man/is.permutation.Rd