You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+34-20Lines changed: 34 additions & 20 deletions
Original file line number
Diff line number
Diff line change
@@ -1,11 +1,11 @@
1
1
# Markov Chain Type 4 Rank Aggregation
2
-
**implementation of MC4 Rank Aggregation algorithm using Python**
2
+
**implementation of MC4 and MCT Rank Aggregation algorithm using Python**
3
3
4
4
## Description
5
5
6
-
This project is all about implementing one of the most popular rank aggregation algorithms **Markov Chain Type 4** or **MC4**. In the field of Machine Learning and many other scientific problems, several items are often needed to be ranked based on some criterion. However, different ranking schemes order the items based on different preference criteria. Hence the rankings produced by them may differ greatly.
6
+
This project is all about implementing two of the most popular rank aggregation algorithms,**Markov Chain Type 4** or **MC4** and **MCT**. In the field of Machine Learning and many other scientific problems, several items are often needed to be ranked based on some criterion. However, different ranking schemes order the items based on different preference criteria. Hence the rankings produced by them may differ greatly.
7
7
8
-
Therefore a rank aggregation technique is often used for combining the individual rank lists into a single aggregated ranking. Though there are many rank aggregation algorithms, MC4 is one of the most renowned ones.
8
+
Therefore a rank aggregation technique is often used for combining the individual rank lists into a single aggregated ranking. Though there are many rank aggregation algorithms, MC4 and MCT are two of the most renowned ones.
9
9
10
10
## Resource
11
11
@@ -23,24 +23,31 @@ For a specific release, `pip install mc4=={version}` such as `pip install mc4==1
23
23
24
24
## General Usage
25
25
26
-
Using this package is very easy. You just need the following three lines of code to use the package.
26
+
Using this package is very easy.
27
+
28
+
1. Prepare a dataset containing ranks of all the items provided by different algorithms. See [here](https://github.com/kalyaniuniversity/MC4/blob/master/test_datasets/README.md) for sample datasets and more info.
29
+
30
+
2. Use following lines of code to use the package. Make sure to pass arguments according to your dataset otherwise answers will be incorrect.
here `dataset.csv`or `df` are lists of ranks provided by different ranking algorithms or rank lists. *You can refer [here](https://github.com/kalyaniuniversity/MC4/blob/master/test_datasets/datasets.md) for more info and some test datasets.*
45
+
here `test_dataset_1.csv`is a sample dataset containing ranks of different items provided by different algorithms.
40
46
41
-
`mc4_aggregator` takes some additional arguments as well.
47
+
`mc4_aggregator` takes some mandatory and optional arguments -
42
48
43
-
*`order (string)`: order of the dataset, default is `'row'`. More on this, [here](https://github.com/kalyaniuniversity/MC4/blob/master/test_datasets/datasets.md).
49
+
*`algo (string)`: algorithm for rank aggregation, `mc4` or `mct`, default is `mc4`
50
+
*`order (string)`: order of the dataset, `row` or `column`, default is `row`. More on this, [here](https://github.com/kalyaniuniversity/MC4/blob/master/test_datasets/README.md).
44
51
*`header_row (int or None)`: row number of the dataset containing the header, default is `None`
45
52
*`index_col (int or None)`: column number of the dataset containing the index, default is `None`
46
53
*`precision (float)`: acceptable error margin for convergence, default is `1e-07`
@@ -49,49 +56,56 @@ here `dataset.csv` or `df` are lists of ranks provided by different ranking algo
49
56
50
57
## Command Line Usage
51
58
59
+
You can directly use this package from command line if you have the dataset prepared already.
60
+
52
61
* To get help and usage details,
53
62
```shell
54
63
~$ mc4_aggregator -h or --help
55
64
```
56
65
57
66
* Use with default settings,
58
67
```shell
59
-
~$ mc4_aggregator <data source> e.g. mc4_aggregator dataset.csv
68
+
~$ mc4_aggregator dataset.csv
69
+
```
70
+
71
+
* Specify the algorithm for rank aggregation using `-a` or `--algo`, options: `mc4` or `mct`, default is `mc4`
72
+
```shell
73
+
~$ mc4_aggregator dataset.csv -a mct
60
74
```
61
75
62
-
* Specify order using `-o`or `--order`, default is `row`
76
+
* Specify order using `-o`or `--order`, options: `row` or `column`, default is `row`
0 commit comments