如何在XGBoos中使用3d输入数据

2024-09-27 04:21:13 发布

您现在位置:Python中文网/ 问答频道 /正文

我正在使用XGboost并希望输入3d数据。你知道吗

但是XGboost假设是2d数据,那么我该怎么做呢?你知道吗

列车数据是三维数据(1952,50,2)

列车数据是1d数据(1952,)

X数据有两个特征,长度为50。你知道吗

import xgboost as xgb
mod = xgb.XGBRegressor()
mod.fit(X_train, y_train)
ValueError: Input numpy.ndarray must be 2 dimensional

Tags: 数据importnumpymodinputastrain特征

热门问题