Giter Site home page Giter Site logo

libmf's People

Contributors

ankane avatar annseidel avatar cjlin1 avatar ericstj avatar kazewind22 avatar mosikico avatar mstfbl avatar ryaninhust avatar wschin avatar ycjuan avatar yixuan avatar

Stargazers

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

Watchers

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

libmf's Issues

Windows incompatibility message

Dear all,

When I tried running the executable recently, I received this error message below, for your information. My OS is Windows 10.

Capture

Calculation Error in line 601

libmf/mf.cpp

Line 601 in e70b9a3

XMM = _mm_add_ps(XMM, _mm_shuffle_ps(XMMtmp, XMMtmp, 1));

Line 600 and 601 are trying to add 4 floats to a single float. That is, they try to do
XMM[31:0] = XMM[31:0] + XMM[63:32] + XMM[95:64] + XMM[127:96].

Line 600 first add two pairs of floats. It does the following operation:
XMMtmp[63:0] = XMM[63:0] + XMM[127:64].

The current line 601 has the following operation:
XMM[31:0] = XMM[31:0] + XMMtmp[63:32].
But, I think the correct operation should be
XMM[31:0] = XMMtmp[31:0] + XMMtmp[63:32].

Therefore, line 601 should change to
"XMM = _mm_add_ps(XMMtmp, _mm_shuffle_ps(XMMtmp, XMMtmp, 1));".

NaN Values during training

I am currently trying to factorize a matrix using the MF_Solver with the KL Loss function. I experience NaN values during my training either after the 1st or the 2nd iteration. After creating small test cases, I have found that there might be an issue with large gradients causing negative values which are then converted to 0's in the sg_update function. This however seems to create 0 rows/columns in either my P or Q matrix which are not dealt with, as the prepare_for_sg_update function will calculate z=0, which results in NaN values which are carried through the calculations and eventually result in the whole model being filled with NaN values.

Can the algorithm (when calculating 1/z, one might consider 1/(z+epsilon) with epsilon>0) or my parameters (especially the learning rate) be adjusted to handle such cases?

Do you have some additional idea what might be causing NaN values during training?

User item bias

In the appendix of the original paper, A Fast Parallel SGD for Matrix Factorization in Shared Memory Systems, the formula states that LIBMF considers biases.

But it seems that this repository doesn't support this feature.

Is there a version that takes biases into consideration available?

LIBMF++ / RPCS

Hi @cjlin1, I recently came across your paper on LIBMF++. It sounds like RPCS has significant performance benefits. Are there any plans to bring it to LIBMF?

Error always Inf. when using GKL

Hello, I am trying to evaluate libmf, but when I use the GLK NNMF flags, I notice that no matter how I tune the parameters, I always get inf. for both the loss function and the error.

Possible overflow in matrix access

When trying to factorize a large matrix, I had a lot of weird errors in my calculations, which turned out to be due to seemingly random access to the model matrices P and Q. I found that in the calc_reg1_core function, there is a missing cast to mf_long in the matrix access:

for(mf_int j = 0; j < model.k; j++)
    tmp += abs(ptr[i*model.k+j]);

needs to be

for(mf_int j = 0; j < model.k; j++)
    tmp += abs(ptr[(mf_long)i*model.k+j]);

since i*model.k+j could be larger than INT_MAX

Ruby Library

Hi, thanks for this great library! Just wanted to let you know there are now Ruby bindings. It works great for collaborative filtering with both explicit and implicit feedback.

nan with disk-level training

Hi, when passing the --disk option, LIBMF prints nan for the tr_rmse and obj with the demo data.

./mf-train --disk demo/real_matrix.tr.txt

Output:

iter      tr_rmse          obj
   0          nan          nan
   1          nan          nan
   2          nan          nan
   3          nan          nan
   4          nan          nan
   5          nan          nan
   6          nan          nan
   7          nan          nan
   8          nan          nan
   9          nan          nan
  10          nan          nan
  11          nan          nan
  12          nan          nan
  13          nan          nan
  14          nan          nan
  15          nan          nan
  16          nan          nan
  17          nan          nan
  18          nan          nan
  19          nan          nan

Without the --disk option, it prints numeric values.

bug

I think the '&&' below should be change to '||' or it could be deleted.
if(model->fun == P_L2_MFC &&
  | model->fun == P_L1_MFC &&
  | model->fun == P_LR_MFC)
  | z = z > 0.0f? 1.0f: -1.0f;
 

row-oriented pair-wise logistic loss

请问 row-oriented pair-wise logistic loss是指对于负反馈的样本 我们随机选择一个物品作为这个用户的负反馈物品吗?然后做logistics

Row-oriented logistic loss for prediction

Hi,

I am trying to use the executable to conduct experiments. However, for the same parameters, the results seem to differ from the R wrapper Recosystem.

If I want to use row-oriented logistic loss for my prediction, can I check if
mf-train -l1 0 -l2 0 -f 10 -k 20 -t 20 -r 0.1 train_positive.txt bpr_model.txt
mf-predict -e 10 testset.txt bpr_model.txt bpr_output.txt

are the correct commands to enter?

Thank you very much!

how to set slow_only = True when iter > 0

I only find

2910 if(iter == 0)
2911 slow_only = false;

from mf.cpp. As twin learner described, when iter > 0, slow_only must to be set True.

But I can't find this code.

Can anybody tell me where is it?

Python interface not working on python3

The python interface errors when importing. It seems likely that it is due to the python2.7 formatted print statements. Error below:

File "", line 1, in
from libmf import mf

File "/usr/local/lib/python3.7/dist-packages/libmf/mf.py", line 78
print "Unrecognized keyword argument '{0}={1}'".format(kw, kwargs[kw])
^
SyntaxError: invalid syntax

OCMF Parallelization Implementation?

I understand that the algorithm implemented is the BPR proposed by Rendle et al. Based on my understanding of BPR, for each iteration, the model takes a triple or (u, i, j) and try to optimize towards the difference between Xui and Xuj. In Rendle's paper it was only mentioned that randomly choosing the triples is suggested. However, we couldn't find a paper from your team or information on your website and this repo on how did your package achieve parallelization for this algorithm. Is there any paper or information on the implementation details that you can share?

Thank you.

help with code

How can I run your library? to factorize a matrix in CSV file

mf-train: command not found

Dear actor!When I try to set up the programme in Ubuntu OS,there is a error that tf-train command not found.Hope your answer as soon as possible,Thank you!

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.