We do not have a direct recipe to do so.
The fastest way is probably as a SQL recipe. For instance in Hive:
SELECT * FROM train_set WHERE target = 1
UNION ALL
SELECT * FROM (SELECT * FROM train_set WHERE target = 0 ORDER BY rand() LIMIT 1000000) foo
We do not have a direct recipe to do so.
The fastest way is probably as a SQL recipe. For instance in Hive:
SELECT * FROM train_set WHERE target = 1
UNION ALL
SELECT * FROM (SELECT * FROM train_set WHERE target = 0 ORDER BY rand() LIMIT 1000000) foo