diff --git a/main.py b/main.py index 31df1b7..1628f00 100644 --- a/main.py +++ b/main.py @@ -14,23 +14,17 @@ data_train = shuffled_data[:n] data_test = shuffled_data[n:] X_train = data_train.iloc[:, 1:-1].values -print(X_train) y_train = data_train.iloc[:, -1].values lab = preprocessing.LabelEncoder() y_transformed = lab.fit_transform(y_train) X_test = data_test.iloc[:, 1:-1].values -# y_test = data_test.iloc[:, 1:].values - -# svr = SVR() -# svr.fit(X_train, y_train) -# print(svr.score(X_train, y_train)) -# print(svr.score(X_test, y_test)) classifier = RandomForestClassifier() classifier.fit(X_train, y_transformed) y_pred = classifier.predict(X_test) for i, prediction in enumerate(y_pred): - print(f"Rekord {i+1}: collapse={prediction}") \ No newline at end of file + print(data_test.iloc[i, 0] + ": ") + print(prediction) \ No newline at end of file