partofthething / ace

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

Use ACE in a predictive sense? #14

Open mycarta opened 4 years ago

mycarta commented 4 years ago

Follow up on a closed issue I have 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

Originally posted by @mycarta in https://github.com/partofthething/ace/issues/11#issuecomment-531837984

mycarta commented 4 years ago

hi Do you have some insights on this?

partofthething commented 4 years ago

Yes that's a great use of this. That's basically how I use it. I run some simulations and build X's and Y's. Then I do continuous optimization problems choosing x's and predicting Y(x) in the way you mention. It works great for that.

mycarta commented 4 years ago

Do you have an example that could be added to the documentation? I am happy to help document if needed.

partofthething commented 4 years ago

I may be misunderstanding, but isn't this demo exactly what you need for this?

mycarta commented 4 years ago

I may be misunderstanding, but isn't this demo exactly what you need for this?

I was thinking of an example of predicting the target y given new measurement of the predictors using an existing transformation

partofthething commented 4 years ago

Ah I see. So you want to initialize the myace = model.Model() part by loading transformations from disk rather than re-building them with x,y pairs and then run myace.eval([0.1, 0.2, 0.5, 0.3, 0.5]) without having to run myace.build_model_from_xy(x, y)?

I could add model.save() and model.load() methods to help with that. Meanwhile I think just using pickle on the model would probably work.

Would this help?

mycarta commented 4 years ago

Nice example, and yes, picle would do but having a method that is part of your library would be awesome.