Skip to content

emiliotorres/preferelation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Preferelation: Filling Missing Data in a Preference Relationship Matrix.

Install the package

install.packages("devtools")
library(devtools)
install_github("emiliotorres/preferelation")

Using the package

Load the package.

library(preferelation)

Create a matrix.

set.seed(1234)
R <- crear_matriz_aleatoria(ndimension=5L,valordiagonal=10L)
print(R)

One we have a arbitrary matrix R, we estimate the upper bound of the transitivity, U(R). The transitivity of any solution will be equal or lesser than this limit.

print(R) # Missing data
calcular_cota_maxima_transitividad(R) # Upper bound U(R)

The first step is to check out if there is any row or column with no data, except in the diagonal.

R <- sacar_nueva_matriz_sin_columnas_o_filas_perdidas(R,verbose=1L)
R

Obtain all the solutions. Rows of mpoints are the solutions.

mpoints <- obtener_puntos_optimos(R,combinacionesmaxi=10^7,verbose=3L)
head(mpoints) # Names of the columns are the places of the missing data of RLos nombres de las columnas son los huecos de la matriz R
dim(mpoints) 

Check out the transitivity of this solutions.

transi <- calcular_transitividad_matriz_puntos(R,mpoints)
table(transi)

About

Filling Missing Data in a Preference Relationship Matrix.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published