Skip to main content

Badges

fair-software.eu recommendations
(1/5) code repository github repo badge
(2/5) license github license badge
(3/5) community registry
(4/5) citation DOI
(5/5) checklist workflow cii badge
howfairis fair-software badge
Other best practices  
Static analysis workflow scq badge
Coverage workflow scc badge
Documentation
GitHub Actions  
Build build
Citation data consistency cffconvert
SonarCloud sonarcloud
MarkDown link checker markdown-link-check

About Discuit

Discuit is a Dynamic item set clustering UI tool (with the UI part on streamlit)

Discuit can split datasets (e.g. words defined by several variables) into subsets that are as comparable as possible.

The package takes a csv file as input and generates a defined number of matched sets for a given number of continuous and categorical variables. One of the categorical variables can be selected to be split absolutely even across sets. Discuit generates the following output:

  • csv file ammended with the set membership for each item
  • txt file that reports on the outcomes of statistics tests

If you want to use this package and it's functionality with a graphic user interface, check the app on streamlit.

The project setup is documented in project_setup.md.

Installation

Discuit is available on PyPI!

pip install discuit

Or install the latest development version directly from GitHub:

git clone git@github.com:doerte/discuit-project.git
cd discuit-project
python3 -m pip install .

Using Discuit

In the terminal, run Discuit with the following command: discuit "name of input file" [number of desired sets] --columns l/c/n/a/d --runs [desired number of runs]

Example: discuit example/input.csv 2 --columns l a n c n d --runs 3

This will run Discuit with the provided testfile and create 2 subsets. The columns in the file are identified as "label", "categorical", "numerical", "absolute", "numerical" and "disregard" (in that order). The program will run 3 times (and create 3 output files).

Required input

The input file needs to be a .csv file with a first line containing headings followed by rows that represent the different items. Each column specifies one variable.

When launching the script, please specify per column what kind a data the script should expect:

  • (l)abel: just a label, will not be taken into consideration, could be the itemname or itemnumber. This can only be assigned once.
  • (n)umerical: a numerical variable, such as frequency or AoA,
  • (c)ategorical: a categorical variable, such as "transitivity" or "accuracy",
  • (a)bsolute: this needs to be perfectly divided between sets. This can only be assigned once.
  • (d)isregard: a column that does not need to be taken into account for the split, but contains other information you have in the same file.

The package will try maximally 20 times to come-up with a good split. If it doesn't it will give up and output it's last try. You can always run it again. Often it will succeed eventually. If not, consider dropping variables.

If you run the script without specifying --columns, you will be asked what you want per column. If you don't specify the desired number of runs, it will generate 1 output file.

Missing data

If you choose an "absolute split variable", this variable cannot have missing data. The program will exit if it does. For categorical variables, a dummy category is created that holds the items with missing data. For numerical variables, missing data is replaced with the average of this variable. If you prefer a different approach, please prepare your input file in a way that does not include missing data.

Contributing

If you want to contribute to the development of Discuit, have a look at the contribution guidelines.

Credits

This package was created with Cookiecutter and the NLeSC/python-template.

Release files for discuit 0.4.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for discuit 0.4.1
File Size Uploaded
discuit-0.4.1.tar.gz 18.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for discuit 0.4.1
File Interpreter ABI Platform
discuit-0.4.1-py3-none-any.whl Python 3 none any Details

Total release size: 35.4 kB

Release files / discuit-0.4.1.tar.gz

Download URL discuit-0.4.1.tar.gz
Size 18.3 kB
Tags Source
SHA-256 checksum
How to use checksums
4ddafa586b2d92078ee6fe38bd3482301754e93802dbc4a1d2d6474938e9fd48
BLAKE2b-256 checksum
How to use checksums
f83a75449352ba3c68ef58511810dffd99ac3a7e66fecaf47a192b74ab9e4872
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.6

Release files / discuit-0.4.1-py3-none-any.whl

Download URL discuit-0.4.1-py3-none-any.whl
Size 17.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e16f30fdfefa040607e282279d21a1955f57c70fb4f90e29c9bc2cc4387daf0b
BLAKE2b-256 checksum
How to use checksums
8e7d346123e537ce7c7414b179ebff08ebfce3ffa96a40889bfd1b74f3802479
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.6

Release history Release notifications | RSS feed

This release

0.4.1 This release

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page