Giter Site home page Giter Site logo

Comments (5)

chihming avatar chihming commented on September 2, 2024 3

The original design doesn't consider the saving function. The current saving function is later added. In general, the mcmc method is supposed to save the modeling parameters for each iteration. In other words, 100 iterations will save the modeling parameters 100 times, which is quite big if we use a large dimensional dataset. Instead, libfm selects to make the predictions on-the-fly so it won't produce a big modeling file (or occupies too much memory).

Add -learn_rate 0.1 could solve the sgd issue.

from libfm.

timnon avatar timnon commented on September 2, 2024 1

thanks!

from libfm.

chihming avatar chihming commented on September 2, 2024

Could you check your commend line? In my case, -method mcmc won't save model, and the program will be terminated automatically like:

WARNING: -save_model enabled only for SGD and ALS.

I tried using -method als, the model looks good to me.

./bin/libFM -task r -method als -train train.libfm -test train.libfm -iter 10 -dim ‘0,0,1’ -out output.libfm -save_model model.libfm

I can always get a satisfied result that the multiplication of the two is larger than 1, such as:

#pairwise interactions Vj,f
7.79554
0.128279

BTW, there is one trick in libfm that the predictions will be replaced by MAX value when the predictions are larger than MAX.

from libfm.

timnon avatar timnon commented on September 2, 2024

Thanks for the quick reply!

Switching to -method mcmc works for me! But why does -method mcmc not? I can also save the model with -method mcmc using the command from above:

libFM -task r -method mcmc -train train.libfm -test train.libfm -iter 10 -dim ‘0,0,1’ -out output.libfm -save_model model.libfm

Using -method sgd gives me the following error (i guess this is another problem):

Loading meta data...
Assertion failed: ((lr.size() == 1) || (lr.size() == 3)), function main, file libfm.cpp, line 386.
./run.sh: line 1: 13540 Abort trap: 6           ../libfm/bin/libFM -task r -method sgd -train train.libfm -test train.libfm -iter 10 -dim ‘0,0,1’ -out output.libfm -save_model model.libfm

from libfm.

crystallp avatar crystallp commented on September 2, 2024

the result of output is always 0 or 1,but it want the predict value in 0 to 1,how about ?

from libfm.

Related Issues (20)

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.