R Under development (unstable) (2023-11-06 r85483 ucrt) -- "Unsuffered Consequences" Copyright (C) 2023 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > library(kappalab) Loading required package: lpSolve Loading required package: quadprog Loading required package: kernlab > > ## a set of random generated profiles > ## for instance, marks on a [0,20] scale > p <- data.frame(matrix(runif(500,0,20),100,5)) > names(p) <- c("Stat","Prob","Alg","Cal","Eng") > > ## discretization > p[p <= 5] <- 1 > p[p > 5 & p <= 10] <- 2 > p[p > 10 & p <= 15] <- 3 > p[p > 15] <- 4 > > d <- data.frame(factor(p[[1]]), + factor(p[[2]]), + factor(p[[3]]), + factor(p[[4]]), + factor(p[[5]])) > > ## associated unsupervised capacity > mu <- entropy.capa.ident(d) > mu capacity {} 0.000000 {1} 0.304093 {2} 0.298657 {3} 0.301085 {4} 0.302005 {5} 0.302493 {1,2} 0.594859 {1,3} 0.602333 {1,4} 0.598879 {1,5} 0.600313 {2,3} 0.596406 {2,4} 0.592632 {2,5} 0.596243 {3,4} 0.594245 {3,5} 0.581572 {4,5} 0.592299 {1,2,3} 0.859779 {1,2,4} 0.833698 {1,2,5} 0.849336 {1,3,4} 0.842647 {1,3,5} 0.861676 {1,4,5} 0.850578 {2,3,4} 0.836996 {2,3,5} 0.846844 {2,4,5} 0.832243 {3,4,5} 0.811066 {1,2,3,4} 0.959239 {1,2,3,5} 0.981718 {1,2,4,5} 0.965333 {1,3,4,5} 0.953892 {2,3,4,5} 0.948948 {1,2,3,4,5} 1.000000 > > > > > proc.time() user system elapsed 0.56 0.04 0.59