-
Notifications
You must be signed in to change notification settings - Fork 206
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
Modifying the usage to use weighted train data , instead of individual train data points #109
Comments
Sample weights are not yet supported but I plan to add this feature with the next major release. |
Is there an update on this - I imagine it could be handled with conforming to the sklearn sample_weights parameter which can be provided when fitting a model (see https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.LogisticRegression.html#sklearn.linear_model.LogisticRegression.fit) |
@ZeerakW A |
@ibayer Oh that sounds amazing! Thanks for your efforts! |
Hi @ibayer, thank you for your work on this. Do you have an updated estimate of when it will be available? |
I can give an update but not an (estimated) release date. For regression we already have released c++ code supporting sample weights but the python interface doesn't support it However, feel free to open a feature request on https://github.com/palaimon/fastfm2 to help us with prioritization. |
@ibayer Congrats on the new package and updating the c++ code! I was specifically thinking about using weights for classification using the SGD solver. Are you still planning on having the 3 solvers ALS, SGD, and MCMC? |
Yes, BUT imo sgd is the least interesting solver and implemented more for completeness. ALS / coordinate descent is in general both faster and easier to use for FMs. What your motivation to prefer sgd? |
While testing the different solvers, I was running into a data input error (if I remember correctly) using If it would be helpful for me to recreate the |
This makes sense. fastfm uses probit regression (same as libfm) for
Thanks for the offer. I hope it's not needed since edit: I recommend to star https://github.com/palaimon/fastfm2 and open issue with request for sample weight support. |
Awesome, will do. Thank you again for taking the time to add this functionality, looking forward to its release! |
Say, you have data point in test as
X1, X2, X2 -> Y1
X1, X2, X2 -> Y1
X1, X2, X2 -> Y1
X1, X2, X3 -> Y1'
X1, X2, X3 -> Y1' - this gives fm.w0_, fm.w_ and fm.V_ as learnt model params
instead of treating them as 4 points (which increases the size of the train data set), is it possible to use weights,such that we train using the full sample, but now on aggregate data points, with the number of times occurred as weights, instead of 5 data points, as in example above ?
X1, X2, X2 -> Y1 - weight 3
X1, X2, X3 -> Y1' -> weight 2 so that the training still gives us the same fm.w0_, fm.w_ and fm.V_ as it were trained with 5 samples above.
The text was updated successfully, but these errors were encountered: