I am new to programming and data analysis. I am struggling with this issue. I am trying to predict weekly sales of a bunch of stores. I want to use XGBoost but I keep running into this error:
IndexError: tuple index out of range
from sklearn.model_selection import train_test_split features = ["Store",'Dept','Temperature','Fuel_Price','CPI','Unemployment'] y = allmergecopy.Weekly_Sales X = allmergecopy[features] X_train, y_train, X_valid, y_valid = train_test_split(y,X,test_size=.2, train_size=.8) from xgboost import XGBRegressor my_model = XGBRegressor(n_estimators=100) my_model.fit(X_train, y_train)
y_train.shape = (84314,), X_train.shape = (337256,). I am fumbling around in the dark, I have no idea what to do. As I said, I am VERY new to data analysis. This is my first project.