(self, sample)
| 388 | return clf |
| 389 | |
| 390 | def predict(self, sample): |
| 391 | last_sample = sample[-1] |
| 392 | nn_price = 0.00 |
| 393 | sample = StandardScaler().fit_transform(sample) |
| 394 | recommend = self.clf.predict(sample) |
| 395 | recommend_str = 'HOLD' if recommend[0] == ClassifierTest.HOLD else ( |
| 396 | 'BUY' if recommend[0] == ClassifierTest.BUY else 'SELL') |
| 397 | projected_change_pct = 0.00 |
| 398 | return recommend_str, nn_price, last_sample, projected_change_pct |
| 399 | |
| 400 | def graph_url(self): |
| 401 | return '/static/' + str(self.pk) + '.png' |
no outgoing calls
no test coverage detected