Created
March 9, 2016 12:06
-
-
Save puyokw/413c5c2c2a152785d68b to your computer and use it in GitHub Desktop.
td_intern otto
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- トレーニングデータに乱数を入れる | |
INSERT OVERWRITE TABLE training_with_rnd | |
select *, rand(1) as rnd | |
from training; | |
-- rnd が0.3 以上のものをトレーニングデータ | |
INSERT OVERWRITE TABLE train_cv | |
select * | |
from training_with_rnd where rnd >= 0.3; | |
-- rnd が0.3 未満のものを検証用データ | |
INSERT OVERWRITE TABLE test_cv | |
select * | |
from training_with_rnd where rnd < 0.3; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment