Questions tagged [pmml]

The Predictive Model Markup Language aka `PMML` is an `XML`-based markup language developed by the Data Mining Group (DMG) to provide a way for applications to define models related to predictive analytics and data mining and to share those models between `PMML`-compliant applications.

The Predictive Model Markup Language aka PMML is an XML-based markup language developed by the Data Mining Group (DMG) to provide a way for applications to define models related to predictive analytics and data mining and to share those models between PMML-compliant applications.

PMML provides applications a vendor-independent method of defining models so that proprietary issues and incompatibilities are no longer a barrier to the exchange of models between applications. It allows users to develop models within one vendor's application and use other vendors' applications to visualize, analyze, evaluate or otherwise use the models. Previously, this was very difficult, but with PMML, the exchange of models between compliant applications is straightforward.

Since PMML is an XML-based standard, the specification comes in the form of an XML schema.

Although PMML is the first and still most widely-used standard for machine learning and regression models, the DMG more recently created a JSON-based standard, Portable Format for Analytics (PFA) which includes more flexibility for pre- and post-processing by abstracting general math operations as PFA documents.

References:

PMML: An Open Standard for Sharing Models in The R Journal, Vol. 1/1, May 2009

PMML standard v4.3 at dmg.org

298 questions
3
votes
4 answers

Export PMML to a text file?

Simple question, I have stored PMML code of an R object using pmmlcode <- pmml(my.object), and I would like some way to save it directly to a text file. The usual write.table method isn't working because the data is not a table.
Jon
  • 345
  • 1
  • 4
  • 10
2
votes
2 answers

Calling the sklearn2pmml() function in Python 3.8 throws RuntimeError

I'am trying to save my scikit learn logistic regression as pmml but get a RuntimeError: My code: from sklearn2pmml import sklearn2pmml from sklearn2pmml.pipeline import PMMLPipeline from sklearn.linear_model import LogisticRegression pipe_pmml =…
2
votes
1 answer

How to convert LIGHTGBM to PMML?

I would like to know if there exist a way to convert a LightGBM model to a PMML. Starting from the lightgbm.basic.Booster object I would like to know how to convert it to a PMML or MOJO/POJO object. If is not possible, i would like to know if it is…
domiziano
  • 440
  • 3
  • 13
2
votes
1 answer

'DataFrame' object has no attribute '_check_fit_params'

In order to drop the feature based on the accuracy score, I wrote the following code, Here 'ABCDEFGHIJKLMNO' are the columns(features), a total of 15 features. features = 'ABCDEFGHIJKLMNO' for i in range(0,len(features)): pipeline =…
RMR
  • 599
  • 3
  • 12
  • 35
2
votes
2 answers

DataType of InputField is double although in the PMMLPipeline it is string

I am exporting a PMMLPipeline with a categorical string feature day_of_week as a PMML file. When I open the file in Java and list the InputFields I see that the data type of day_of_week field is double: InputField{name=day_of_week,…
Leevi L
  • 1,538
  • 2
  • 13
  • 28
2
votes
2 answers

Spark- Exception in thread java.lang.NoSuchMethodError

I am trying to score a model from pmml file using pmml4s library. Every time I submit the job in Spark I get the following error: 20/05/13 23:30:10 ERROR SparkSubmit: org.apache.spark.sql.types.StructType.names(). [Ljava/lang/String; …
Kunal
  • 55
  • 7
2
votes
1 answer

Huge loss of accuracy after deserializing Machine Learning model made with sklearn2pmml in Java

I have made a machine learning model in Python using scikit-learn. I used sklearn2pmml to serialize it so I can use it in my Java webapplication. I use the pmml4s library in Java to deserialize the model. I used the model to predict the same values…
2
votes
1 answer

categorical feature setting error in PMML GBDTLRClassifier

I try to set up my GBDTLRClassifier following the instruction here. First, I have done label encode on my columns. Then I define my categorical and continuous features, putting column names in two list. cat # categorical column names conts #…
G_cy
  • 994
  • 3
  • 13
  • 28
2
votes
1 answer

How to translate the round function from python to PMML?

I have a sklearn pipeline. One of its step is ExpressionTransformer(f"round(X[0]*{nRoundMin})/{nRoundMin}") (importing ExpressionTransformer from sklearn2pmml.preprocessing). When I try to write this pipeline into a PMML file, I get the following…
2
votes
0 answers

How to generate PMML for stepwise polynomial regression

I have tried using R and it throws below error. How to generate PMML for stepwise polynomial regression ? Code snippet: library(reshape2) library(pmml) data(tips) fit <- lm(total_bill ~ poly(tip, 1, raw=TRUE),data =…
Manoj
  • 390
  • 3
  • 12
2
votes
0 answers

Error in .pmmlDataDictionary(field, transformed = transforms) : nmatrix.2 class is not supported for features

How to convert r neural network model into pmml file? I used pmml package in r, but got an error: nn_pmml <- pmml(mynn) Error in .pmmlDataDictionary(field, transformed = transforms) : nmatrix.2 class is not supported for features. Supported…
Zaja
  • 31
  • 3
2
votes
1 answer

Unable to install R pmml package on Red Hat

Trying to install pmml package using R Studio on Red Hat. I get the following output: ================================================ downloaded 136 KB * installing *source* package 'pmml' ... ** package 'pmml' successfully unpacked and MD5 sums…
EvanMPW
  • 351
  • 1
  • 6
  • 15
2
votes
1 answer

Generate PMML for text classification pipeline in python

I am trying to generate PMML (using jpmml-sklearn) for text classification pipeline. The last line in the code - sklearn2pmml(Textpipeline, "TextMiningClassifier.pmml", with_repr = True) - crashes. from sklearn.datasets import…
2
votes
0 answers

How to import pmml model in python

I created spark pipeline using pyspark and saved pmml model in a file. Now I want to load pmml model back into python. Can someone help me with query to import pmml model into python
Ravikrn
  • 387
  • 1
  • 3
  • 19
2
votes
1 answer

export model to PMML

I have labeled data, couple categorical variables and two binary target variables. header for example; column_1,column_2,column_3,column_4,target_1,target_1 how do I export it to PMML ? the only example I've found is with unsupervised data import…
whoopdedoo
  • 2,815
  • 23
  • 46