Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

what are cats? #38

Open
drakeeee opened this issue Aug 19, 2019 · 4 comments
Open

what are cats? #38

drakeeee opened this issue Aug 19, 2019 · 4 comments
Assignees

Comments

@drakeeee
Copy link

What are the cats argument required in the LogisticRegression model for example? I can't find any description of its identity in your documentation. Is it the number of categories to infer per sample?

@danielemaasit
Copy link

@drakeeee Yes, it is the number of categories.

@arteagac can you make the documentation more clear on the description of this argument.

@Emaasit
Copy link
Member

Emaasit commented Aug 19, 2019

self.num_cats = None

@arteagac arteagac self-assigned this Aug 19, 2019
@drakeeee
Copy link
Author

OK. The documentation or examples don't reveal much to what cats should be.
For example see:
http://docs.pymc-learn.org/en/latest/notebooks/LogisticRegression.html

where the data is defined:

x_a = np.random.randn(num_samples, num_pred)
y_a = np.random.binomial(1, numpy_invlogit(alphas[0] + np.sum(betas[0] * x_a, 1)))
x_b = np.random.randn(num_samples, num_pred)
y_b = np.random.binomial(1, numpy_invlogit(alphas[1] + np.sum(betas[1] * x_b, 1)))

X = np.concatenate([x_a, x_b])
y = np.concatenate([y_a, y_b])
cats = np.concatenate([
    np.zeros(num_samples, dtype=np.int),
    np.ones(num_samples, dtype=np.int)
])

Maybe I am being dense but I don't understand from this snippet whats cats is or should be in a logreg model.

@drakeeee
Copy link
Author

From that example it appears that you need to know cats before testing. Let me know if I am missing some kind of understanding.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants