Finding your way¶
This page says where each thing lives: which module to import, which page of the reference to read, which file to open. To understand why the engine is built this way, read Architecture.
Three parts¶
Part |
What it is for |
Needs |
|---|---|---|
The contract every method shares. You meet it through every result, whatever the method |
The standard library |
|
The ordinal reading: the votes of one item on the agreement scale |
The standard library |
|
Co-clustering: the vote matrix, the block models and their values |
NumPy, behind the |
Importing civiqhub_selene or civiqhub_selene.ordinal never loads NumPy. Importing civiqhub_selene.blocks without NumPy raises MissingExtraError, which says how to install the extra.
I want to…¶
Hold votes¶
I want to |
Use |
Module |
|---|---|---|
Count the votes of one item |
||
Hold the votes of many voters on many items |
||
Use another scale than -2 to +2 |
||
Draw synthetic votes with a known truth |
||
Read a matrix through groups and blocks |
In a vote matrix, a cell is voted, shown without a vote, or not shown. An empty cell is never a zero nor a neutral answer.
Run a method¶
I want to |
Use |
Module |
|---|---|---|
Co-cluster with one group per voter |
||
Choose how the votes of a co-cluster are modelled |
||
Get a model from a plain word such as |
||
List the methods that are installed |
Every method is run the same way: estimator.estimate(data, seed=0), documented once on Estimator.estimate.
Read a result¶
I want to |
Use |
Module |
|---|---|---|
Know whether there is a value, and read it |
||
Know which method, settings, seed and input gave it |
||
Read a co-clustering |
||
Read the groups of voters and the blocks of items |
||
Read the vote rate and the scores of each co-cluster |
||
Handle an error of the engine |
|
Write a method¶
I want to |
Use |
Module |
|---|---|---|
Write an estimator |
||
Prove that it honours the contract |
||
Write a block model |
||
Write a response model |
||
Declare it so that the registry finds it |
The entry-point group |
Architecture walks through these steps.
Two names for one object¶
Many objects have two import paths: the module that defines them, and the package that exports them.
from civiqhub_selene import Result
from civiqhub_selene.types import Result as SameResult
print(Result is SameResult)
True
Import from the package when the name is exported there: it is the shorter path, and the one that stays stable. The reference documents each object once, on the page of the module that defines it; the page of a package lists what the package exports.
Where the files are¶
Path |
Content |
|---|---|
The library. One file per module of the reference: |
|
Unit tests (one file per module), property-based tests, and reference vectors with their tolerance |
|
The pages of this site |
|
Runnable examples on synthetic data |
|
The HTTP wrapper of the engine. It installs the library and never reimplements it |
In the reference, the [source] link next to a name opens the code that defines it.
A module whose name starts with an underscore, such as civiqhub_selene.blocks._numerics, is internal: it has no page in the reference and may change without notice.
Not written yet¶
The dissensus index and the collective regime of the ordinal family, the mixed-membership block model, the choice of the number of groups and blocks, the consensus between groups and the cocluster function are planned. The changelog lists what each version adds.