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.1.tar.gz
(7.3 kB
view details)
File details
Details for the file ic_index-0.1.1.tar.gz.
File metadata
- Download URL: ic_index-0.1.1.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 |
d8b28c38ea4504142ef563fcc621440e45c27683d4e32a065234faad225aa3b4
|
|
| MD5 |
e3c2d783485a25743cdda6c470ad835f
|
|
| BLAKE2b-256 |
c3caec848054d7ab6ac5f4d95ed037fc492badff4e4303946348b673fec1dabb
|