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

Logistic Regression in scRNA #95

dawe opened this Issue Mar 1, 2018 · 2 comments


None yet
2 participants
Copy link

dawe commented Mar 1, 2018

Hi all,
Following this preprint and the polemic comment by its author, I wonder if Logistic Regression should be in scanpy environment.
I tried the sklearn.linear_model.LogisticRegressionCV classifier from scikit-learn. It is pretty fast and seems to do the job. Of course there is no urgent need to include in scanpy, as it can be used with two lines like

clf = sklearn.linear_model.LogisticRegressionCV(), adata.obs[group])

among the returned elements, clf.coef_ can be used to rank genes by their importance on each group, clf.predict_proba may be used to score the strength of cell/group association given the scored genes.
Any thought?


This comment has been minimized.

Copy link

falexwolf commented Mar 2, 2018

Hi Davide,

I like the preprint and the blog post. I agree that differential expression testing deserves a classification perspective. Coincidentally, we (with @tcallies) were also working on a little paper that makes this point but used neither logistic regression nor TCCs as covariates... unfortunately, we still haven't updated our benchmarks, but I'd assume that what Lior Pachter does works best. 😄

Anyways, yes, we should include it at some point but let's still collect some experience... Until then, people can use your two-line workaround. 😉



This comment has been minimized.

Copy link
Collaborator Author

dawe commented Mar 2, 2018

Agreed. I don’t think we should rush and include everything into scanpy, especially when it would be a simple wrapper of something existing.

@dawe dawe closed this Mar 2, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment