• ¿Documento equivocado? Cámbialo gratis
  • Escrito por estudiantes que aprobaron
  • Inmediatamente disponible después del pago
  • Leer en línea o como PDF
Vender
¿Dónde estudias?
Tu idioma
Document preview thumbnail
Vista previa 2 fuera de 8 páginas
Resumen

Cs229 Decision trees summary notes

Document preview thumbnail
Vista previa 2 fuera de 8 páginas

Decision Trees We now turn our attention to decision trees, a simple yet flexible class of algorithms. We will first consider the non-linear, region-based nature of decision trees, continue on to define and contrast region-based loss functions, and close off with an investigation of some of the specific advantages and disadvantages of such methods. Once finished with their nuts and bolts, we will move on to investigating different ensembling methods through the lens of decision trees, due to their suitability for such techniques. 1 Non-linearity Importantly, decision trees are one of the first inherently non-linear machine learning techniques we will cover, as compared to methods such as vanilla SVMs or GLMs. Formally, a method is linear if for an input x ∈ Rn (with interecept term x0 = 1) it only produces hypothesis functions h of the form: h(x) = θTx where θ ∈ Rn. Hypothesis functions that cannot be reduced to the form above are called non-linear, and if a method can produce non-linear hypothesis functions then it is also non-linear. We have already seen that kernelization of a linear method is one such method by which we can achieve non-linear hypothesis functions, via a feature mapping φ(x). Decision trees, on the other hand, can directly produce non-linear hypothesis functions without the need for first coming up with an appropriate feature mapping. As a motivating (and very Canadien) example, let us say we want to build a classifier that, given a time and a location, can CS229 Fall 2 lOMoARcPSD| predict whether or not it would be possible to ski nearby. To keep things simple, the time is represented as month of the year and the location is represented as 1 a latitude (how far North or South we are with −90◦, 0◦, and 90◦ being the South Pole, Equator, and North Pole, respectively). 9 30 212 8 7 111 0 10 12 Time (months) 74 36 11 25 10 41 Time (months) 58 69 A representative dataset is shown above left. There is no linear boundary that would correctly split this dataset. However, we can recognize that there are different areas of positive and negative space we wish to isolate, one such division being shown above right. We accomplish this by partitioning the input space X into disjoint subsets (or regions) Ri: s.t. where n ∈ Z+.

Vista previa del contenido

70487227




lOMoARcPSD| 70487227




Cs229 Decision trees notes
Decision Trees
We now turn our attention to decision trees, a simple yet flexible class of
algorithms. We will first consider the non-linear, region-based nature of
decision trees, continue on to define and contrast region-based loss
functions, and close off with an investigation of some of the specific
advantages and disadvantages of such methods. Once finished with their nuts
and bolts, we will move on to investigating different ensembling methods
through the lens of decision trees, due to their suitability for such techniques.



1 Non-linearity
Importantly, decision trees are one of the first inherently non-linear
machine learning techniques we will cover, as compared to methods such as
vanilla SVMs or GLMs. Formally, a method is linear if for an input x ∈ Rn (with
interecept term x0 = 1) it only produces hypothesis functions h of the form:

h(x) = θTx

where θ ∈ Rn. Hypothesis functions that cannot be reduced to the form
above are called non-linear, and if a method can produce non-linear
hypothesis functions then it is also non-linear. We have already seen that
kernelization of a linear method is one such method by which we can achieve
non-linear hypothesis functions, via a feature mapping φ(x).
Decision trees, on the other hand, can directly produce non-linear
hypothesis functions without the need for first coming up with an
appropriate feature mapping. As a motivating (and very Canadien) example,
let us say we want to build a classifier that, given a time and a location, can

, lOMoAR cPSD| 70487227




CS229 Fall 2
predict whether or not it would be possible to ski nearby. To keep things
simple, the time is represented as month of the year and the location is
represented as

1
a latitude (how far North or South we are with −90◦, 0◦, and 90◦ being the
South Pole, Equator, and North Pole, respectively).




0 10 111 7 212 8 30 9 41 10 25 11 36 12 Time (months) 74 Time (months) 58 69




A representative dataset is shown above left. There is no linear boundary
that would correctly split this dataset. However, we can recognize that there
are different areas of positive and negative space we wish to isolate, one such
division being shown above right. We accomplish this by partitioning the
input space X into disjoint subsets (or regions) Ri:



s.t. Ri ∩ Rj = ∅ for i 6= j

where n ∈ Z+.



2 Selecting Regions
In general, selecting optimal regions is intractable. Decision trees generate
an approximate solution via greedy, top-down, recursive partitioning. The
method is top-down because we start with the original input space X and
split it into two child regions by thresholding on a single feature. We then
take one of these child regions and can partition via a new threshold. We
continue the training of our model in a recursive manner, always selecting a
leaf node, a feature, and a threshold to form a new split. Formally, given a
parent region Rp, a feature index j, and a threshold t ∈ R, we obtain two child
regions R1 and R2 as follows:


R1 = {X | Xj < t,X ∈ Rp}
R2 = {X | Xj ≥ t,X ∈ Rp}

Información del documento

Subido en
7 de septiembre de 2026
Archivo actualizado en
7 de septiembre de 2026
Número de páginas
8
Escrito en
2026/2027
Tipo
Resumen
$4.99

¿Documento equivocado? Cámbialo gratis Dentro de los 14 días posteriores a la compra y antes de descargarlo, puedes elegir otro documento. Puedes gastar el importe de nuevo.
Escrito por estudiantes que aprobaron
Inmediatamente disponible después del pago
Leer en línea o como PDF

Vendido
0
Seguidores
0
Artículos
176
Última venta
-



Por qué los estudiantes eligen Stuvia

Creado por compañeros estudiantes, verificado por reseñas

Calidad en la que puedes confiar: escrito por estudiantes que aprobaron y evaluado por otros que han usado estos resúmenes.

¿No estás satisfecho? Elige otro documento

¡No te preocupes! Puedes elegir directamente otro documento que se ajuste mejor a lo que buscas.

Paga como quieras, empieza a estudiar al instante

Sin suscripción, sin compromisos. Paga como estés acostumbrado con tarjeta de crédito y descarga tu documento PDF inmediatamente.

Student with book image

“Comprado, descargado y aprobado. Así de fácil puede ser.”

Alisha Student

Preguntas frecuentes