-
Notifications
You must be signed in to change notification settings - Fork 48
docs: add snippets for Matrix Factorization tutorials #1630
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
Conversation
…-bigquery-dataframes into b338873783-mf-snippets
Here is the summary of changes. You are about to add 6 region tags.
This comment is generated by snippet-bot.
|
Snippet bot failure looks like a real one:
Edit: I created a suggested commit that I think should fix that. |
# Load movies | ||
movies = bpd.read_gbq("bqml_tutorial.movies") | ||
|
||
# Merge the movies df with the previously created predicted df | ||
merged_df = bpd.merge(predicted, movies, left_on="item_id", right_on="movie_id") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
predicted
here is only a subset. The SQL shows creating a table of all the predictions.
CREATE OR REPLACE TABLE `bqml_tutorial.recommend`
AS
SELECT
*
FROM
ML.RECOMMEND(MODEL `bqml_tutorial.mf_explicit`);
Did we implement a way for predict()
to work without any inputs like in the SQL?
# Load movies | |
movies = bpd.read_gbq("bqml_tutorial.movies") | |
# Merge the movies df with the previously created predicted df | |
merged_df = bpd.merge(predicted, movies, left_on="item_id", right_on="movie_id") | |
predicted = model.predict() | |
# Load movies | |
movies = bpd.read_gbq("bqml_tutorial.movies") | |
# Merge the movies df with the previously created predicted df | |
merged_df = bpd.merge(predicted, movies, left_on="item_id", right_on="movie_id") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This feature isn't supported yet and an issue will be filed shortly
Co-authored-by: Tim Sweña (Swast) <swast@google.com>
Co-authored-by: Tim Sweña (Swast) <swast@google.com>
Samples tests passed! 🥳 |
Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:
Fixes #<issue_number_goes_here> 🦕