我有以下代码片段:
df = pd.read_csv("data.csv")
X = df.drop(['label'], axis=1)
Y= df['label']
le = LabelEncoder()
Y = le.fit_transform(Y)
mapping = dict(zip(le.classes_, range(len(le.classes_))))
x_train, x_test, y_train, y_test = train_test_split(X, Y, test_size=0.33, random_state=7,stratify=Y)
##xgb model
model = XGBClassifier()
model.fit(x_train, y_train)
#predict
y_pred = model.predict(x_train)
这里y_pred
给出了编码的标签。如何在编码之前获得真正的标签?