Skip to main content

Decision Tree

Regression and classification trees.

Options#

  • data | object (required): object of value arrays. Default: none.
  • y | (string|Factor) (required): outcome variable. Default: none.
  • x | (array<(string|Factor)>|string|Factor) (required): one or more predictor variables. Default: none.
  • type | string (required): Classification for categorical or Regression for quantitative outcomes. Default: none.
  • quantitative | array<string> (required): array of variables in data that are quantitative. Default: none.
  • impurityMeasure | string: impurity measure (gini or entropy). Default: 'gini'.
  • scoreThreshold | number: score threshold for split. Default: 0.0075.
  • maxTreeDepth | number: maximum tree depth. Default: 5.
  • minItemsCount | number: minimum # of observations in leaf nodes. Default: 50.
  • onPredict | function: callback invoked with model object when clicking on the predict button. Default: none.

Examples#

Live Editor
Result
Last updated on by Planeshifter