jameschapman19 / scikit-palm

Implementing permutation methods for multiview learning in python
BSD 3-Clause "New" or "Revised" License
5 stars 0 forks source link

skpalm.permutations.quickperms should return python indices #3

Open JohannesWiesner opened 2 years ago

JohannesWiesner commented 2 years ago

Just noticed that skpalm.permutations.quickperms returns MATLAB-style indices starting with 1 and not 0. This is not a big issue and can easily be resolved by simply subtracting 1 from the resulting matrix:

perms = quickperms(design_matrix=None,exchangeability_blocks=eb,perms=n_perms+1)
perms = perms[0]

# FIXME: quickperms creates MATLAB-style indices (starting with 1) but we need
# indices starting with 0
perms = perms - 1

but since this is a python function, users might fall into the trap of simply assuming python-indices? Maybe we should change that?