I am looking into performing NLP in Rust and sprs is a great library for creating sparse matrices in Rust. Now once those matrices are created I would like to use some machine learning algorithm to learn from those matrices. I can see that rustlearn has sparse matrices implemented. A basic way of converting one to the other would be to convert one to a vector and then load the other from the vector, but as expected this method blows up in my face. How can I convert from sprs vectors to rustlearn vectors?

0 Answers