-
Notifications
You must be signed in to change notification settings - Fork 6
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
Benchmarks against other implementations #6
Comments
This task is OS-dependent since there are various methods installing the desired packages and and executing them. I suppose the best approach would be to clone the respective repositories and run the corresponding installing scripts. |
A script I wrote recently for benchmarking against fastfm: import numpy as np
from fastFM import sgd
from scipy.sparse import hstack
from sklearn.datasets import load_svmlight_file
from sklearn.metrics import mean_squared_error
from math import sqrt
X_train, y_train = load_svmlight_file("ml100k_train.txt.clean")
n_train = X_train.shape[1]
X_test, y_test = load_svmlight_file("ml100k_test.txt.clean")
m_test, n_test = X_test.shape
X_test = hstack((X_test, np.zeros((m_test, n_train - n_test), dtype=np.float)))
fm = sgd.FMRegression(n_iter=10, init_stdev=0.01, rank=4, l2_reg_w=0.0, l2_reg_V=0.0, step_size=0.1)
fm.fit(X_train, y_train)
y_pred = fm.predict(X_test)
print(sqrt(mean_squared_error(y_pred, y_test))) |
If it's OS dependent, what do You think about docerizing it? |
Docker is a good idea for accurate/fair benchmarks; however, I am uncertain how much work would be required to get this working. Perhaps we can get something simple working first and move to Docker if this becomes a popular library across several platforms? |
Ok. When we have bash/pytho/julia script for running it, we are only simple step to encapsulate it inside the container. |
Agreed. Time for me to review Docker. |
Technically the PR for this issue has been merged, although the current implementation is slower than |
Some other implementations to compare to:
Tasks:
Experiment approach
X_train, y_train
and testX_test, y_test
X_train, y_train
(and measure the training time)X_test, y_test
Implementing the experiment (up for discussion/alternatives)
benchmarks/
folderThe text was updated successfully, but these errors were encountered: