jpmml / r2pmml

R library for converting R models to PMML
GNU Affero General Public License v3.0
73 stars 18 forks source link

bagimpute to pmml #49

Open YavuzDogan opened 5 years ago

YavuzDogan commented 5 years ago

First of all thanks a lot for this awesome piece of work. I failed to export a bagImputing modell which I generated with the preProcess(data, method = "bagimpute") function. Later on I found out, that there are no imputing methods implemented yet but medianInpute. Is there any development ongoing regarding different imputing methods?

vruusmann commented 5 years ago

Is there any development ongoing regarding different imputing methods?

It's extremely unlikely that I will be expanding support for the preProcess object by implementing model-based imputation (eg. knnImpute or bagImpute). Technically, it wouldn't be too difficult, because it can be represented in PMML as model chain where the first element is a GBM model that performs an imputation in case some value is missing, and the second element is then the "real model" element.

I'm currently looking into implementing richer workflow support using the recipes package. There's a special-purpose step for doing bagged tree imputation: https://www.rdocumentation.org/packages/recipes/versions/0.1.3/topics/step_bagimpute