coreylynch / pyFM

Factorization machines in python
921 stars 311 forks source link

Implement the Pickle interface for FM_fast #32

Closed tiagozortea closed 6 years ago

tiagozortea commented 6 years ago

Without this change, attempting to pickle the model will result in an error due to the FM_fast Class lacking a proper implementation of the pickle interface. This PR implements it and removes a few unnecessary spaces. Also attributes of the class are made public because if not pickle has no access to them.

The models can be potentially quite large, over 4GB depending on how many features you use. So I recommend using joblib instead of pickle.