Package: PerMallows 1.14

Ekhine Irurozki

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).

Authors:Ekhine Irurozki [aut, cre], Borja Calvo [aut], Jose A. Lozano [aut]

PerMallows_1.14.tar.gz
PerMallows_1.14.tar.gz(r-4.5-noble)PerMallows_1.14.tar.gz(r-4.4-noble)
PerMallows_1.14.tgz(r-4.4-emscripten)PerMallows_1.14.tgz(r-4.3-emscripten)
PerMallows.pdf |PerMallows.html
PerMallows/json (API)

# Install 'PerMallows' in R:
install.packages('PerMallows', repos = c('https://cran.r-universe.dev', 'https://cloud.r-project.org'))
Uses libs:
  • c++– GNU Standard C++ Library v3
Datasets:

This package does not link to any Github/Gitlab/R-forge repository. No issue tracker or development information is available.

cpp

1.67 score 1 stars 47 scripts 120 downloads 33 exports 1 dependencies

Last updated 7 days agofrom:52209cc7ca. Checks:2 OK. Indexed: yes.

TargetResultLatest binary
Doc / VignettesOKFeb 13 2025
R-4.5-linux-x86_64OKFeb 13 2025

Exports:composecount.permscycle2strcycles2permdecomp2permdgmmdistancedmmexpectation.gmmexpectation.mmfreq.matrixgenerate.aux.filesidentity.permutationinsertinverse.perminversionis.permutationlgmmlgmm.thetalmmlmm.thetamarginalmaxi.distorder.ratingsperm2cyclesperm2decomppermutations.ofrdist.permread.permsrgmmrmmrunif.permutationswap

Dependencies:Rcpp

Readme and manuals

Help Manual

Help pageTopics
Compose Permutationscompose
Count permutations at a distancecount.perms
Friendly display the cyclescycle2str
Get the permutation given the cyclescycles2perm
Sample of permutations APAdata.apa
Sample of permutationsdata.order
Get a permutation consistent with a decomposition vectordecomp2perm
Calculate the probability of a permutation in a GMMdgmm
Compute the distance between permutationsdistance
Calculate the probability of a permutation in a MMdmm
Compute the expected distance, GMM under the Hamming distanceexpectation.gmm
Compute the expected distance, MM under the Hamming distanceexpectation.mm
Compute the frequency matrixfreq.matrix
Generates the files for Ulamgenerate.aux.files
Generate identity the permutationidentity.permutation
Insert operatorinsert
Generate inverse permutationinverse.perm
Inversion operatorinversion
Check if its argument is a permutationis.permutation
Learn a Generalized Mallows Modellgmm
MLE for theta - Generalized Mallows Modellgmm.theta
Learn a Mallows Modellmm
MLE for theta - Mallows Modellmm.theta
Compute the marginal probability, GMM under the Hamming distancemarginal
Get the maximum value of the distance ebtween permutationsmaxi.dist
Convert rating to permutationorder.ratings
Sample of permutationsperm.sample.med
Sample of permutationsperm.sample.small
Decompose a permutation in a set of cyclesperm2cycles
Get the decomposition vectorperm2decomp
Generate every permutation of perm.length itempermutations.of
Generate a collection of permutations at a given distancerdist.perm
Read a text file with a collection of permutationsread.perms
Sample a Generalized Mallows Modelrgmm
Sample a Mallows Modelrmm
Random permutationrunif.permutation
Swap two items of a permutationswap