Skip to content

Commit 6b83495

Browse files
committed
add software license for IDS + author credit
1 parent ade10d7 commit 6b83495

File tree

3 files changed

+37
-2
lines changed

3 files changed

+37
-2
lines changed

pyspi/lib/ids/LICENSE.txt

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2025 Adityanarayanan Radhakrishnan
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

pyspi/lib/ids/dependence.py

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,20 @@
1+
"""
2+
Interdependence Score (IDS) computation.
3+
Based on the work by Adityanarayanan Radhakrishnan (MIT License)
4+
Original: https://github.com/aradha/interdependence_scores
5+
Modified for use in pyspi package.
6+
"""
17
from .numpy_dependence import compute_IDS_numpy
28

39
def compute_IDS(X, Y=None, num_terms=6, p_norm='max',
410
p_val=False, num_tests=100, bandwidth_term=1/2):
511
"""Compute IDS between all pairs of variables in X (or between X and Y).
612
7-
Taken from the implementation in: https://github.com/aradha/interdependence_scores
13+
This is a modified version of the implementation from:
14+
https://github.com/aradha/interdependence_scores
815
16+
Original author: Adityanarayanan Radhakrishnan
17+
License: MIT (see LICENSE.txt)
918
1019
Parameters:
1120
X: np.ndarray or torch.Tensor
@@ -19,4 +28,4 @@ def compute_IDS(X, Y=None, num_terms=6, p_norm='max',
1928
IDS matrix, p-value matrix (if p_val=True)
2029
"""
2130
return compute_IDS_numpy(X, Y=Y, num_terms=num_terms, p_norm=p_norm,
22-
p_val=p_val, num_tests=num_tests, bandwidth_term=bandwidth_term)
31+
p_val=p_val, num_tests=num_tests, bandwidth_term=bandwidth_term)

pyspi/lib/ids/numpy_dependence.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
"""
2+
Interdependence Score (IDS) computation.
3+
Based on the work by Adityanarayanan Radhakrishnan (MIT License)
4+
Original: https://github.com/aradha/interdependence_scores
5+
"""
16
import numpy as np
27
import math
38
import sys

0 commit comments

Comments
 (0)