Standalone Python module providing an implementation of interaction concordance index.
Project description
IC-index
An implementation of interaction concordance index as presented in [^1].
Installation:
Run
pip install ic_index
to install from PyPI, or
pip install git+https://github.com/TurkuML/Interaction-Concordance-Index
to install directly from github.
Example code for testing in Python interpreter
import numpy as np
import ic_index
# Generate random labels
example_Y = np.random.rand(35)
# Generate row indices of the pairs
example_rows = np.repeat(range(5), 7)
# Generate column indices of the pairs
example_cols = np.array(list(range(7))*5)
# Calculate IC-index with random predictions, result in [0, 1]:
print(ic_index.ic_index(example_rows, example_cols, example_Y, np.random.rand(35)))
# Calculate IC-index with correct labels, result 1:
print(ic_index.ic_index(example_rows, example_cols, example_Y, example_Y))
# Calculate IC-index with reversed labels, result -1:
print(ic_index.ic_index(example_rows, example_cols, example_Y, -example_Y))
# Calculate IC-index with constant labels, result 0.5:
print(ic_index.ic_index(example_rows, example_cols, example_Y, np.ones((35))))
References:
[^1]: Pahikkala, T., Numminen, R., Movahedi, P., Karmitsa, N., & Airola, A. (2025). Interaction Concordance Index: Performance Evaluation for Interaction Prediction Methods. arXiv preprint arXiv:2510.14419.
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
ic_index-0.1.0.tar.gz
(7.3 kB
view details)
File details
Details for the file ic_index-0.1.0.tar.gz.
File metadata
- Download URL: ic_index-0.1.0.tar.gz
- Upload date:
- Size: 7.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f9e6a15e758550efe10a641922e098df39866a3fcbead174febc4a3c6e684df4
|
|
| MD5 |
c9310f4308ae266bd16c6cb11c940f2b
|
|
| BLAKE2b-256 |
03fbbf33364c75e2c46217d4bdd9049f6ee4ace320670e998de6c695f79304a7
|