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

Easy demo #230

Closed
holl- opened this issue Mar 16, 2024 · 7 comments
Closed

Easy demo #230

holl- opened this issue Mar 16, 2024 · 7 comments

Comments

@holl-
Copy link

holl- commented Mar 16, 2024

I'm trying to understand your easy demo but am having some trouble. Could you please add more documentation to explain what the code is doing? For example, clearly state your problem in the beginning. What variables are we actually interested in?

Could you also highlight why using your library is easier than doing this with Scikit learn or PyTorch or similar libraries? Couldn't I just pass (C,X) to a regular model and train it in supervised fashion? What does your library do that I couldn't easily achieve otherwise?

You introduce ε in the equation but I don't see this implemented in the code. The other variables are not explained either.

@cnellington
Copy link
Owner

Hi @holl- thanks for the comment. The goal of Contextualized is to recover context-dependent models from data. The "Death to Cluster Models" demo digs a little deeper than the demo you mention, and directly compares Contextualized regression against SKLearn regression and simple PyTorch neural networks applied to the same problem.

In general though, traditional statistical models do not account for context-dependent parameters and cannot generalize to new contexts. Neural networks are also insufficient on their own, and do not explicitly reveal a context-specific data distribution. Contextualized models recover context-specific models and generalize to new contexts.

Thanks for the catch about $\epsilon$, we should define this. I will update the demo soon to clarify. $\epsilon$ is a latent centered noise variable in linear regression and can be ignored when predicting the expected value of Y given X. We take our notation from https://en.wikipedia.org/wiki/Linear_regression

@holl-
Copy link
Author

holl- commented Mar 18, 2024

@cnellington Right, the other notebook is more detailed. However, the way your documentation is set up, most people will first look at the easy demo. It would be very helpful if there were some more comments explaining what is going on and linking to further documentation.

@cnellington
Copy link
Owner

@holl- I believe the documentation ordering and the descriptions for motivation and use are addressed by the recent PR above. Let us know if you have any other comments.

@holl-
Copy link
Author

holl- commented Apr 29, 2024

@cnellington Thanks for the update! I think it's a big step in the right direction.

Before I close the Issue, could you add the appropate documentation links to the easy_regression.ipynb notebook?
Here are my suggestions:

  • Under 2. Build and fit model, add a link to the documentation of the models / easy API.
  • Link an explanation of the bootstraps in 4. Check what the individual bootstrap models learned.
  • Add a Further Reading section at the end with links to the advanced notebook and most essential documentation sites.

@pescap
Copy link

pescap commented Apr 29, 2024

ontexts. Neural networks are also insufficient on their own, and do not explicitly reveal a context-specific data distribution. Contextualized models recover context-specific models and generalize to new contexts.

+1 from me, as a beginner, when I started trying the tutorials and reading the documentation.

Actually, one of my first questions was: why not use a neural network with the context as features (+shap).
I hope this gives more importance to these kinds of questions.

@cnellington
Copy link
Owner

@holl- @pescap Two recent changes on

  1. The regression tutorial: https://contextualized.ml/docs/models/easy_regression.html
  2. The under-the-hood page, explaining similarities and differences with post-hoc interpretability methods like SHAP and linking to an exploration of these similarities: https://contextualized.ml/docs/under-the-hood.html

Let me know if there is anything else you'd like us to address, but I believe this addresses all outstanding comments.

@holl-
Copy link
Author

holl- commented May 3, 2024

Looks good to me 👍

@holl- holl- closed this as completed May 3, 2024
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

3 participants