Skip to main content

Tests

Pairwise Compare

This tool allows the user to compare groups of data specified in a tidy pandas dataframe with ease. In this repo the capabilities of the PairwiseCompareManager are shown through examples using a dataset from the nf1_schwann_cell_painting_data. These examples can be found in the docs. Although, most of the development efforts can be found in the src folder. Users should almost exclusively interact with the PairwiseCompareManager, however, there may be rare exceptions. If you choose to interact with another component of the tool, then there will be less input validation safeguards available.

Installation

For Python versions 3.10 through 3.12 (inclusive), you can install this tool with either of the following commands:
pip install pairwise-compare
pip install git+https://github.com/WayScience/pairwise_compare.git

Note it is highly recommended to use a package manager such as Conda to install this tool.
Once installed you can use subtools such as the PairwiseCompareManager with:
from comparison_tools.PairwiseCompareManager import PairwiseCompareManager

Data Formats

When passing arguments to the PairwiseCompareManager you can specify the columns that remain the same in each group-to-group comparison, and the columns that will be different in these comparisons. These columns are parameterized by _same_columns and _different_columns, respectively. The column values in these columns uniquely define each group. During pairwise comparisons of groups, all of the column values of the columns specified in _same_columns will be the same between both groups compared for all paired combinations of groups. Likewise, all of the column values of the columns specified in _different_columns will be different between both groups compared for all paired combinations of groups.

One of the following column arguments conditions must be satisified when using the PairwiseCompareManager:

  1. _same_columns must include at least one list element if _different_columns has less than two list elements.
  2. _different_columns must contain one or more list elements.
  3. _same_columns and _different_columns should not contain any of the same columns.

Limitations

  1. Input validation is enforced in the PairwiseCompareManager and PairwiseCompare classes.
  2. Additional column values are not tracked aside from columns used to compare groups (_same_columns, _different_columns).
  3. Output and input python data structures are limited.
  4. All of the data, in the supplied pandas dataframe, is used to compute comparisons.

Extensibility

This tool compares features between any two groups of a tidy pandas dataframe. To incorporate additional comparators for making comparisons, you must introduce the functionality as a class and inherit from the Comparator class (See Comparator.py for details).

Release files for pairwise-compare 0.1.3

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

Source distribution (sdist)

Source distribution for pairwise-compare 0.1.3
File Size Uploaded
pairwise_compare-0.1.3.tar.gz 8.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pairwise-compare 0.1.3
File Interpreter ABI Platform
pairwise_compare-0.1.3-py3-none-any.whl Python 3 none any Details

Total release size: 21.5 kB

Release files / pairwise_compare-0.1.3.tar.gz

Download URL pairwise_compare-0.1.3.tar.gz
Size 8.9 kB
Tags Source
SHA-256 checksum
How to use checksums
36cbb92a8eace2c48b5c3c55e65afc4ed790e81cc9dcd4aa890c6a711f983ec5
BLAKE2b-256 checksum
How to use checksums
70ba9ff389c073b061a62545c63aa3a62dd05511163fe01cb367e13e8df09b5b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.1.3 CPython/3.10.12 Linux/6.12.10-76061203-generic

Release files / pairwise_compare-0.1.3-py3-none-any.whl

Download URL pairwise_compare-0.1.3-py3-none-any.whl
Size 12.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
45017ed6cd00070d2866dd2a8e1dccdcf69cb39e74886fb8cc8afffb558e93bb
BLAKE2b-256 checksum
How to use checksums
e68d8841097efbc1eea733759501cfdf25483b259c3b602e3f08ef6341d03c31
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.1.3 CPython/3.10.12 Linux/6.12.10-76061203-generic

Release history Release notifications | RSS feed

This release

0.1.3 This release

2 release files

0.1.1

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