Train_test_split中的Random_State的范围是多少
我有一个带有300个观测值的数据集,我正在使用75%作为火车数据和25%作为测试数据的Train_test_split。
对于Random_State = 2,我的精度为90%。 对于Random_State = 138,精度= 92% 如果我在某个地方增加随机状态,我将获得96%至100%。
我想知道Random_state的范围。
I have a dataset with 300 observations, I am doing train_test_split with 75% as train data and 25% as test data.
I got an accuracy of 90% for random_state = 2.
for random_state = 138 , accuracy = 92%
if i increase random state somewhere I will get 96% to 100%.
I wanted to know the range of random_state.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
根据文档::
换句话说,0到4294967295。
随机种子与模型的性能之间绝对没有对应关系。不要像对待超级参数一样对待它。
最好阅读用户指南第10.3节。这还解释了如何以更多的细微差别来控制随机数的生成。
According to the documentation:
In other words, 0 to 4294967295.
There is absolutely no correspondence between the random seed and the performance of your model. Don't treat it like a hyperparameter.
It's a good idea to read section 10.3 of the User Guide. This also explains how you can control the random number generation with more nuance.