Skip to content

Commit 7ac28e1

Browse files
Merge branches 'master' and 'master' of https://github.com/priyanshu-8789/Python
2 parents 67b1d80 + f2793d3 commit 7ac28e1

File tree

1 file changed

+3
-1
lines changed
  • machine_learning/forecasting

1 file changed

+3
-1
lines changed

machine_learning/forecasting/run.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
for the next 3 months sales or something,
1111
u can just adjust it for ur own purpose
1212
"""
13+
1314
from warnings import simplefilter
1415

1516
import numpy as np
@@ -77,6 +78,7 @@ def support_vector_regressor(x_train: list, x_test: list, train_user: list) -> f
7778
y_pred = regressor.predict(x_test)
7879
return float(y_pred[0])
7980

81+
8082
def random_forest_regressor(x_train: list, x_test: list, train_user: list) -> float:
8183
"""
8284
Fourth method: Random Forest Regressor
@@ -90,7 +92,7 @@ def random_forest_regressor(x_train: list, x_test: list, train_user: list) -> fl
9092
input : training data (date, total_event) in list of float
9193
where x = list of set (date and total event)
9294
output : list of total user prediction in float
93-
95+
9496
>>> random_forest_regressor([[5,2],[1,5],[6,2]], [[3,2]], [2,1,4])
9597
2.3333333333333335
9698
"""

0 commit comments

Comments
 (0)