A Python3 implementation of Partial Least Squares Correlation, or PLS.
Python >=3.5
See requirements.txt for more info on required modules.
Using git clone and python setup.py install should do the trick.
Currently both BehavioralPLS and MeanCenteredPLS are implemented. Example usage:
>>> import pyls
>>> rs = np.random.RandomState(123)
>>> X = rs.rand(20, 10000)
>>> Y = rs.rand(20, 10)
>>> opts = dict(n_perm=100, n_boot=50, n_split=50, seed=rs)
>>> bpls = pyls.BehavioralPLS(X, Y, **opts)
>>> groups = [10, 10]
>>> bpls2 = pyls.BehavioralPLS(X, Y, groups=groups, **opts)
# by default, it assumes there is only one condition but we can set more
>>> groups, n_cond = [5, 5], 2
>>> bpls3 = pyls.BehavioralPLS(X, Y, groups=groups, n_cond=n_cond, **opts)