Skip to content

Commit 4bdc619

Browse files
committed
Adding fix from TheAlgorithms#1056 -- thanks @QuantumNovice
1 parent ef32568 commit 4bdc619

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

machine_learning/random_forest_regression/random_forest_regression.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
regressor.fit(X, y)
3131

3232
# Predicting a new result
33-
y_pred = regressor.predict(6.5).reshape(1, -1)
33+
y_pred = regressor.predict([[6.5]])
3434

3535
# Visualising the Random Forest Regression results (higher resolution)
3636
X_grid = np.arange(min(X), max(X), 0.01)

0 commit comments

Comments
 (0)