MCPcopy Create free account
hub / github.com/VivekPa/AIAlpha / predict_prices

Method predict_prices

models/nnmodel.py:55–66  ·  view source on GitHub ↗
(self, x, y, prices)

Source from the content-addressed store, hash-verified

53 return pd.DataFrame(predicted_data)
54
55 def predict_prices(self, x, y, prices):
56 test_x = x
57 test_y = y
58 prices = prices
59 prediction_data = []
60 stock_data = []
61 for i in range(len(test_y)):
62 prediction = (self.model.predict(np.reshape(test_x[i, :], (1, 1, self.input_shape))))
63 prediction_data.append(np.reshape(prediction, (1,)))
64 pred_price = np.exp(np.reshape(prediction, (1,)))*prices[i]
65 stock_data.append(pred_price)
66 return prediction_data, stock_data
67

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected