Comments (8)
I'm seeing some discrepancies between libfm and fastfm with movielens. Before diving into my observations can you confirm the following are equivalent:
/libFM -train ml1m_train.svml -test ml1m_test.svml -task r -dim '1,1,10' -iter 1000 -method mcmc
X_train, y_train = load_svmlight_file("ml1m_train.svml")
X_test, y_test = load_svmlight_file("ml1m_test.svml")
fm = mcmc.FMRegression(n_iter=0, rank=10)
fm.fit_predict(X_train, y_train, X_test)
for i in range(1000):
y_pred = fm.fit_predict(X_train, y_train, X_test, n_more_iter=1)
y_pred[y_pred > 5] = 5
y_pred[y_pred < 1] = 1
print(i, np.sqrt(mean_squared_error(y_pred, y_test)))
from fastfm.
I don't see a difference, but please check that the init_stdev
parameter is the same.
Please have a look at my second comment above, this could explain your observation for small differences.
from fastfm.
Hi, Immanuel!
I was comparing different LibFM implementations (I was testing MCMC for LibFM and FastFM in particular).
Unfortunately, the results of fastFM are not super optimistic
http://arogozhnikov.github.io/2016/02/15/TestingLibFM.html
Then I found this topic, so honestly I wasn't thinking about clipping values.
This trick may give some improvement in regression, but LibFM also easily wins in classification.
Maybe you know a reason? FastFM uses different priors or something else?
from fastfm.
@arogozhnikov BTW, you need standardization especially for pyFM coreylynch/pyFM#3 (comment)
from fastfm.
@chezou all the features are dummy (0-1) and table should be sparse. No, for the tests I am running this step neither needed nor possible.
from fastfm.
@arogozhnikov
Great comparison, I have a few suggestions that could make the evaluation even more useful for other people.
- Provide the exact version of the software that you are testing.
- You find that libFM is faster then fastFM; I fixed a runtime regression bug in ibayer/fastFM-core@d57a866 , is this still true for the most recent release?
- Use clipping to make the performance comparison more meaningful (it make quite a difference in some cases).
- You state for fastFM "supports linux, mac os (though some issues with mac os)" is this still true with the binaries that we now have?
- Make multiple runs with different seeds to give the reader an idea of the randomness in the results.
As is, I'm not convinced that libFM is faster and performs better then fastFM for MCMC regression. I have done less comprehensive comparisons for MCMC classification but the algorithm / prior should be the same in both libraries. I would be interested to look into it if you can clearly show that libFM dominates fastFM systematically for MCMC classification.
from fastfm.
@ibayer
Thanks for comments.
- yup, you're right.
2-3. ok, I'll give a try - I don't have clean Mac OS (this was not trivial to install unfortunately) - but I asked a friend to try and seems pip install works fine on Mac OS. (Also, I see now that travis tests MacOS - so I'll remove this remark).
- This is hard part, will take forever and I don't see random seed in LibFM.
For smaller tests I can just take different random subsets of data in training. Would this be enough convincing?
from fastfm.
@arogozhnikov It's possible to use a random seed with libFM.
"seed", "integer value, default=None"
https://github.com/srendle/libfm/blob/master/src/libfm/libfm.cpp#L93
from fastfm.
Related Issues (20)
- pip install . is not working on Winodws HOT 1
- Illegal instruction (core dumped) in ALS HOT 5
- Can fastfm use mini batch? HOT 1
- Check pairs range failed when fitting BPR
- OverflowError: n_iter too high in bpr.FMRecommender HOT 1
- Need partial_fit HOT 1
- Can fastfm use multicore to speed up training? HOT 1
- Fit complaining about both dense/sparse HOT 2
- Recompile for python 3.7 HOT 7
- Input of fit() and return value of predict_proba() method
- Failure to install on Python3.8 HOT 8
- Fix simple typo: reommend -> recommend
- Import Error
- Compiling using OpenBLAS from anaconda
- Source file type in PyPi
- No coordinate descent solver available HOT 1
- Compilation error on macOS 11.2 ARM HOT 3
- Any plan to support py3.7+? HOT 1
- will it work for third order categorical features interaction ?
- will it work on windows OS?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fastfm.