Skip to content

Commit

Permalink
fixing errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Ibrahim-Ola committed Oct 24, 2023
1 parent a1c7a5d commit 2783aa1
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 1 addition & 6 deletions book/tutorials/tree_models/Tree_Models_in_ML.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -437,12 +437,7 @@
"\n",
"The root node (node #0) assigns values of **bare_eart_dem** lesser than or equal to 3076.523 to the right branch and values of **bare_eart_dem** greater than 3076.523 to the left node. Observations with **bare_eart_dem** lesser than or equal to 3076.523 are further partitioned based on **unwrapped_phase** values. Overall, the regression tree splits the observations into four disjoint groups or regions ($R_i$) of the feature space.\n",
"\n",
"\\begin{align}\n",
"R_1 &= \\left\\lbrace X \\ | \\ \\text{bare\\_earth\\_dem} \\le 3076.523,\\ \\text{unwrapped\\_phase} \\le -8.048 \\right\\rbrace & \\hat{y}_{R_1} = 0.941 \\\\\n",
"R_2 &= \\left\\lbrace X \\ | \\ \\text{bare\\_earth\\_dem} \\le 3076.523,\\ \\text{unwrapped\\_phase} > -8.048 \\right\\rbrace & \\hat{y}_{R_2} = 1.159 \\\\\n",
"R_3 &= \\left\\lbrace X \\ | \\ \\text{bare\\_earth\\_dem} > 3076.5235,\\ \\text{vegetation\\_height} \\le 9.101 \\right\\rbrace & \\hat{y}_{R_3} = 1.293 \\\\\n",
"R_4 &= \\left\\lbrace X \\ | \\ \\text{bare\\_earth\\_dem} > 3076.523,\\ \\text{vegetation\\_height} > 9.101 \\right\\rbrace & \\hat{y}_{R_4} = 1.081 \\\\\n",
"\\end{align}\n",
"<img src=\"./Images/tree_explanation.png\" width= \"500px\">\n",
"\n",
"\n",
"where $\\hat{y}_{R_i}$ is the mean of the respective regions. The regions $R_i, \\ i = 1,2,3, 4$ are called **terminal nodes** or **leaves**, the points where the feature space ($\\textbf{x}$) is partitioned are called **internal nodes** and the line segments connecting the nodes are referred to as **branches**. Generally, to know which region an observation belongs to, we ask series of question(s) starting from the root node until we get to the terminal node and the value predicted for the observation is mean of all training observations in that region. Mathematically we write;\n",
Expand Down

0 comments on commit 2783aa1

Please sign in to comment.