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

matrix factorization #22

Closed
wants to merge 18 commits into from
Closed

matrix factorization #22

wants to merge 18 commits into from

Conversation

jhofman
Copy link
Contributor

@jhofman jhofman commented Jul 16, 2011

added simple matrix factorization (with regularization) in gd_mf.cc.

need to add mf to test suite.

@JohnLangford
Copy link
Member

Do we really want vw.R? And what does it do exactly?

Also, it would be cool if you could add an example to the wike about how to use MF.

@jhofman
Copy link
Contributor Author

jhofman commented Jul 18, 2011

vw.R just facilitates parameter sweeps for cross-validation, e.g.:

args <- list("b"=18,
"q"="ui",
"rank"=c(10,20,30),
"decay_learning_rate"=0.97,
"power_t"=0,
"learning_rate"=c(0.01,0.025,0.05,0.075,0.1,0.25),
"passes"=20,
"regularization"=c(0,0.001,0.01,0.1))

results <- vw_param_sweep("cat movielens_train.dat",
"cat movielens_test.dat",
cache_file="movielens.cache",
args,
base_name="movielens",
results_file="movielens.dat")

we can probably do w/o it, it's quite rough around the edges and probably not appropriate for general use at the moment anyway.

as for an example on the wiki, we can use the small movielens data set (100K ratings):

wget 'http://www.grouplens.org/system/files/ml-data.tar__0.gz'
tar zxvf ml-data.tar__0.gz
cd ml-data
awk -F"\t" '{printf "%d |u %d |i %d\n", $3,$1,$2}' < ua.base |
vw -b 18 -q ui --rank 10 --decay_learning_rate 0.97 --power_t 0 --learning_rate 0.025 --passes 20 --regularization 0.001 -f movielens.reg --cache_file movielens.cache
awk -F"\t" '{printf "%d |u %d |i %d\n", $3,$1,$2}' < ua.test |
vw -q ui --rank 10 -i movielens.reg -t

just let me know how to proceed.

@JohnLangford
Copy link
Member

Ok, I'm incorporating it. I removed vw.R, but perhaps you can add it into the example. Can you add an example on the wiki, and then make a post to the mailing list?

We should probably either bring LDA back in or make MF run as a separate executable for consistency.

@jhofman
Copy link
Contributor Author

jhofman commented Jul 19, 2011

wiki example is here: https://github.com/JohnLangford/vowpal_wabbit/wiki/Matrix-factorization-example

have you accepted the pull request and pushed the updated code to your github repo? (i don't see gd_mf.{h,cc} in the repo.)

just let me know and i'll send out a message to the mailing list.

@JohnLangford
Copy link
Member

Oops, right. I actually did everything local on my laptop. It's checked in
now.

-John

On Tue, Jul 19, 2011 at 2:31 PM, jhofman <
reply@reply.github.com>wrote:

wiki example is here:
https://github.com/JohnLangford/vowpal_wabbit/wiki/Matrix-factorization-example

have you accepted the pull request and pushed the updated code to your
github repo? (i don't see gd_mf.{h,cc} in the repo.)

just let me know and i'll send out a message to the mailing list.

Reply to this email directly or view it on GitHub:
#22 (comment)

JohnLangford pushed a commit that referenced this pull request Nov 15, 2014
…of epsilon greedy. Also fixed a bug in ActionSet::Get that was returning incorrect Action due to 0-based index assumption. This is fixed by adding methods to MWTAction class to make id 1-based or 0-based. This is not ideal but a good temporary solution to keep track of related code.
lokitoth pushed a commit to lokitoth/vowpal_wabbit that referenced this pull request Dec 20, 2019
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

Successfully merging this pull request may close these issues.

2 participants