Zaktualizuj 'main.py'

This commit is contained in:
Jerzy Kwiatkowski 2023-06-22 17:33:26 +02:00
parent 101b46639c
commit d817ede74d

View File

@ -25,6 +25,9 @@ classifier = RandomForestClassifier()
classifier.fit(X_train, y_transformed) classifier.fit(X_train, y_transformed)
y_pred = classifier.predict(X_test) y_pred = classifier.predict(X_test)
for i, prediction in enumerate(y_pred): # for i, prediction in enumerate(y_pred):
print(data_test.iloc[i, 0] + ": ") # print(data_test.iloc[i, 0] + ": ")
print(prediction) # print(prediction)
data_test['8'] = list(y_pred)
data_test.to_csv('nazwa_pliku.dat', sep=' ', index=False)