【发布时间】:2018-08-15 07:27:35
【问题描述】:
有人能解释一下下面例子中random_state 的含义吗?
import numpy as np
from sklearn.model_selection import train_test_split
X, y = np.arange(10).reshape((5, 2)), range(5)
X_train, X_test, y_train, y_test = train_test_split(
X, y, test_size=0.33, random_state=42)
为什么硬编码为 42?
【问题讨论】:
标签: python numpy machine-learning random scikit-learn