Repository navigation
Prediction for functional regression - #2172
Conversation
|
For OLS, the simultaneous confidence band is easily obtained using Scheffe's method. For GLM's it may be much harder but here is one reference: |
|
Looks good overall, but we are getting different versions for similar functionality. |
|
Travis problems solved. It was due to not specifying dtypes on dataframe creation, and was not an issue on any of my 3 local python installs. Error messages were not helpful. |
|
I've now added simultaneous confidence bands for both OLS and GLMs. The simultaneous CB's make the code in this PR tailored for functional regression analyses. I'm thinking that functional regression has enough specialized techniques that it will be better to have separate predict methods for functional and non-functional regressions. But I am open to merging this with the other predict if there is a reasonable way to do it. I'm fine with this staying in the sandbox detached from results classes for 0.7. I and collaborators/students will be using this routinely once it's merged (need to fix #2178 to make it usable with survival regression). There are 3 other methods for simultaneous GLM confidence bands in the Sun et al paper. Some day I may go back and look at the others. The one method that I implemented is the simplest. Here are the updated plots created by the test script: |
From the theoretical side I don't see any difference when using splines, given the knots it's still just a model linear in a finite number parameters (with the same asymptotics if we ignore endogenous knot selection). But I haven't looked at the simultaneous confidence intervals yet. |
|
It's the confidence bands that are specialized to the functional case. On Sun, Jan 11, 2015 at 5:55 PM, Josef Perktold [email protected]
|
|
I don't understand the simultaneity issue for the confidence band, but I think I will hold off with reading until I have merged a few more PRs. |
There was a problem hiding this comment.
we use alpha=0.05 for the significance level of confidence intervals (one of the few greek letters) instead of cvrg_prob=0.95
|
@kshedden Can you rebase and force push? and then I'll merge it as it is. We can take it out of the sandbox in 0.8 when we have settled on the structure for the various predict functions and methods. |
04ffdd3 to
76afe21
Compare
|
Rebased, waiting for green. Let me know if you want me to squash commits. |
|
about squashing: not really necessary given that you already rebased. You could squash the |
|
I had to restart one travis-ci job, seems to be build problems most likely not ours. merging |
ENH: Prediction for functional regression, in sandbox for now
This is a prediction method tailored to functional regression models in which one or more variables is modeled using b-splines.
The code doesn't produce any graphs of its own, but one natural thing to do with the predictions is to plot them, producing plots like this:
https://umich.box.com/shared/static/g2jx0wi5lo2r8liknpib.pdf
This is implemented as functions that are currently in the sandbox, but could be moved to become a method of the base results class (with the glm version attached to glm results class).
Related to #2151, but tailored to the functional case.
It would be nice to have an option for the pointwise confidence band to be a simultaneous confidence band.