slinderman / recurrent-slds

Recurrent Switching Linear Dynamical Systems
MIT License
97 stars 23 forks source link

Had a hard time installing it, but made it through... #11

Closed dvoina13 closed 1 year ago

dvoina13 commented 1 year ago

hi,

For anyone trying to get rSLDS to work, it took a long time to install everything as these packages are not maintained. Here's what I did, hoping it helps someone down the line:

*starting with new conda environment from scratch:

conda create -n slds_env pip python=3.5.4 conda activate slds_env pip install numpy==1.13.3

after doing git clone for all the recommended packages: pybasicbayes, pyhsmm, pypolyagamma, pylds, pyslds, ...

cd pybasicbayes/ pip install . cd .. pip install requests conda install cython cd pyhsmm pip install . cd ../pypolyagamma/ pip install . cd ../pylds pip install . cd ../pyslds/ pip install .

git clone autoregressive from mattjj/pyhsmm-autoregressive

cd ../pyhsmm-autoregressive/

modify the setup.py doc in pyhsmm-autoregressive. The following two line need to be replaced:

eigenurl = 'http://bitbucket.org/eigen/eigen/get/3.2.6.tar.gz'

eigenurl = 'https://gitlab.com/libeigen/eigen/-/archive/3.2.6/eigen-3.2.6.tar.gz'

thedir = glob(join('deps', 'eigen-eigen-*'))[0]

thedir = glob(join('deps', 'eigen-*'))[0]

pip install . cd ../recurrent-slds/ pip install . conda install tqdm conda install scikit-learn python examples/nascar.py

slinderman commented 1 year ago

Amazing! Thanks for sharing your experience.

FYI, we do have another version of recurrent SLDS in https://github.com/lindermanlab/ssm. It uses variational inference instead of PG augmentation and Gibbs sampling, but it should be a little easier to install. One day I hope to write a JAX version!

Best, Scott