Giter Site home page Giter Site logo

libfm_with_bpr's People

Contributors

fabiopetroni avatar paolorais avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

libfm_with_bpr's Issues

Encountered " at character 0rse line "0 error while using libFM_with_BPR

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?

Makefile not working

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 topthread_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!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.