I am studying in machine learning now and I want to build up a recommender system. First, I would like to make a top-N recommendation using two existing methods and they are both written in C++ code. As the file are huge and complex, I want to call them with Python, instead of adding code on that. Which tool is suitable for my case? Thank you in advance!
You can use standard python api , Cython or Boost.python. It is much easier to work with boost.python. You have to add very little code to your c++ library and compile it as a module library which then you can call from python.
with boost you can easily add your classes and their methods. Additionally you can introduce vector of an object which makes it easier to pass data to python and back to your library.
I recommend boost.python but you can look for yourself. There are a lot of tutorials on both cython and boost.python if you google it.
How can I call C++ code using Python?