Error when trying to export randomForest model to PMML

herrherr

I'm receiving an error when trying to export one of my 'regression' randomForest models to PMML.

The code I'm using to generate the model looks something like this:

model <- foreach(ntree = rep(100, 10), .combine = combine, .multicombine=TRUE, .packages = "randomForest") %dopar%
    randomForest(train[, variables], y=train[["logprice"]], ntree=ntree)
model

I'm then trying to save the model with

pmml(model, model.name="myFirstPMML_Model", app.name="PMML", data=train)

The error message I then receive is

Error in names(field$class) <- var.names: attempt to set an attribute on NULL

Any hints/solutions would be much appreciated.

Tridi

In general, the pmml function expects a R object and so will not work on a list of such objects; you would have to apply it element by element. In this case, the error comes from the fact that in the present release, the pmml function expects the randomForest object to be made using a formula....not using input matrices. I plan on adding this new feature on the next release, but in the meantime you would have to access the input data using the formula interface.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

How to export a sparkR model as PMML?

Error when trying to Scaffold a model

KerasClassifier error when trying to run a LST Model

Error when trying to create tables from model

sklearn2pmml error with pycaret model to pmml : The object is not an instance of BaseEstimator

Spark ml and PMML export

401 error code when trying to export powerbi reports

Saving Bitmap failed error when trying to export a image in the IDE

Error when trying to export more than one module.exports

Google API error when trying to export the map reference

Error in eval() when using randomForest in R

Export models as PMML using PySpark

Error in grid_latin_hypercube() for randomForest model in R

Getting Error when trying to save Django Model to My Sql Dtatabase

'Resource exhausted' memory error when trying to train a Keras model

Error when trying to rename a pretrained model on tf.keras

Out of memory error when trying to implement superresolution model

Error when trying to train LSTM model with windowed dataset

Type error when trying to fit a VGG like model

Clarifai object error when trying to call "model.predict" in Angular

Error when trying to evaluate pertained model in tensorflow object-detection

Value error on Image field when trying to comvert model to dict

Django, new model raises error when trying to access the server

Umbraco 7 error, when trying to render model through partial View

utf-8 decode error when trying to feed an image into a model

Yolov4 error when trying to display image on custom model

How can I solve this error that arises when trying to train a model?

Trying to export a model from keras to CoreML

Error when running any BayesSearchCV Function for randomforest classifier