Classify data using Decision Tree model

Train decision tree model on input data based on features and labels columns (optional), and classify using trained model on the same dataset, in addition to classification it will show the path, and confident of the path.

Operator Usage in Easy Mode

  1. Click + on the parent node.
  2. Enter Classify Using Decision Tree operator in the search field and select the operator from the results to open the operator form.
  3. In the Table drop-down, enter or select the table containing the data to run this operator on.
  4. In the Max Depth field, enter the parameter to construct a decision tree.
  5. In the Impurity field, enter the threshold for a node to be counted as decided vs. undecided.
  6. Optional. Click Add More to add a list of columns. The first column will be treated as label columns and the rest will be used as feature columns.
  7. Click Run to view the result.
  8. Click Save to add the operator to the playbook.
  9. Click Cancel to discard the operator form.

Usage Details

classifyUsingDecisionTree(table: TableReference, maxDepth: Long, impurity: Double, columns: String*)

table (TableReference) - The table to create a model
maxDepth (Long) - Max depth parameter to construct decision tree
impurity (Double) - Impurity threshold for a node to be counted as decided vs undecided
columns (String) - Optional list of columns. First column will be treated as label columns, rest will be used as feature columns.

The input table with additional: lhub_decision_tree_path, lhub_decision_tree_predicted_label, isDecided , lhub_decision_tree_node_impurity will be returned

Did this page help you?