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

Clean up GLM doc #2241

Merged
merged 4 commits into from
May 30, 2017
Merged

Clean up GLM doc #2241

merged 4 commits into from
May 30, 2017

Conversation

junpenglao
Copy link
Member

  • pm.glm.glm -> pm.glm.GLM.from_formula
  • pm.glm.plot_posterior_predictive -> pm.plot_posterior_predictive_glm
  • remove find_MAP and used default ADVI init

* pm.glm.glm -> pm.glm.GLM.from_formula
* pm.glm.plot_posterior_predictive -> pm.plot_posterior_predictive_glm
* remove find_MAP and used default init
@junpenglao junpenglao requested a review from twiecki May 30, 2017 12:18
@junpenglao
Copy link
Member Author

@twiecki I assigned you as you were working on this quite a lot before ;-)

@twiecki
Copy link
Member

twiecki commented May 30, 2017

Looks great!

Can you delete the cell:

def f(x, y):
    print(x)
    print(y)
    
f(y=1, x=2)

in GLM-robust-with-outlier-detection.ipynb

Then GLM-logistic.ipynb also seems to have some exceptions in some cells, probably only needs to be rerun.

@junpenglao junpenglao changed the title [WIP] clean up GLM doc Clean up GLM doc May 30, 2017
@junpenglao
Copy link
Member Author

OK should be fine now.
The only problem: in GLM-rolling-regression.ipynb the YahooDailyReader is currently broken (see pydata/pandas-datareader#333 and pydata/pandas-datareader#315). I did not rerun the notebook there.

@twiecki
Copy link
Member

twiecki commented May 30, 2017

@junpenglao Did you try loading via Google? Interface is identical via pandas-datareader.

@junpenglao
Copy link
Member Author

No as I never use Pandas-datareader. Trying now!

@ColCarroll
Copy link
Member

that looks like a small file -- would it be better to download, check into examples/data, and read with pd.read_csv(pm.read_data('stock_prices.csv'))?

@twiecki
Copy link
Member

twiecki commented May 30, 2017

@ColCarroll Good point.

@junpenglao
Copy link
Member Author

@twiecki Using GoogleDailyReader there is no 'Adj Close' (prices.items -> Index(['Open', 'High', 'Low', 'Close', 'Volume'], dtype='object')), and the GDX data in 'Close' are NaNs.

@ColCarroll I agree.

last notebook. change to a slidely different example.
@twiecki
Copy link
Member

twiecki commented May 30, 2017

This looks great, thanks!

@twiecki twiecki merged commit 9327794 into pymc-devs:master May 30, 2017
@junpenglao junpenglao deleted the Clean_up_GLM_doc branch May 30, 2017 18:30
@junpenglao
Copy link
Member Author

junpenglao commented May 30, 2017

Also, i find that Metropolis performs surprisingly well in GLM - in many cases out performs NUTS

@twiecki
Copy link
Member

twiecki commented May 30, 2017

In low dimensional models?

@junpenglao
Copy link
Member Author

yeah in GLM most model only has 2-3 hierarchies.

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

Successfully merging this pull request may close these issues.

3 participants