def create_train_test(feats, targs, train_frac=0.8):
    """
    train_frac: float between 0 and 1, fraction of dataset to use for training
    """
    train_idx = int(train_frac * feats.shape[0])

    train_feats = feats[:train_idx]
    train_targs = targs[:train_idx]

    test_feats = feats[train_idx:]
    test_targs = targs[train_idx:]

    return train_feats, train_targs, test_feats, test_targs