Zaktualizuj 'main.py'
This commit is contained in:
parent
101b46639c
commit
d817ede74d
9
main.py
9
main.py
@ -25,6 +25,9 @@ classifier = RandomForestClassifier()
|
||||
classifier.fit(X_train, y_transformed)
|
||||
y_pred = classifier.predict(X_test)
|
||||
|
||||
for i, prediction in enumerate(y_pred):
|
||||
print(data_test.iloc[i, 0] + ": ")
|
||||
print(prediction)
|
||||
# for i, prediction in enumerate(y_pred):
|
||||
# print(data_test.iloc[i, 0] + ": ")
|
||||
# print(prediction)
|
||||
|
||||
data_test['8'] = list(y_pred)
|
||||
data_test.to_csv('nazwa_pliku.dat', sep=' ', index=False)
|
Loading…
Reference in New Issue
Block a user