grafos-ml / test.fm Goto Github PK
View Code? Open in Web Editor NEWTesting framework for Collaborative Filtering
License: Other
Testing framework for Collaborative Filtering
License: Other
When trying to set parameters on PyTensorCoFi the internal structures don't change crashing the system
I made example for tuning the method, but it fails.
Could you check what is the problem? I believe its with **kwargs
Hi @ALL,
once I've installed and compiled LAPACK + ATLAS (atlas3.10.3) + test.fm-1.0
under:
now running one of the available tests-src as:
sysadmin@dev-host-01:~/testfm/test.fm-1.0/src/tests$ python test_models.py
Traceback (most recent call last):
File "test_models.py", line 10, in <module>
from testfm.models.graphchi_models import SVDpp
File "build/bdist.linux-x86_64/egg/testfm/models/graphchi_models.py", line 9, in <module>
File "build/bdist.linux-x86_64/egg/testfm/models/cutil/interface.py", line 7, in <module>
File "build/bdist.linux-x86_64/egg/testfm/models/cutil/interface.py", line 6, in __bootstrap__
File "src/testfm/models/cutil/float_matrix.pxd", line 10, in init testfm.models.cutil.interface (src/testfm/models/cutil/interface.c:8464)
File "build/bdist.linux-x86_64/egg/testfm/models/cutil/float_matrix.py", line 7, in <module>
File "build/bdist.linux-x86_64/egg/testfm/models/cutil/float_matrix.py", line 6, in __bootstrap__
**ImportError: /home/sysadmin/.cache/Python-Eggs/testfm-1.0-py2.7-linux-x86_64.egg-tmp/testfm/models/cutil/float_matrix.so: undefined symbol: clapack_sgesv**
Please, any idea?? At this time I've tried many options and read a lot of forums related with this error, but none of them have fixed this problem,
thanks in advance for your help,
regards,
@rheras
$> sudo pip install test.fm-1.0.tar.gz
.....(output omitted)....
error: Command "gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.7 -c src/testfm/evaluation/cutil/measures.c -o build/temp.linux-x86_64-2.7/src/testfm/evaluation/cutil/measures.o" failed with exit status 1
Command /usr/bin/python -c "import setuptools;file='/tmp/pip-LXq7fY-build/setup.py';exec(compile(open(file).read().replace('\r\n', '\n'), file, 'exec'))" install --single-version-externally-managed --record /tmp/pip-q437OF-record/install-record.txt failed with error code 1
$> sudo python setup.py install
.....(output omitted)....
cythoning src/testfm/evaluation/cutil/measures.pyx to src/testfm/evaluation/cutil/measures.c
...
cdef int i
for i in range(list_size):
#printf(">>>%f %f\n", ranked_list[i], ranked_list[i+1])
if ranked_list[i*2] == 1.:
relevant += 1.
map_measure += (relevant / (i+1.))
src/testfm/evaluation/cutil/measures.pyx:48:41: Pythonic division not allowed without gil, consider using cython.cdivision(True)
...
for i in range(list_size):
#printf(">>>%f %f\n", ranked_list[i], ranked_list[i+1])
if ranked_list[i*2] == 1.:
relevant += 1.
map_measure += (relevant / (i+1.))
return 0.0 if relevant == 0. else (map_measure/relevant)
src/testfm/evaluation/cutil/measures.pyx:49:54: Pythonic division not allowed without gil, consider using cython.cdivision(True)
building 'testfm.evaluation.cutil.measures' extension
C compiler: gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC
compile options: '-I/usr/include/python2.7 -c'
gcc: src/testfm/evaluation/cutil/measures.c
src/testfm/evaluation/cutil/measures.c:1:2: error: #error Do not use this file, it is the result of a failed Cython compilation.
src/testfm/evaluation/cutil/measures.c:1:2: error: #error Do not use this file, it is the result of a failed Cython compilation.
error: Command "gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.7 -c src/testfm/evaluation/cutil/measures.c -o build/temp.linux-x86_64-2.7/src/testfm/evaluation/cutil/measures.o" failed with exit status 1
AttributeError: 'SVDpp' object has no attribute '_lamb'
Apparently this model cannot print it string form because has a reference for a non existing Attribute.
C implementation of TensorCoFi randomly make model that produce results a bit different that the standard. The results continue way better that Random.
Average Model is crashing when some column have non numeric values.
In test set they produce the same results but with my movie data the results are very different.
BPR Model cannot be tuned because it don't have the param_details implemented
if you run nose tests, this one fails:
/Users/linas/devel/test.fm/src/tests/test_fm.py
The setup doesn't install anymore. Complains about the requirements. Possible special characters in URL requirement are messing with the string.
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output
The performance of BPR is close to random.
Alex, could you try to fix it. If you run examples/models_example.py the performance should be better similar to popularity or at least better than random :)
BTW, I use 1M movielens to check the performance using this data loading:
df = pd.read_csv(DATAPATH+"/1M_movielens/ratings.dat",
sep=" ", header=None, names=["user", "item", "rating", "date"])
print df.head()
training, testing = testfm.split.holdoutByRandom(df, 0.8)
The example in the Okapi connector is crashing when the data is sliced into training and testing. The result files are not being found at hadoop fs.
The structs in cython models (float_matrix) is not being serialized so it cannot be passed throw standard multi processing interface.
The example in the readme trows errors
This module gives to much problems. Take it off.
When use the online method of tensorCoFi if the data on evaluator has users or items not used in the model, it throw a segmentation fault.
Now for each training of graphchi we create a lot of file in /tmp, we need to clean them up, or directly use pipes.
Refitting the same "FactorModel" is producing Segmentation Fault shown at tunning example.
HI all,
I've run libfm in Ubuntu using the dataset detailed below,
Random model run OK,
however when I tried the rest of the models in my list (I followed the models_example.py example provided here), i.e. BPR, TFIDFModel, Popularity, TensorCoFi, ..., an error "ValueError: sample larger than population" is always triggered with every model.
Please, does anyone know what could be the source of this problem? any suggestion?
There are many entries in Internet related with this problem in python, but the answers and potential causes described I think doesn't apply this case, so is unclear for me.
Btw, the dataset size is bigger than 5K rows...
Thanks in advance,
regards,
R.
------------------ test:
python modeltest2.py
user item rating time title
0 1123 0 2 838985046 NameFilm
1 1107 0 1 838985046 NameFilm
2 1107 0 1 838985046 NameFilm
3 1107 0 2 838985046 NameFilm
4 1107 1 1 838985046 NameFilm
0:00:00.083082 Random [0.262394934911661]
0:00:09.887563 BPR (dim=10,iter=15,reg=0.0001,eta=0.001)
Traceback (most recent call last):
File "modeltest2.py", line 57, in
print evaluator.evaluate_model(m, testing, all_items=items,)
File "build/bdist.linux-x86_64/egg/testfm/evaluation/evaluator.py", line 83, in evaluate_model
File "build/bdist.linux-x86_64/egg/testfm/evaluation/evaluator.py", line 30, in partial_measure
File "/usr/lib/python2.7/random.py", line 321, in sample
raise ValueError("sample larger than population")
ValueError: sample larger than population
If I build on mac, I get:
$python setup.py develop
building 'testfm.evaluation.cutil.measures' extension
/usr/bin/clang -fno-strict-aliasing -fno-common -dynamic -pipe -Os -fwrapv -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/opt/local/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c src/testfm/evaluation/cutil/measures.c -o build/temp.macosx-10.9-x86_64-2.7/src/testfm/evaluation/cutil/measures.o
clang: error: no such file or directory: 'src/testfm/evaluation/cutil/measures.c'
clang: error: no input files
error: command '/usr/bin/clang' failed with exit status 1
can it be that measures.c is missing?
We need to update readme and dependencies.txt to reflect the recent changes.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.