You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I can't find the way for save the model?Could someone help to solve this? thx
now I can run like this:
fm = pylibfm.FM()
fm.fit(X,y)
fm.predict(v.transform({"user": "1", "item": "10", "age": 24}))
but can't to find the way to save the model
The text was updated successfully, but these errors were encountered:
Hi @Darinyazanr,
maybe "pickle" library can help you
code as follows:
import pickle
fm = pylibfm.FM()
fm.fit(X,y)
with open('fm_model.pkl', 'wb') as f:
pickle.dump(fm, f)
del fm # make sure variable is empty
with open('fm_model.pkl', 'rb') as f:
fm = pickle.load(f)
fm.predict(v.transform({"user": "1", "item": "10", "age": 24}))
after that
you'll get a file named "fm_model.pkl" under the same directory
I can't find the way for save the model?Could someone help to solve this? thx
now I can run like this:
fm = pylibfm.FM()
fm.fit(X,y)
fm.predict(v.transform({"user": "1", "item": "10", "age": 24}))
but can't to find the way to save the model
The text was updated successfully, but these errors were encountered: