A package for conducting Comparative Judgement
Project description
Comparative Judgement
A package for comparative judgement (CJ).
Importing the BCJ model:
from cj.models import BayesianCJ
BCJ = BayesianCJ(4)
Creating the data:
import numpy as np
data = np.asarray([
[0, 1, 0],
[0, 1, 0],
[0, 3, 0],
[1, 0, 1],
[1, 0, 1],
[1, 0, 1],
[1, 2, 1],
[1, 2, 1],
[1, 2, 1],
[1, 2, 1],
[1, 2, 1],
[2, 1, 2],
[2, 1, 2],
[2, 1, 2],
[2, 3, 2],
[3, 0, 3],
[3, 0, 3],
[3, 0, 3],
[3, 0, 3],
[3, 2, 3],
[3, 2, 3],
[3, 2, 3],
])
running the model:
BCJ.run(data)
Finding the $\mathbb{E}[\mathbf{r}]$
BCJ.rank_scores
>>> [3.046875, 2.09765625, 3.05859375, 1.796875]
Finding the BCJ rank:
BCJ.res
>>> array([3, 1, 0, 2])
Importing the BTM Model:
from cj.models import BayesianCJ
BTM = BTMCJ(4)
running the model:
BTM.run(data)
Finding the optimised p scores:
BTM.optimal_params
>>> array([-0.44654627, 0.04240265, -0.41580243, 0.81994508])
find BTM rank:
BTM.rank
>>> array([3, 1, 2, 0])
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for comparative_judgement-0.0.3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | b39416dce75959cd4cfef74caa83e15fe6972d608118d293fc4d8472fe74c8c5 |
|
MD5 | d57901be8fcc7aef0e0402b5571b0668 |
|
BLAKE2b-256 | 4004820fb4f4567786c5f31a1a2e4ff1567f43c5da5841017a23903daf763f56 |
Close
Hashes for comparative_judgement-0.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 12482025328e14b970ef2b67245dd1e59c8a3e03d47b297246c8a18197fb3969 |
|
MD5 | 5d96e3d11a40db089147c9f265e406fa |
|
BLAKE2b-256 | 4aaa8d1207d0f86f9739cd0f56a7e3c5e1134bab600890e3b8aada6ceda18187 |