Skip to main content

Bootstrap confidence intervals for correlation coefficients between subjective and objective scores, with a fast Rust core.

Project description

correlation_with_confidence

Bootstrap confidence intervals for correlation coefficients between subjective opinion scores and objective metrics. Native Rust core, pandas-friendly Python API.

Install

pip install correlation_with_confidence
# for plotting helpers:
pip install "correlation_with_confidence[plot]"

Quick start

import correlation_with_confidence as cwc
import pandas as pd

sub = pd.read_csv("subjective.csv")   # long, wide-raw, or mean/std layout
obj = pd.read_csv("objective.csv")    # one row per scene, one column per metric

result = cwc.analyze(
    subjective=sub,
    objective=obj,
    coefficients=("pearson", "spearman", "kendall"),
    n_bootstrap=14999,
    inner_bootstrap=1499,
    bootstrap_scenes=True,
    seed=42,
)

print(result.summary())
fig1 = result.plot_violins()
fig2 = result.plot_win_probabilities()

Parallelism

The bootstrap loop parallelizes across chunks of iterations within each metric, so single-metric workloads also scale across all available cores. Control via:

# Use N threads for this call only (doesn't affect rayon's global pool)
result = cwc.analyze(sub, obj, n_threads=8, ...)

# Or set the rayon default for the whole process before import:
import os
os.environ["RAYON_NUM_THREADS"] = "16"
import correlation_with_confidence as cwc

Output is bit-identical across runs for a fixed seed, independent of thread count.

Build from source

pip install maturin
maturin develop --release

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

correlation_with_confidence-1.0.1.tar.gz (22.8 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

correlation_with_confidence-1.0.1-cp39-abi3-win_amd64.whl (271.3 kB view details)

Uploaded CPython 3.9+Windows x86-64

correlation_with_confidence-1.0.1-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (409.2 kB view details)

Uploaded CPython 3.9+manylinux: glibc 2.17+ x86-64

correlation_with_confidence-1.0.1-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (401.0 kB view details)

Uploaded CPython 3.9+manylinux: glibc 2.17+ ARM64

correlation_with_confidence-1.0.1-cp39-abi3-macosx_11_0_arm64.whl (360.7 kB view details)

Uploaded CPython 3.9+macOS 11.0+ ARM64

File details

Details for the file correlation_with_confidence-1.0.1.tar.gz.

File metadata

File hashes

Hashes for correlation_with_confidence-1.0.1.tar.gz
Algorithm Hash digest
SHA256 d1ceb766ff6e9dc2638ccefe088b006aeda7b3dcce9bd9df57701dbe7a8737fe
MD5 32403b354da3bf461c6d4dbc18329d4a
BLAKE2b-256 71aafbd1e44f6741cf646e55cc3063aaca2f1c491b02f9a6b2cc12799140a8f4

See more details on using hashes here.

Provenance

The following attestation bundles were made for correlation_with_confidence-1.0.1.tar.gz:

Publisher: wheels.yml on zizieada/CorrelatingWithoutConfidence

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file correlation_with_confidence-1.0.1-cp39-abi3-win_amd64.whl.

File metadata

File hashes

Hashes for correlation_with_confidence-1.0.1-cp39-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 de3321bbb27dcc69cd79e20d1134da130dfc402e38ac99a34ee1cc640d5b5c17
MD5 8bfcc6e640359b8247c17a66fe213db6
BLAKE2b-256 e03ebdc8496a0e51c2467114d9cff1c476560e63e175dfea6fabee2a7b0a81f4

See more details on using hashes here.

Provenance

The following attestation bundles were made for correlation_with_confidence-1.0.1-cp39-abi3-win_amd64.whl:

Publisher: wheels.yml on zizieada/CorrelatingWithoutConfidence

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file correlation_with_confidence-1.0.1-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for correlation_with_confidence-1.0.1-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 3067539ce12b50a780b9d8132d1237d3bf1b3c878a2feed7c7470cbd2f32309f
MD5 c012328f8d6f5a6f4393f749f45d2550
BLAKE2b-256 b9380598736083951cd452f59f92669fe8033eb4d443fb74f381026f85e3a145

See more details on using hashes here.

Provenance

The following attestation bundles were made for correlation_with_confidence-1.0.1-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: wheels.yml on zizieada/CorrelatingWithoutConfidence

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file correlation_with_confidence-1.0.1-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for correlation_with_confidence-1.0.1-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 2f60d1ab96d88ec0c6b424f4df56fcc7949a110fa7652114bd1ed69eaac949fc
MD5 1c2e33dc7f7181bcb4d2cb8e9b2f9e33
BLAKE2b-256 83ee86beca166e1b4fc18c8d2f48de656140ca45cf012cc46eb26f024da55497

See more details on using hashes here.

Provenance

The following attestation bundles were made for correlation_with_confidence-1.0.1-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:

Publisher: wheels.yml on zizieada/CorrelatingWithoutConfidence

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file correlation_with_confidence-1.0.1-cp39-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for correlation_with_confidence-1.0.1-cp39-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 0863e4efd223a514c0d18a18438e487a1bffbaae210e2fb4f72fa6edf6104600
MD5 81e8d9986bce51d956df68bc62bb5f0b
BLAKE2b-256 18897d912e081ea65f4dd8f0c5d009e9ae306e25f8a852da79fb59ab76089d06

See more details on using hashes here.

Provenance

The following attestation bundles were made for correlation_with_confidence-1.0.1-cp39-abi3-macosx_11_0_arm64.whl:

Publisher: wheels.yml on zizieada/CorrelatingWithoutConfidence

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page