【发布时间】:2019-09-30 18:28:05
【问题描述】:
在准备训练数据集时,我需要从训练数据集中删除目标变量数据还是保留它可以?那么,下面代码中的X = df[:,:] 应该排除目标变量还是重要?
# Feature to be predicted (y)
y = df['predicted'] #target variable
#Training data
X = df[:,:]
# Perform a 70% train and 30% test data split
X_train, X_test, y_train, y_test = ____(X, y, ____=____)
【问题讨论】:
标签: python pandas machine-learning scikit-learn training-data