Analytics Commands

◷ Reading Time: 2 minutes


This extension enables Predictive Analytics capability to FlexRule platform. The extensions adds both expression commands Toolbox commands.


Trains and builds a predictive model using data.

 train (list, algorithm, class, options)
  • algorithm:
    • PMML v4.3 (Read Details)
      • Regression Model
      • Generalized Regression Model
      • Naive Bayes Model
      • Classification and Regression Tree Model
      • Support Vector Machine Model
      • Random Forest (Mining Model)
      • Neural Networks Model
      • Clustering Model
      • Gradient Boosting Machine Model (Mining Model)
      • Association Rules Model
      • K-Nearest Neighbors Model
    • c45: Decision Tree
    • nb: Naive Bayes
  • class: attributes name that is the class name (i.e. attribute or field of data that going to be the result of prediction)
  • options: Algorithm options if it is available
  • Return: analytic’s trainedModel


Uses a trained model to predict results for a data record.

 predict (trainedModel, data, options)
  • trainedModel: the train function result.
  • data: Situation that requires the prediction. (i.e. a JSON with fields of value)
  • options: Algorithm options if it is available


Extracts rules for Decision Tree.

 extractRules (trainedModel, type)
  • type: if, elseIf
  • Retrun: list of rules that are bases of the trained model


The following examples are available by default when you open FlexRule Designer.

Updated on November 27, 2023

Was this article helpful?

Related Articles