Kaggle - London Bike Sharing (3): 데이터셋 split
# y에는 이용객 수를, x에는 그 외 값들을 넣는다. # timestamp 정보는 year/hour 등으로 나뉘어 들어가있으므로 df_x에서는 'timestamp'와 'cnt'를 제거 df_y = df_out['cnt'] df_x = df_out.drop['timestamp','cnt'],axis=1) # 열 기준으로 'timestamp', 'cnt' 값에 해당하는 데이터 drop from sklearn.model_selection import train_test_split x_train, x_test, y_train, y_test = train_test_split(df_x, df_y, random_state=66, test_size=0.3, shuffle=False) ''' random_state :..
2023. 10. 3.