fabiopetroni / libfm_with_bpr Goto Github PK
View Code? Open in Web Editor NEWLicense: GNU General Public License v3.0
License: GNU General Public License v3.0
I executed
./libFM -task r -top_k 10 -iter 5 -out y_pred.txt -method bpr -train train.libsvm -test test.libsvm -dim '1,1,8' -relation feature_t,label_t
and I set train.libsvm and test.libsvm to null text files.
The output information is :
Loading train...
has x = 1
has xt = 0
num_rows=0 num_values=0 num_features=0 min_target=3.40282e+38
max_target=-3.40282e+38
Loading test...
has x = 1
has xt = 0
num_rows=0 num_values=0 num_features=0 min_target=3.40282e+38
max_target=-3.40282e+38
#relations: 2
has x = 1
has xt = 0
data... num_cases=110001 num_values=55017091 num_features=13269
has x = 1
has xt = 0
data...
" at character 0rse line "0
I don't understand what it means. Dose it indicate that I have a 0 in the wrong place? But where?
Hi Fabio,
Thanks for the nice piece of software, I am really looking forward to use it.
I had issues to install this software on my laptop (Ubuntu 14 LTS 64 bit).
I had no issue whatsoever to install the standard libfm package (it compiled right out of the box), but I had to edit the makefile in ./src/libfm/. Here is the makefile I am using:
BIN_DIR := ../../bin/
OBJECTS := \
libfm.o \
tools/transpose.o \
tools/convert.o \
all: libFM transpose convert
libFM: libfm.o
mkdir -p $(BIN_DIR)
g++ -std=c++11 -pthread -O3 -Wall libfm.o -o $(BIN_DIR)libFM
%.o: %.cpp
g++ -std=c++11 -pthread -O3 -Wall -c $< -o $@
clean: clean_lib
mkdir -p $(BIN_DIR)
rm -f $(BIN_DIR)libFM $(BIN_DIR)convert $(BIN_DIR)transpose
clean_lib:
rm -f $(OBJECTS)
transpose: tools/transpose.o
mkdir -p $(BIN_DIR)
g++ -std=c++11 -pthread -O3 tools/transpose.o -o $(BIN_DIR)transpose
convert: tools/convert.o
mkdir -p $(BIN_DIR)
g++ -std=c++11 -pthread -O3 tools/convert.o -o $(BIN_DIR)convert
The '-std=c++11' flag has been added due to an error:
src/fm_learn_sgd_element_BPR_blocks_compute_ranked_list_parallel.h:158:28: error: ‘to_string’ is not a member of ‘std’
file_name = file_name + std::to_string(td[t].fixed_block_id);
The '-pthread' flag has been added to avoid a bunch of errors such as:
libfm.cpp:(.text+0x778b): undefined reference to
pthread_create' libfm.cpp:(.text+0x7992): undefined reference to
pthread_join'
Just recording this not knowing if it may be useful to anybody (as I am not an expert in makefiles).
Let me know if you want me to make a pull request!
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.