python bindings to libmf

matrix, factorization, machine, learning, parallelism, python, out, of, core, fast, matrix-factorization, online-learning, out-of-core
pip install libmf==0.9.2


install with pip

pip install libmf

Or install with

python install

Or compile from source

Still easy, you just need a standard c++ compiler, and you need to make sure that your file can find the file

$ cd python-libmf
$ g++ --std=c++11 src/*.cpp -shared -o

That should create a file which will use to interface with libmf. Make sure you know where this file is, because needs to reference it.

After compilation try running:

$ python tests/

if these work then you are good to go!

>>> from libmf import mf
>>> engine = mf.MF()
>>> engine.dict(ind)

data is a sparse numpy array consisting of data matrix indices x and y and a corresponding value. So each row is: (x,y,v). data.shape => (x, 3) where x is the number of observations

ind is a sparse numpy array of indices specifying where we want to predict unobserved values