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
Update run.py
  • Loading branch information
priyanshu-8789 authored May 25, 2025
commit f882dfc1a95961c2fa386c02f820fdbbe417bf2b
6 changes: 1 addition & 5 deletions machine_learning/forecasting/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@

from warnings import simplefilter

import logging
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
Expand All @@ -22,9 +21,6 @@
from sklearn.svm import SVR
from statsmodels.tsa.statespace.sarimax import SARIMAX

logging.basicConfig(level=logging.Info)
logger = logging.getLogger(__name__)


def linear_regression_prediction(
train_dt: list, train_usr: list, train_mtch: list, test_dt: list, test_mtch: list
Expand Down Expand Up @@ -205,6 +201,6 @@ def plot_forecast(actual, predictions):

# check the safety of today's data
not_str = "" if data_safety_checker(res_vote, test_user[0]) else "not "
logger.info(f"Today's data is {not_str}safe.")
print(f"Today's data is {not_str}safe.")

plot_forecast(train_user, res_vote)