0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

機械学習メモ(train_test_splitのrandom_state)

0
Posted at

train_test_splitのrandom_stateについてずっと疑問だったが、なんとなく理解したのでメモ
random_stateを使うと設定した値を基にして、ランダムな選択がされる。
(どのような仕組みになっているのか深いところまでは不明)

例えば、random_state=1が2つある場合は、元のデータから同じランダムなデータが選択される。
random_state=1とrandom_state=2など変わった場合は、別のデータが選択される。

基本指定する数字が同じだったら同じ値が選択されると覚えておけばいい気がする。
数字自体には意味がなさそう・・

random_stateをつけなければ、毎回random_stateが変わって別々のものが出てくるイメージ

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?