Abu1998 commited on
Commit
fabc047
·
verified ·
1 Parent(s): f5a0084

Update predictor.py

Browse files
Files changed (1) hide show
  1. predictor.py +0 -2
predictor.py CHANGED
@@ -3,11 +3,9 @@ from sklearn.linear_model import LinearRegression
3
 
4
  class StockPredictor:
5
  def __init__(self):
6
- # Example model (replace with your trained model)
7
  self.model = LinearRegression()
8
 
9
  def train_model(self, historical_data):
10
- # Train the model on the historical data
11
  X = np.array(range(len(historical_data))).reshape(-1, 1)
12
  y = historical_data['Close'].values
13
  self.model.fit(X, y)
 
3
 
4
  class StockPredictor:
5
  def __init__(self):
 
6
  self.model = LinearRegression()
7
 
8
  def train_model(self, historical_data):
 
9
  X = np.array(range(len(historical_data))).reshape(-1, 1)
10
  y = historical_data['Close'].values
11
  self.model.fit(X, y)