The RegressionTree
companion object is used to count the number of leaves and provide factory methods for creating regression trees.
Attributes
- Companion
- class
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
RegressionTree.type
Members list
Value members
Concrete methods
Create a RegressionTree
object from a combined data-response matrix.
Create a RegressionTree
object from a combined data-response matrix.
Value parameters
- col
-
the designated response column (defaults to the last column)
- fname
-
the names for all features/variables (defaults to null)
- hparam
-
the hyper-parameters (defaults to hp)
- xy
-
the combined data-response matrix
Attributes
Check to make sure that the threshold and score are feasible. For example, there must be at least two distinct values in xj for a split to work.
Check to make sure that the threshold and score are feasible. For example, there must be at least two distinct values in xj for a split to work.
Value parameters
- d
-
the current depth
- j
-
the column index in data matrix
- sse_t
-
the sum of squared errors total (left + right)
- ssy
-
the sum of squared y-values
- thr
-
the selected threshhold
- xj
-
the j-th column vector in the data matrix
- y
-
the response vector
Attributes
Given column j, use fast threshold selection to find an optimal threshold/ split point in O(NlogN) time. Return the threshold and the sse total.
Given column j, use fast threshold selection to find an optimal threshold/ split point in O(NlogN) time. Return the threshold and the sse total.
Value parameters
- ssy
-
the sum of squares for y
- xj
-
the the j-th column in data matrix (used for splitting)
- y
-
the response vector
Attributes
- See also
-
people.cs.umass.edu/~domke/courses/sml/12trees.pdf
Create a RegressionTree
object from a data matrix and response vector.
Create a RegressionTree
object from a data matrix and response vector.
Value parameters
- fname
-
the names for all features/variables (defaults to null)
- hparam
-
the hyper-parameters (defaults to hp)
- x
-
the data/input matrix
- y
-
the response/output vector
Attributes
Split gives row indices of left and right children when splitting using thr.
Split gives row indices of left and right children when splitting using thr.
Value parameters
- thr
-
the threshold for splitting (below => left, above => right)
- xj
-
the column/feature to use
Attributes
Given threshold thr, compute the sum of the left and right sse (sse total). Used for checking results.
Given threshold thr, compute the sum of the left and right sse (sse total). Used for checking results.
Value parameters
- ssy
-
the sum of squares for y
- thr
-
the given threshold
- xj
-
the the j-th column in data matrix (used for splitting)
- y
-
the response vector