Train_test_split中的Random_State的范围是多少

发布于 2025-02-08 20:53:29 字数 189 浏览 3 评论 0原文

我有一个带有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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

岁月无声 2025-02-15 20:53:29

根据文档::

整数值必须在[0,2 ** 32-1]

范围内

换句话说,0到4294967295。

随机种子与模型的性能之间绝对没有对应关系。不要像对待超级参数一样对待它。

最好阅读用户指南第10.3节。这还解释了如何以更多的细微差别来控制随机数的生成。

According to the documentation:

Integer values must be in the range [0, 2**32 - 1]

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文