ãã¼ã¿ã»ãããåå²ããã¨ãã« scikit-learn ã® train_test_split() ããã使ãï¼ä»å㯠train_test_split() ã«è¨å®ã§ãã stratify ãã©ã¡ã¼ã¿ã試ãï¼stratify ã¯ã層åãã¨ããæå³ã§ããã¼ã¿ã»ããã®ç¹æ§ãèæ ®ããåå²ãã¨ãè¨ããï¼ç¹ã«ãä¸åè¡¡ãã¼ã¿ã»ãããã使ãã¨ãã«éè¦ã«ãªãï¼ scikit-learn.org train_test_split() ãããã©ã«ãè¨å®ã§ä½¿ã train_test_split() ã®ããã©ã«ãè¨å®ãæç²ããã¨ä»¥ä¸ã®ããã«ãªãï¼stratify ã¯ããã©ã«ã㧠None ã«ãªãï¼ train_size = 0.75ï¼ãã¬ã¼ãã³ã°ãã¼ã¿ 75 %ï¼ test_size = 0.25ï¼ãã¹ããã¼ã¿ 25 %ï¼ shuffle = Trueï¼ã©ã³ãã ã«åå²ããï¼ stratify = Noneï¼å±¤åãªã
{{#tags}}- {{label}}
{{/tags}}