partofthething / ace

Python package for performing the Alternating Conditional Expectation (ACE) regression
MIT License
68 stars 20 forks source link

Deriving the transformation equations/forms #11

Closed mycarta closed 5 years ago

mycarta commented 5 years ago

I am not sure if this is an issue, or a request for improvement/documentation.

In your ACE implementation, is there a way to expose directly the equations/forms for the transformations? If not, what would you recommend, running OLS in pairs (e.g. phi0-x0, phi1-x1, and so on)?

partofthething commented 5 years ago

One of the powerful things about ACE is that there is no functional from for the transforms. They're simply smooths (implemented in this lib as in the original paper as piecewise splines). When you run myace.eval(x), it will compute the proper output in continuous space. You can plot and compute the transforms, but there really is no useful functional form.

The interpolators are built in model.build_interpolators, but again I don't think you will find the actual splines to be useful. If you need a functional form of the transform for some reason, then yeah running OLS with whatever functional form you want would work. But if you're doing this, you might want to just use OLS from the beginning and not use ACE. ACE is when you don't want to assume a functional form.

I hope that help. Please reopen if that doesn't make enough sense.

mycarta commented 5 years ago

Fair points, thank you for elaborating on that.

I do have a couple more questions. I went back and reviewed the literature papers; if I understand those examples correctly, I think that one could use ACE in a predictive sense in a couple of ways: 1) use the magnitude of the transforms as a measure of the strength of the relationship between the original independent predictors and the target, even though as you say, there are no functional forms for the transforms

2) predict the target given new measurements of the predictors, using the inverse relationship between theta and Y; e.g., using the example from Wang and Murphy: image or in pictorial way using my example from here: image