Lavoslav Čaklović - software (Potential Method)

Softver for ranking based
on network data

Copyright


Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License .

Citation: Čaklović, L. (2022). Potential Method software. Zagreb, Croatia, https://web.math.pmf.unizg.hr/~caklovic/software.html
In a new version of Potential Method softvare it may happen that the text in the output is slightly different than the output writen here on the web page. Sorry for inconvenience.

Flow

This piece of software calculates a potential of the preference graph.
Basic articles:
A universal voting system based on the Potential Method
Measure of Inconsistency for the Potential Method
  1. Download the pmflow file. download
  2. Make it executable

    chmod +x filename



Option: -a average

Command line:

./pmflow -f input.txt -s -a average



Option: -a sum

Command line:

./pmflow -f input.txt -s -a sum


Option: -a undef

Command line:

./pmflow -f input.txt -s -a undef


Flow visualization (igraph)

  1. Download R-script source file flow.lib.R. download
  2. Download R-script file flow.plot.R. download
  3. Open flow.plot.R in R-Studio.
  4. For input input.txt you wil get the graph

    <test.svg>

  5. You may notice that node size depends upon its potential (option -a average).

Table

This piece of software calculates the potential of the rows in table, regarding the columns as atributes and vice versa.
  1. Download the table file. download
  2. Make it executable

    chmod +x filename

Options: -a [sum, average, multigraph]

Command line:

./pmtable -f table.csv -s -a sum
./pmtable -f table.csv -s -a average
./pmtable -f table.csv -s -a multigraph

Another example

Command line:

./pmtable -f grades.csv -s -a multigraph

Duality


Command line:

./pmtable -f table.dual.csv -s -a multigraph -d


R-matrix

This piece of software calculates the weights of the alternatives from the reciprocal matrix by EVM, GMM and PM methods.
  1. Download the pmrmatrix file. download
  2. Make it executable

    chmod +x filename

Single DM

  1. Command line:

    ./pmrmatrix -f rmatrix.csv -m EVM



    You may also try:

    ./pmrmatrix -f rmatrix.csv -m GMM
    ./pmrmatrix -f rmatrix.csv -m PM

    Incomplete matrix

    Methods: GMM and EVM makes no sense, but

    ./pmrmatrix -f rmatrix.csv -m PM

    is legal.

    An example

    Using 3 options EVM, GMM, PM you will get three different results:

    EVMGMMPM
    A0.1962650.1831330.2
    B0.1816520.1614980.2
    C0.1628060.1489190.2
    D0.183070.184470.2
    E0.2762060.321980.2

One should expect to obtain the third column as a result.
Additionaly, here is an ods file to check EVM, and here is an ods file to check GMM.

Aggregation of reciprocal matrices

  1. Download group.zip
  2. Unpack it in the same folder where is rmatrix executable.
  3. Command line (group aggregation with GMM):

    ./pmrmatrix -f group -m gGMM

  4. Command line (group aggregation with PM):

    ./pmrmatrix -f group -m gPM

Comment. You will notice that inconsistency of a group flow is not a part of the output. Group inconsistency may be great if there is a conflict of interes in the group. A better way is to clusterize DMs according to potential.

Hierarchy

This piece of software solves a hierarchicaly structured decision problem (goal, criteria, subcriteria,..., alternatives).
  1. Download the pmhier file. download
  2. Make it executable

    chmod +x filename

Top down hierarchy


  1. This hierarchy is an example with a parent node (1.1) which has child nodes in a third level and 'jumps over' the second level. Such feature is not allowed (as I know) in the Expert choice software.
    Command line:

    ./pmhier -f hier1.txt > a.out


  2. Restriction of the hierarchy

    A command line

    ./pmhier -f hier1.txt -r 1.2

    restricts the hierarchy down from the 'root 1.2' (a2) and solves the restricted hierarchy.

    Group decision (GDM)

    Top-down aggregation

    A group of flows may be aggregate using a hierarchical model. In example hier1.txt a hierarchy is structered with 3 levels:

    structure: {A: {a1, a2}, B: {b1, b2, b3}, C: {c1, c2, c3}}.

    The first level $A=\{a1, a2\}$ defines a group of decision makers, the second level $B=\{b1,b2,b3\}$ is the set of criteria for evaluation of the alternatives $C=\{c1,c2,c3\}$ in the third level. Such idea is promoted by Saaty, which, in my opinion is not a correct one, because the weights of the second level in the hierarchy are influenced by the preferences of all DMs from the first level.
    Remark. A hidden assumption in such formulation is that all decision makers use the same set of criteria which may not be the case in reality.

    Restrict and aggregate (ABC)

    A command line:

    ./pmhier -f hier1.txt --abc

    (--abc means Aggregation By Criteria) aggregates a hierarchy by criteria in the top level. For each criterion in the top level, an individual flow of the bottom level is calcualted solving a restricted hierarchy (of that criteria).


    Remark. A hidden assumption in such formulation is that all decision makers use the same set of criteria which may not be the case in reality.

    Divide and aggregate

    This kind of aggregation assume that each decision maker defines his own hierarchy with his own criteria and subcriteria (or even without them). The only restriction is that hierarchies have the same bottom level (names of the alternatives).
    Example. Download a group data and unpack them in the same folder where is pmhier executable. In the folder named group there are hierarchies of all decision makers and a file named group.info

    A command line

    ./pmhier -f ./group/ -m

    (-m means members) gives as ouput

    Remark. Please pay attention on the results of ABC aggregation and aggregation of individual hierarchies: they are the same!.

    Group self-ranking

    As above, each DM has his own hierrarchy with one difference: the alternatives are decision makers themselves. There are 2 possibilities of self-evaluation of a group of decision makers: (1) with supervisor and (2) without supervisor.

    (1) In the first case the supervisor gives a priori members weights. The procedure is the same as in Divide and aggregate. The supervisor also has a possibility to exclude each DM from the preferences in his hierarchy. For such possiblity a group type gtype:{dual} is introduced in the file group.info as shown in the textarea above. A full example is linked here.

    (2) The second case is more complicated to understand at this moment. To understand this case you should understand first the idea of self-dual hierarchy (the next chapter). Self-ranking is meaningfull for dual type groups, i.e. for those groups with the set of alternatives equal to the set of group members. The software recognize such case in group.info (option method:{iterate}) and test data for such possibility. A full example is linked here.

Self dual hierarchy

Theory: Self Duality and Conflict Resolution

Self-dual hierarchy has the same nodes in the first and in the last level. A procedure starts with some initial weight on the first level, calculates the last level weight, substitute the new weight as new initial weight and so on... The procedure has a fix point which is a robust weight of the alternatives. It is proved that the fix point does not depend upon the initial weight.

  1. Command line:

    ./pmhier -f hier.dual.txt




Choice modeling

This piece of software aggregates ratios $R\oplus S$ where
$R:=A:B:C=4:3:1$
$S:=C:A=2:3$
for example.
Theory: Preference measurement and application to choice theory
  1. Download the choice file. download
  2. Make it executable

    chmod +x filename

  3. Command line:

    ./pmchoice -f choice_binomial.txt

  4. Other examples (play with input data to see the difference):
    choice_1
    choice_2
    choice_puzzle
    choice_test
    Conclude that: (A:B=2:1 & B:C=2:1) is equivalent to A:B:C=4:2:1.

Choce model as a generalization of R-matrix approach

Here are two examples: ctest.txt and rtest.csv. The first one is a choice model, and the second is a R-matrix model. You may try:
  1. ./pmchoice -f ctest.txt
  2. ./pmrmatrix -f rtest.csv -m PM
Both give the same result:
A0.571429
B0.285714
C0.142857

Geometrical interpretation of ratio(s)

Let us denote by $\Sigma$ a simplex with vertices A,B,C,D in 4-dimensional euclidean space.
Ratio A:B:C=3:2:1 defines a point in the ABC facet.
Ratio B:C:D=2:1:4 defines a point in the BCD facet.
Ratio A:D=2:4 defines a point in the AD facet...
A decision problem is to find a point $w\in\Sigma$ (if such exists) which projections on the facets are equal to the given ratios. If such a point does not exists the Potential Method caculates the 'best candidate' (whatever it means now).

In a Future ...

  1. Ordinal Potential Method.
  2. Missing Data - a proxy approach (partialy done).
  3. Machine Learning and Prediction by PM (partialy done).
  4. PM Score Matching in Observational Studies (partialy done).
  5. Input-Output models (DEA vs. PM) (partialy done)