A Forest of Trees Run
I was solving sololearn machine learning random forest project. But I am stuck and I cannot figure out the reason my code is failing. I have passe both the test cases, but I cannot access the hidden test cases. Here is the code I tried... import numpy as np import pandas as pd from sklearn.ensemble import RandomForestClassifier from sklearn.model_selection import train_test_split random_state = int(input()) n = int(input()) rows = [] for i in range(n): rows.append([float(a) for a in input().split()]) X = np.array(rows) y = np.array([int(a) for a in input().split()]) X_train, X_test, y_train, y_test = train_test_split(X, y, random_state=n) rf = RandomForestClassifier(n_estimators=5, random_state=n) rf.fit(X_train, y_train) result = rf.predict(X_test) print(result)