Skip to content

Instantly share code, notes, and snippets.

@yilmazerhakan
Created June 18, 2019 07:01
Show Gist options
  • Save yilmazerhakan/7f2751ed448577f1d3d7881453cc8cfc to your computer and use it in GitHub Desktop.
Save yilmazerhakan/7f2751ed448577f1d3d7881453cc8cfc to your computer and use it in GitHub Desktop.
-- Create test training data (%80) from ML-100K
CREATE TABLE ratings2
as
select
rand() as rnd,
userid,
movieid,
rating
from
ratings;
CREATE TABLE training
as
select * from ratings2
order by rnd DESC
limit 80000;
CREATE TABLE testing
as
select * from ratings2
order by rnd ASC
limit 80000, 100000;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment