classifyUsingDecisionTree
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
- Click + on the parent node.
- Enter Classify Using Decision Tree operator in the search field and select the operator from the results to open the operator form.
- In the Table drop-down, enter or select the table containing the data to run this operator on.
- In the Max Depth field, enter the parameter to construct a decision tree.
- In the Impurity field, enter the threshold for a node to be counted as decided vs. undecided.
- 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.
- Click Run to view the result.
- Click Save to add the operator to the playbook.
- Click Cancel to discard the operator form.
Usage Details
classifyUsingDecisionTree(table: TableReference, maxDepth: Long, impurity: Double, columns: String*)
Parameters:
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.
Returns:
The input table with additional: lhub_decision_tree_path
, lhub_decision_tree_predicted_label
, isDecided
, lhub_decision_tree_node_impurity
will be returned
Updated about 1 year ago