I am training csv file with sklearn using DecesionTreeClassifier, RandomForestClassifier and SVC.
when i run it all of them give me the warning says "X has feature names, but Classifier was fitted without feature names" 4 times each. I get the data with pandas and i split the data like this
x = dataset_df.drop(columns="target", axis=1)
x_train, x_test, y_train, y_test = train_test_split(x,dataset_df.target, test_size=testset_size)
and the training part looks like this
x_train = StandardScaler().fit(x_train).transform(x_train)
dt_cls = DecisionTreeClassifier()
dt_cls.fit(x_train.values, y_train)
acc = accuracy_score(dt_cls.predict(x_test.values), y_test)
prec = precision_score(dt_cls.predict(x_test.values), y_test, pos_label = 1)
recall = recall_score(dt_cls.predict(x_test.values), y_test, pos_label = 1, zero_division=1)
return acc, prec, recall
I tried not to sandarize the data set or putting the dataset into numpy array, also not dropping target columns before splitting the set. obviously none of them work or changed anything. I also tried to print acc right after calculating it, but it didn't print. Also used x_train and x_test without .values but it was the same