# Simple Regression Tree Learner

Learns a single regression tree. The procedure follows the algorithm described by "Classification and Regression Trees" (Breiman et al, 1984), whereby the current implementation applies a couple of simplifications, e.g. no pruning, not necessarily binary trees, etc.

In a regression tree the predicted value for a leaf node is the mean target value of the records within the leaf. Hence the predictions are best (with respect to the training data) if the variance of target values within a leaf is minimal. This is achieved by splits that minimize the sum of squared errors in their respective children.

The currently used missing value handling also differs from the one used by Breiman et al, 1984. In each split the algorithm tries to find the best direction for missing values by sending them in each direction and selecting the one that yields the best result (i.e. largest gain). The procedure is adapted from the well known XGBoost algorithm and is described here .

## Options

#### Attribute Selection

Target Column
Select the column containing the value to be learned. Rows with missing values in this column will be ignored during the learning process.
Attribute Selection

Select the attributes on which the model should be learned. You can choose from two modes.

Fingerprint attribute Uses a fingerprint/vector (bit, byte and double are possible) column to learn the model by treating each entry of the vector as separate attribute (e.g. a bit vector of length 1024 is expanded into 1024 binary attributes). The node requires all vectors to be of the same length.

Column attributes Uses ordinary columns in your table (e.g. String, Double, Integer, etc.) as attributes to learn the model on. The dialog allows to select the columns manually (by moving them to the right panel) or via a wildcard/regex selection (all columns whose names match the wildcard/regex are used for learning). In case of manual selection, the behavior for new columns (i.e. that are not available at the time you configure the node) can be specified as either Enforce exclusion (new columns are excluded and therefore not used for learning) or Enforce inclusion (new columns are included and therefore used for learning).

Ignore columns without domain information
If selected, nominal columns with no domain information are ignored (as they likely have too many possible values anyway).
Enable Hightlighting (#patterns to store)
If selected, the node stores the selected number of rows and allows highlighting them in the node view.
Use binary splits for nominal attributes
If selected, the node determines set based binary splits for nominal values. Otherwise each value will result in a child node.
Missing value handling
Here the preferred missing value handling can be specified there are the following options:
• XGBoost - If this is selected (it is also the default), the learner will calculate which direction is best suited for missing values, by sending the missing values in each direction of a split. The direction that yields the best result (i.e. largest gain) is then used as default direction for missing values. This method works with both, binary and multiway splits.
• Surrogate - This approach calculates for each split alternative splits that best approximate the best split. The method was first described in the book "Classification and Regression Trees" by Breiman et al. (1984). NOTE: This method can only be used with binary nominal splits.
Limit number of levels (tree depth)
Number of tree levels to be learned. For instance, a value of 1 would only split the (single) root node (decision stump).
Minimum split node size
Minimum number of records in a decision tree node so that another split is attempted. Note, this option does not make any implications on the minimum number of records in a terminal node. If enabled, this number needs to be at least twice as large as the minimum child node size (as otherwise for binary splits one of the two children would have less records than specified).
Minimum node size
Minimum number of records in child nodes. It can be at most half of the minimum split node size (see above). Note, this parameter is currently ignored for nominal splits.

## Input Ports The data to learn from. It must contain at least one numeric target column and either a fingerprint (bit/byte/double-vector) column or another numeric or nominal column.

## Views

Regression Tree View
Regression Tree View
{"ft_lang_label":"__label__en","ft_lang_prob":0.88311344,"math_prob":0.88978744,"size":2835,"snap":"2022-40-2023-06","text_gpt3_token_len":591,"char_repetition_ratio":0.096079126,"word_repetition_ratio":0.0,"special_character_ratio":0.2031746,"punctuation_ratio":0.10575139,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.96739185,"pos_list":[0,1,2],"im_url_duplicate_count":[null,null,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2022-09-25T07:43:28Z\",\"WARC-Record-ID\":\"<urn:uuid:594f1f09-799d-4788-9f84-fb2810c7ad29>\",\"Content-Length\":\"57799\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:b28ce672-ae5a-479b-b5a6-e199876a6476>\",\"WARC-Concurrent-To\":\"<urn:uuid:efef9c17-4c6b-48d7-bf7f-d7e1fb8313c9>\",\"WARC-IP-Address\":\"185.128.119.69\",\"WARC-Target-URI\":\"https://nodepit.com/node/org.knime.base.node.mine.treeensemble2.node.regressiontree.learner.RegressionTreeLearnerNodeFactory\",\"WARC-Payload-Digest\":\"sha1:XKLWHDOHME3D3IIKJUQHJNEWWKJW62TL\",\"WARC-Block-Digest\":\"sha1:PCK6CUCKZEVILI6F6RDSMMX4I4IL4HIM\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2022/CC-MAIN-2022-40/CC-MAIN-2022-40_segments_1664030334515.14_warc_CC-MAIN-20220925070216-20220925100216-00273.warc.gz\"}"}