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

Different values for same item? #19

Open
tanql opened this issue Oct 21, 2016 · 1 comment
Open

Different values for same item? #19

tanql opened this issue Oct 21, 2016 · 1 comment

Comments

@tanql
Copy link

tanql commented Oct 21, 2016

After training the model, I get different values of the same item, when I enter more items to the predicting list? Is this supposed to happend or is it a bug?
For eksample:
print fm.predict(v.fit_transform({"user": "1", "item": "10", "age": 24}))

print fm.predict(v.fit_transform([{"user": "1", "item": "10", "age": 24},{"user": "1", "item": "12", "age": 24}]))

both have user 1 and item 10, however the ratings of those would be different...

@sunxiang0301
Copy link

It is because in line 179 in pylibfm.py, the 'random_state' param in cross_validation.train_test_split is not specified. Modify it to
cross_validation.train_test_split(
X, y, test_size=self.validation_size, random_state=self.seed)
reinstall, and the problem fixed.

yetanotherion pushed a commit to yetanotherion/pyFM that referenced this issue Mar 7, 2019
Permits having the same result when running
the same experiment twice.

Follows recommendation given at
coreylynch#19
yetanotherion pushed a commit to yetanotherion/pyFM that referenced this issue Mar 7, 2019
Permits having the same result when running
the same experiment twice.

Follows recommendation given at
coreylynch#19
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