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

Fully implement the print functions. #16

Open
codetalker7 opened this issue Jul 4, 2022 · 5 comments
Open

Fully implement the print functions. #16

codetalker7 opened this issue Jul 4, 2022 · 5 comments
Assignees
Labels
enhancement New feature or request

Comments

@codetalker7
Copy link
Member

The file for this issue is src/print.jl. We have extended the Base.show method to print details about models when they are trained; currently these details are not filled in appropriately, and might need some improvements.

@sourish-cmi sourish-cmi added the enhancement New feature or request label Sep 7, 2022
@sourish-cmi
Copy link
Collaborator

@codetalker7, any update on this issue?

@codetalker7
Copy link
Member Author

@sourish-cmi no update as such. I had just copied the old print messages (i.e from the old code) and put them in this file.

For Bayesian models, we just use the show method on the chain that Turing.jl returns.

For the frequentist models, the old code contained a few print statements; it'll be great if we can discuss proper printing messages for all these.

@sourish-cmi
Copy link
Collaborator

sourish-cmi commented Sep 8, 2022

@codetalker7, In the frequentist method, I think the output would be

Model Class: Linear Regression
Likelihood Mode: Gauss
Link Function: Identity
Computing Method: Optimization
───────────────────────────────────────────────────────────────────────────────────────
                      Coef.  Std. Error      t  Pr(>|t|)      Lower 95%       Upper 95%
───────────────────────────────────────────────────────────────────────────────────────
(Intercept)       5.7696e5     10709.5   53.87    <1e-99      5.55934e5       5.97985e5
Area              453107.0     18295.7   24.77    <1e-97      4.17188e5       4.89026e5
Room             -1.18099e5    17251.0   -6.85    <1e-10     -1.51967e5      -84230.5
Area & Room        50745.1     4369.19   11.61    <1e-27       42167.2         59322.9
───────────────────────────────────────────────────────────────────────────────────────
R-squared: 0.749320

I would like to see a similar table for Bayesian regression - something like this

Model Class: Linear Regression
Likelihood Model: Gauss
Prior Model: Ridge
Link Function: Identity
Computing Method: HMC
───────────────────────────────────────────────────────────────────────────────────────
                      Coef.  Std. Dev        Lower 95%       Upper 95%
───────────────────────────────────────────────────────────────────────────────────────
(Intercept)       5.7696e5     10709.5       5.55934e5       5.97985e5
Area              453107.0     18295.7       4.17188e5       4.89026e5
Room             -1.18099e5    17251.0       -1.51967e5     -84230.5
Area & Room        50745.1     4369.19       42167.2         59322.9
───────────────────────────────────────────────────────────────────────────────────────

@codetalker7
Copy link
Member Author

I see. @sourish-cmi if possible, can you provide the Model Class, Lilkelihood Model, Link Function and Computing Method for all frequentist models?

Or rather, are the current ones in src/print.jl correct (these are passed as string arguments to the details function in that file).

For the Bayesian models, we already have two tables printed out: Summary Statistics and Quantiles, which I believe contain the given information. Apart from this, we can add the Model Class, Likelihood Model, Prior Model, Link Function and Computing Method for Bayesian models too.

@sourish-cmi
Copy link
Collaborator

@codetalker7 currently, the frequentist method prints Model Class, Likelihood Model, Link Function and Computing Method. So we don't have to do anything.

You are correct. The Bayesian models have printed out all the necessary information. But if the print function can print the same information in the same format as the frequentist method, that will bring nice conformity in the presentation of the results.

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

No branches or pull requests

2 participants