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
import pywFM
import numpy as np
import pandas as pd
features = np.matrix([
# Users | Movies | Movie Ratings | Time | Last Movies Rated
# A B C | TI NH SW ST | TI NH SW ST | | TI NH SW ST
[1, 0, 0, 1, 0, 0, 0, 0.3, 0.3, 0.3, 0, 13, 0, 0, 0, 0 ],
[1, 0, 0, 0, 1, 0, 0, 0.3, 0.3, 0.3, 0, 14, 1, 0, 0, 0 ],
[1, 0, 0, 0, 0, 1, 0, 0.3, 0.3, 0.3, 0, 16, 0, 1, 0, 0 ],
[0, 1, 0, 0, 0, 1, 0, 0, 0, 0.5, 0.5, 5, 0, 0, 0, 0 ],
[0, 1, 0, 0, 0, 0, 1, 0, 0, 0.5, 0.5, 8, 0, 0, 1, 0 ],
[0, 0, 1, 1, 0, 0, 0, 0.5, 0, 0.5, 0, 9, 0, 0, 0, 0 ],
[0, 0, 1, 0, 0, 1, 0, 0.5, 0, 0.5, 0, 12, 1, 0, 0, 0 ]
])
target = [5, 3, 1, 4, 5, 1, 5]
fm = pywFM.FM(task='regression', num_iter=5)
model = fm.run(features[:5], target[:5], features[5:], target[5:])
I got this error
ERROR: the parameter save_model does not exist
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\FedRo\Anaconda\lib\site-packages\pywFM\__init__.py", line 231, in run
rlog = pd.read_csv(rlog_path, sep='\t')
File "C:\Users\FedRo\Anaconda\lib\site-packages\pandas\io\parsers.py", line 498, in parser_f
return _read(filepath_or_buffer, kwds)
File "C:\Users\FedRo\Anaconda\lib\site-packages\pandas\io\parsers.py", line 275, in _read
parser = TextFileReader(filepath_or_buffer, **kwds)
File "C:\Users\FedRo\Anaconda\lib\site-packages\pandas\io\parsers.py", line 590, in __init__
self._make_engine(self.engine)
File "C:\Users\FedRo\Anaconda\lib\site-packages\pandas\io\parsers.py", line 731, in _make_engine
self._engine = CParserWrapper(self.f, **self.options)
File "C:\Users\FedRo\Anaconda\lib\site-packages\pandas\io\parsers.py", line 1103, in __init__
self._reader = _parser.TextReader(src, **kwds)
File "pandas\parser.pyx", line 518, in pandas.parser.TextReader.__cinit__ (pandas\parser.c:5030)
ValueError: No columns to parse from file
so it looks like that -save_model doesn't work. My temporary solution is change lines 162 and 163 in __init__.py from:
Did you compiled libfm from source, or have you used any of the installers available? The save_model operation appears in this commit which is from October 2015. The installers on libfm.org are from 2014 and the windows one from 2013.
If I run the toy example:
I got this error
so it looks like that
-save_model
doesn't work. My temporary solution is change lines 162 and 163 in__init__.py
from:to:
The model starts working, you can use model prediction, but the model isn't saved.
The text was updated successfully, but these errors were encountered: