Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

performance of bpr #18

Open
jackyhawk opened this issue Jun 6, 2018 · 7 comments
Open

performance of bpr #18

jackyhawk opened this issue Jun 6, 2018 · 7 comments

Comments

@jackyhawk
Copy link

jackyhawk commented Jun 6, 2018

Hi all,

I just run bpr ,
and my input data is like this:
5 million users
680,000 items
5 billion clicks

and my machine is as the details at bottom.

and it would take me about 3.5 hours to train (convergence) with 20 epoch.

and is there any way to accelerate the speed of the training?

and my machine is like this:

lsb_release -a
LSB Version: :core-4.1-amd64:core-4.1-noarch:cxx-4.1-amd64:cxx-4.1-noarch:desktop-4.1-amd64:desktop-4.1-noarch:languages-4.1-amd64:languages-4.1-noarch:printing-4.1-amd64:printing-4.1-noarch
Distributor ID: CentOS
Description: CentOS Linux release 7.3.1611 (Core)
Release: 7.3.1611
Codename: Core

cat /proc/cpuinfo| grep "physical id"| sort| uniq| wc -l
2

cat /proc/cpuinfo| grep "cpu cores"| uniq
cpu cores : 8

cat /proc/cpuinfo| grep "processor"| wc -l
32

Thanks very much

@jackyhawk
Copy link
Author

Any suggestions for this? Thanks very much

@jackyhawk
Copy link
Author

And would als be a lot fater that bpr?

Thanks very much

@zenogantner
Copy link

In my experience ALS is often faster. Just try it out!

@jackyhawk
Copy link
Author

Thanks very much.

And I wonder why bpr is so slow?

@zenogantner
Copy link

There may be implementation details that contribute to it, but in general:

ALS (WRMF etc.) is linear in the number of observations and cubic in the number of factors (there may be better speed-ups nowadays).
BPR is also linear in the number of observations and linear in the number of factors, but needs more epochs to converge.

@jackyhawk
Copy link
Author

it seems that als is slower than bpr,
with the same amount of data( 0.5 billion)

@jackyhawk
Copy link
Author

it would take about 18 hours to train bpr and 40 hours to train als for about 0.5 billion training data

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants