Skip to content

Added Random Forest Regressor as an additional prediction model. #12767

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Prev Previous commit
Next Next commit
Update run.py
  • Loading branch information
priyanshu-8789 authored May 24, 2025
commit 062e04652c06f7c0fc62d418de1b84abf8304bde
2 changes: 1 addition & 1 deletion machine_learning/forecasting/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def random_forest_regressor(x_train: list, x_test: list, train_user: list) -> fl
output : list of total user prediction in float

>>> random_forest_regressor([[5,2],[1,5],[6,2]], [[3,2]], [2,1,4])
2.3333333333333335
1.95
"""
model = RandomForestRegressor(n_estimators=100, random_state=42)
model.fit(x_train, train_user)
Expand Down