Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
from sklearn.model_selection import train_test_split
class StockPredictor(object):
def __init__(self, company, test_size=0.33,
n_latency_days=10, n_hidden_states=4):
self._init_logger() = company
self.n_latency_days = n_latency_days
self.hmm = GaussianHMM(n_components=n_hidden_states)
def _split_train_test_data(self, test_size):
data = pd.read_csv(
_train_data, test_data = train_test_split(
data, test_size=test_size, shuffle=False)
self._train_data = _train_data
self._test_data = test_data
def fit(self):'>>> Extracting Features')
feature_vector = StockPredictor._extract_features(self._train_data)'Features extraction Completed <<<')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment