Introduction

This vignette lists the packages and model types exported by pmml, as well as data transformations and functions that extend the basic exporter functionality.

Supported packages

This package supports the following packages and model types:

  • Anomaly Detection
    • isofor: iForest
    • e1071: svm with “one-classification” type
  • Clustering
  • K Nearest Neighbors
  • Linear Models
    • glmnet: cv.glmnet with “gaussian” and “poisson” family types
    • nnet: multinom
    • stats: glm, lm without interaction terms
  • Naive Bayes
  • Neural Networks
  • Support Vector Machines
    • e1071: svm
    • kernlab: ksvm with “rbfdot”, “polydot”, “vanilladot”, and “tanhdot” kernels
  • Time Series
  • Tree-based Models and Ensembles
    • ada: ada
    • gbm: gbm with “bernoulli”, “poisson”, and “multinomial” distribution types
    • randomForest: randomForest
    • rpart: rpart
    • xgboost: xgb.Booster with “multi:softprob”, “multi:softmax”, and “binary:logistic” objectives
  • Other Packages

Data transformations

The following functions are used to transform input data.

  • xform_discretize: discretize continuous values.
  • xform_function: apply a user-defined function to the input values.
  • xform_map: map discrete values between input and output.
  • xform_min_max: normalize continuous values.
  • xform_norm_discrete: normalize discrete values.
  • xform_z_score: apply z-score normalization to continuous values.

The general methodology is to first wrap the data with xform_wrap, and then perform transformations using the above functions.

Additional functions

The following functions allow additional operations, such as creating specific nodes and adding attributes. For more information, check the documentation for each function.

  • add_attributes: add attribute values to an existing element in a given PMML file.
  • add_data_field_attributes: add attribute values to an existing DataField element in a given PMML file.
  • add_data_field_children: add ‘Interval’ and ‘Value’ child elements to a given DataField element in a given PMML file.
  • add_mining_field_attributes: add attribute values to an existing MiningField element in a given PMML file.
  • add_output_field: add Output nodes to a PMML object.
  • file_to_xml_node: read in a file and parse it into an object of type XMLNode.
  • function_to_pmml: convert an R expression to PMML.
  • make_intervals: create Interval elements to add to a DataDictionary element.
  • make_output_nodes: add Output nodes to a PMML object.
  • make_values: create Values element to add to a DataDictionary element.