Skip to content

Factorization Machine in Python, trained using Alternating Least Squares

License

Notifications You must be signed in to change notification settings

mathewlee11/lmfm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

#LMFM

A factorisation machine written in cython, trained using Alternating Least Squares and sklearn compatible! Also recently added support for classification with LMFMClassifier, although I haven't tested it very much yet so there could be issues.

#Installation pip install lmfm

Done! You can also get the dev version with pip install git+git://github.com/mathewlee11/lmfm Requires cython, numpy, scipy and sklearn.

#Example

from sklearn.datasets import load_boston
from lmfm import LMFMRegressor
from sklearn.cross_validation import cross_val_predict
d = load_boston()
X = d.data
y = d.target

fm = LMFMRegressor(n_iter=100)

preds = cross_val_predict(fm, X, y)

About

Factorization Machine in Python, trained using Alternating Least Squares

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages