pmml

Is there a way to import a pmml file into python?

点点圈 提交于 2019-12-02 08:53:31
问题 I have trained a model using sklearn and exported it into a pmml format using sklearn2pmml. Is there a way to convert that pmml file back into something that can be imported and run in python? The reason I am looking to do this is because I have noticed slight differences in the way the pmml model behaves compared to the sklearn model. Specifically, the pmml file sets hard upper and lower bounds for variables (uses the max and min of the variable in the training set) whereas sklearn does not.

Caret Model random forest into PMML error

感情迁移 提交于 2019-12-02 04:44:44
问题 I would like to export a Caret random forest model using the pmml library so I can use it for predictions in Java. Here is a reproduction of the error I am getting. data(iris) require(caret) require(pmml) rfGrid2 <- expand.grid(.mtry = c(1,2)) fitControl2 <- trainControl( method = "repeatedcv", number = NUMBER_OF_CV, repeats = REPEATES) model.Test <- train(Species ~ ., data = iris, method ="rf", trControl = fitControl2, ntree = NUMBER_OF_TREES, importance = TRUE, tuneGrid = rfGrid2) print

Caret Model random forest into PMML error

旧巷老猫 提交于 2019-12-02 02:29:33
I would like to export a Caret random forest model using the pmml library so I can use it for predictions in Java. Here is a reproduction of the error I am getting. data(iris) require(caret) require(pmml) rfGrid2 <- expand.grid(.mtry = c(1,2)) fitControl2 <- trainControl( method = "repeatedcv", number = NUMBER_OF_CV, repeats = REPEATES) model.Test <- train(Species ~ ., data = iris, method ="rf", trControl = fitControl2, ntree = NUMBER_OF_TREES, importance = TRUE, tuneGrid = rfGrid2) print(model.Test) pmml(model.Test) Error in UseMethod("pmml") : no applicable method for 'pmml' applied to an

Importing PMML models into Python (Scikit-learn)

こ雲淡風輕ζ 提交于 2019-12-01 05:13:39
There seem to be a few options for exporting PMML models out of scikit-learn, such as sklearn2pmml, but a lot less information going in the other direction. My case is an XGboost model previously built in R, and saved to PMML using r2pmml, that I would like to use in Python. Scikit normally uses pickle to save/load models, but is it also possible to import models into scikit-learn using PMML? You can't connect different specialized representations (such as R and Scikit-Learn native data structures) over a generalized representation (such as PMML). You may have better luck trying to translate R

Can PMML models be read in R?

只谈情不闲聊 提交于 2019-11-29 04:05:44
I have a PMML file which I am trying to import/read in R to do some analysis based on it. I couldn't find a suitable function to read the model, although I found a package that is related to PMML. Is there is a simple way to read this type of file into R? Thanks, Unfortunately, it is not possible to import a model in PMML format in order to predict the classes of some instances using R. The pmml package only allow you to train a model in R and then export it . There is now a way to read PMML objects into R, using the great "partykit" package. I tried it out with a node from SPSS and it works.

Options for deploying R models in production

别等时光非礼了梦想. 提交于 2019-11-28 15:32:09
There doesn't seem to be too many options for deploying predictive models in production which is surprising given the explosion in Big Data. I understand that the open-source PMML can be used to export models as an XML specification. This can then be used for in-database scoring/prediction. However it seems that to make this work you need to use the PMML plugin by Zementis which means the solution is not truly open source. Is there an easier open way to map PMML to SQL for scoring? Another option would be to use JSON instead of XML to output model predictions. But in this case, where would the

Can PMML models be read in R?

谁都会走 提交于 2019-11-27 22:16:37
问题 I have a PMML file which I am trying to import/read in R to do some analysis based on it. I couldn't find a suitable function to read the model, although I found a package that is related to PMML. Is there is a simple way to read this type of file into R? Thanks, 回答1: Unfortunately, it is not possible to import a model in PMML format in order to predict the classes of some instances using R. The pmml package only allow you to train a model in R and then export it. 回答2: There is now a way to

Options for deploying R models in production

为君一笑 提交于 2019-11-27 09:16:07
问题 There doesn't seem to be too many options for deploying predictive models in production which is surprising given the explosion in Big Data. I understand that the open-source PMML can be used to export models as an XML specification. This can then be used for in-database scoring/prediction. However it seems that to make this work you need to use the PMML plugin by Zementis which means the solution is not truly open source. Is there an easier open way to map PMML to SQL for scoring? Another