scalation.modeling.regtrees

Members list

Type members

Classlikes

case class Node(j: Int, branch: Int, b: VectorD, thresh: Double, depth: Int, pthresh: Double, pfea: Int, leaf: Boolean = ...)

The Node class contains information for a tree node.

The Node class contains information for a tree node.

Value parameters

b

leaf node's prediction parameters (b0 for mean or b for regression)

branch

the branch value (0 => left, 1 => right)

depth

the current depth of the node

j

the feature/variable of the node used for splitting, if it is leaf, contains the feature of its parent

leaf

whether the node is a leaf node

pfea

the feature of parent node

pthresh

the threshold for parent node

thresh

the threshold for continuous feature

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

The RegressionTree companion object is used to count the number of leaves and provide factory methods for creating regression trees.

The RegressionTree companion object is used to count the number of leaves and provide factory methods for creating regression trees.

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type
class RegressionTree(x: MatrixD, y: VectorD, fname_: Array[String] = ..., hparam: HyperParameter = ..., curDepth: Int = ..., branchValue: Int = ..., feature: Int = ..., use_r_fb: Boolean = ..., leaves: Counter = ...) extends Predictor, Fit

The RegressionTree class implements a Regression Tree that recursively partitions the dataset (x, y) by finding a threshold for each feature/x-variable. The threshold for a feature is the value that minimizes sseL + sseR, the sum of the "sum of squared errors".

The RegressionTree class implements a Regression Tree that recursively partitions the dataset (x, y) by finding a threshold for each feature/x-variable. The threshold for a feature is the value that minimizes sseL + sseR, the sum of the "sum of squared errors".

Value parameters

branchValue

the branch value for the tree node (defaults to -1)

curDepth

current depth (defaults to 0)

feature

the feature for the tree's parent node (defaults to -1)

fname_

the names of the model's features/variables (defaults to null)

hparam

the hyper-parameters for the model (defaults to RegressionTree.hp)

leaves

the leaf counter (defaults to Counter ())

use_r_fb

whether to use (by regression tree) feature bagging (fb) i.e., use a subset of the features, @see RegressionTreeRF with parameter use_fb

x

the m-by-n input/data matrix

y

the output/response m-vector

Attributes

Companion
object
Supertypes
trait Fit
trait FitM
trait Predictor
trait Model
class Object
trait Matchable
class Any
Show all

The RegressionTreeGB companion object defines hyper-parameters and provides a factory methods for creating gradient boosted regression trees.

The RegressionTreeGB companion object defines hyper-parameters and provides a factory methods for creating gradient boosted regression trees.

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type
class RegressionTreeGB(x: MatrixD, y: VectorD, fname_: Array[String] = ..., hparam: HyperParameter = ...) extends Predictor, Fit

The RegressionTreeGB class uses Gradient Boosting using RegressionTrees.

The RegressionTreeGB class uses Gradient Boosting using RegressionTrees.

Value parameters

fname_

the feature/variable names (defaults to null)

hparam

the hyper-parameters for the model (defaults to RegressionTree.hp)

x

the input/data matrix

y

the output/response vector

Attributes

Companion
object
Supertypes
trait Fit
trait FitM
trait Predictor
trait Model
class Object
trait Matchable
class Any
Show all
Known subtypes

The RegressionTreeMT companion object is used to count the number of leaves and provide factory methods for creating regression model trees.

The RegressionTreeMT companion object is used to count the number of leaves and provide factory methods for creating regression model trees.

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type
class RegressionTreeMT(x: MatrixD, y: VectorD, fname_: Array[String] = ..., hparam: HyperParameter = ..., curDepth: Int = ..., branchValue: Int = ..., feature: Int = ..., use_r_fb: Boolean = ..., leaves: Counter = ...) extends Predictor, Fit

The RegressionTreeMT class implements a Regression Tree (MT) that selects splitting features using minimal variance in children nodes to avoid exponential choices in the selection, supporting ordinal features currently.

The RegressionTreeMT class implements a Regression Tree (MT) that selects splitting features using minimal variance in children nodes to avoid exponential choices in the selection, supporting ordinal features currently.

Value parameters

branchValue

the branch value for the tree node (defaults to -1)

curDepth

current depth (defaults to 0)

feature

the feature for the tree's parent node (defaults to -1)

fname_

the names of the model's features/variables (defaults to null)

hparam

the hyper-parameters for the model (defaults to RegressionTree.hp)

leaves

the leaf counter (defaults to Counter ())

use_r_fb

whether to use feature bagging (select subsets of the features)

x

the m-by-n input/data matrix

y

the output/response m-vector

Attributes

Companion
object
Supertypes
trait Fit
trait FitM
trait Predictor
trait Model
class Object
trait Matchable
class Any
Show all
Known subtypes
class RegressionTreeRF(x: MatrixD, y: VectorD, fname_: Array[String] = ..., use_fb: Boolean = ..., hparam: HyperParameter = ...) extends Predictor, Fit

The RegressionTreeRF class uses several randomly built reegression trees for prediction. It randomly selects sub-samples of 'bRatio * x.dim' size from the data x and y to build nTrees regression trees. The predict method uses the average over all trees. Note: By default this class does not select sub-features to build the trees (like Bagging Trees) Set use_fb (feature bagging) to true to turn this capability on.

The RegressionTreeRF class uses several randomly built reegression trees for prediction. It randomly selects sub-samples of 'bRatio * x.dim' size from the data x and y to build nTrees regression trees. The predict method uses the average over all trees. Note: By default this class does not select sub-features to build the trees (like Bagging Trees) Set use_fb (feature bagging) to true to turn this capability on.

Value parameters

fname_

the names of the variables/features (defaults to null => auto-generate))

hparam

the hyper-parameters to the random forest (defaults to RegressionTree.hp)

use_fb

whether to use feature bagging (select subsets of the features)

x

the input/data matrix (instances by features)

y

the ouput/response vector (instances)

Attributes

Supertypes
trait Fit
trait FitM
trait Predictor
trait Model
class Object
trait Matchable
class Any
Show all
Known subtypes
class RegressionTreeRF_MT(x: MatrixD, y: VectorD, fname_: Array[String] = ..., use_fb: Boolean = ..., hparam: HyperParameter = ...) extends Predictor, Fit

The RegressionTreeRF_MT class uses several randomly built reegression trees for prediction. It randomly selects sub-samples of 'bRatio * x.dim' size from the data x and y to build nTrees regression trees. The predict method uses the average over all trees. Note: By default this class does not select sub-features to build the trees (like Bagging Trees) Set use_fb (feature bagging) to true to turn this capability on

The RegressionTreeRF_MT class uses several randomly built reegression trees for prediction. It randomly selects sub-samples of 'bRatio * x.dim' size from the data x and y to build nTrees regression trees. The predict method uses the average over all trees. Note: By default this class does not select sub-features to build the trees (like Bagging Trees) Set use_fb (feature bagging) to true to turn this capability on

Value parameters

fname_

the names of the variables/features (defaults to null => auto-generate))

hparam

the hyper-parameters to the random forest (defaults to RegressionTree.hp)

use_fb

whether to use feature bagging (select subsets of the features)

x

the input/data matrix (instances by features)

y

the ouput/response vector (instances)

Attributes

Supertypes
trait Fit
trait FitM
trait Predictor
trait Model
class Object
trait Matchable
class Any
Show all
final class regressionTreeGBTest

Attributes

Supertypes
class Object
trait Matchable
class Any
final class regressionTreeGBTest2

Attributes

Supertypes
class Object
trait Matchable
class Any
final class regressionTreeGBTest3

Attributes

Supertypes
class Object
trait Matchable
class Any
final class regressionTreeGBTest4

Attributes

Supertypes
class Object
trait Matchable
class Any
final class regressionTreeGBTest5

Attributes

Supertypes
class Object
trait Matchable
class Any
final class regressionTreeGBTest6

Attributes

Supertypes
class Object
trait Matchable
class Any
final class regressionTreeMTTest

Attributes

Supertypes
class Object
trait Matchable
class Any
final class regressionTreeMTTest2

Attributes

Supertypes
class Object
trait Matchable
class Any
final class regressionTreeMTTest3

Attributes

Supertypes
class Object
trait Matchable
class Any
final class regressionTreeRFTest

Attributes

Supertypes
class Object
trait Matchable
class Any
final class regressionTreeRFTest2

Attributes

Supertypes
class Object
trait Matchable
class Any
final class regressionTreeRFTest3

Attributes

Supertypes
class Object
trait Matchable
class Any
final class regressionTreeRFTest4

Attributes

Supertypes
class Object
trait Matchable
class Any
final class regressionTreeRFTest5

Attributes

Supertypes
class Object
trait Matchable
class Any

Attributes

Supertypes
class Object
trait Matchable
class Any

Attributes

Supertypes
class Object
trait Matchable
class Any

Attributes

Supertypes
class Object
trait Matchable
class Any

Attributes

Supertypes
class Object
trait Matchable
class Any
final class regressionTreeTest

Attributes

Supertypes
class Object
trait Matchable
class Any
final class regressionTreeTest2

Attributes

Supertypes
class Object
trait Matchable
class Any
final class regressionTreeTest3

Attributes

Supertypes
class Object
trait Matchable
class Any
final class regressionTreeTest4

Attributes

Supertypes
class Object
trait Matchable
class Any

Value members

Concrete methods

def regressionTreeGBTest(): Unit

The regressionTreeGBTest main function is used to test the RegressionTreeGB class.

The regressionTreeGBTest main function is used to test the RegressionTreeGB class.

Attributes

See also

translate.google.com/translate?hl=en&sl=zh-CN&u=https: //www.hrwhisper.me/machine-learning-decision-tree/&prev=search

runMain scalation.modeling.regressionTreeGBTest

def regressionTreeGBTest2(): Unit

The regressionTreeGBTest2 main function tests the RegressionTreeGB class using the AutoMPG dataset. Assumes no missing values. It tests multiple depths.

The regressionTreeGBTest2 main function tests the RegressionTreeGB class using the AutoMPG dataset. Assumes no missing values. It tests multiple depths.

runMain scalation.modeling.regressionTreeGBTest2

Attributes

def regressionTreeGBTest3(): Unit

The regressionTreeGBTest3 main function tests the RegressionTreeGB class using the AutoMPG dataset. Assumes no missing values. It tests forward, backward and stepwise selection.

The regressionTreeGBTest3 main function tests the RegressionTreeGB class using the AutoMPG dataset. Assumes no missing values. It tests forward, backward and stepwise selection.

runMain scalation.modeling.regressionTreeGBTest3

Attributes

def regressionTreeGBTest4(): Unit

The regressionTreeGBTest4 main function is used to test the RegressionTreeGB class. on the Boston House Prices dataset. Use in-sample training testing.

The regressionTreeGBTest4 main function is used to test the RegressionTreeGB class. on the Boston House Prices dataset. Use in-sample training testing.

runMain scalation.modeling.regressionTreeGBTest4

Attributes

def regressionTreeGBTest5(): Unit

The regressionTreeGBTest5 main function is used to test the RegressionTreeGB class. on the Boston House Prices dataset. Use train and test split.

The regressionTreeGBTest5 main function is used to test the RegressionTreeGB class. on the Boston House Prices dataset. Use train and test split.

runMain scalation.modeling.regressionTreeGBTest5

Attributes

def regressionTreeGBTest6(): Unit

The regressionTreeGBTest6 main function is used to test the RegressionTreeGB class.

The regressionTreeGBTest6 main function is used to test the RegressionTreeGB class.

runMain scalation.modeling.regressionTreeGBTest6

Attributes

def regressionTreeMTTest(): Unit

The regressionTreeMTTest main function is used to test the RegressionTreeMT class.

The regressionTreeMTTest main function is used to test the RegressionTreeMT class.

Attributes

See also

translate.google.com/translate?hl=en&sl=zh-CN&u=https: //www.hrwhisper.me/machine-learning-decision-tree/&prev=search

runMain scalation.modeling.regressionTreeMTTest

def regressionTreeMTTest2(): Unit

The regressionTreeMTTest2 main function tests the RegressionTreeMT class using the AutoMPG dataset. Assumes no missing values. It tests multiple depths.

The regressionTreeMTTest2 main function tests the RegressionTreeMT class using the AutoMPG dataset. Assumes no missing values. It tests multiple depths.

runMain scalation.modeling.regressionTreeMTTest2

Attributes

def regressionTreeMTTest3(): Unit

The regressionTreeMTTest3 main function tests the RegressionTreeMT class using the AutoMPG dataset. Assumes no missing values. It tests forward, backward and stepwise selection.

The regressionTreeMTTest3 main function tests the RegressionTreeMT class using the AutoMPG dataset. Assumes no missing values. It tests forward, backward and stepwise selection.

runMain scalation.modeling.regressionTreeMTTest3

Attributes

def regressionTreeRFTest(): Unit

The regressionTreeRFTest main function is used to test the RegressionTreeRF class.

The regressionTreeRFTest main function is used to test the RegressionTreeRF class.

Attributes

See also

translate.google.com/translate?hl=en&sl=zh-CN&u=https: //www.hrwhisper.me/machine-learning-decision-tree/&prev=search

runMain scalation.modeling.regressionTreeRFTest

def regressionTreeRFTest2(): Unit

The regressionTreeRFTest2 main function tests the RegressionTreeRF class using the AutoMPG dataset. Assumes no missing values. It tests multiple depths.

The regressionTreeRFTest2 main function tests the RegressionTreeRF class using the AutoMPG dataset. Assumes no missing values. It tests multiple depths.

runMain scalation.modeling.regressionTreeRFTest2

Attributes

def regressionTreeRFTest3(): Unit

The regressionTreeRFTest3 main function tests the RegressionTreeRF class using the AutoMPG dataset. Assumes no missing values. It tests forward, backward and stepwise selection.

The regressionTreeRFTest3 main function tests the RegressionTreeRF class using the AutoMPG dataset. Assumes no missing values. It tests forward, backward and stepwise selection.

runMain scalation.modeling.regressionTreeRFTest3

Attributes

def regressionTreeRFTest4(): Unit

The regressionTreeRFTest4 main function tests the RegressionTreeRF class using the Boston House Prices dataset.

The regressionTreeRFTest4 main function tests the RegressionTreeRF class using the Boston House Prices dataset.

runMain scalation.modeling.regressionTreeRFTest4

Attributes

def regressionTreeRFTest5(): Unit

The regressionTreeRFTest5 main function tests the RegressionTreeRF class using the Forest Fires dataset.

The regressionTreeRFTest5 main function tests the RegressionTreeRF class using the Forest Fires dataset.

runMain scalation.modeling.regressionTreeRFTest5

Attributes

The regressionTreeRF_MTTest main function is used to test the RegressionTreeRF_MT class.

The regressionTreeRF_MTTest main function is used to test the RegressionTreeRF_MT class.

Attributes

See also

translate.google.com/translate?hl=en&sl=zh-CN&u=https: //www.hrwhisper.me/machine-learning-decision-tree/&prev=search

runMain scalation.modeling.regressionTreeRF_MTTest

The regressionTreeRF_MTTest2 main function tests the RegressionTreeRF_MT class using the AutoMPG dataset. Assumes no missing values. It tests multiple depths.

The regressionTreeRF_MTTest2 main function tests the RegressionTreeRF_MT class using the AutoMPG dataset. Assumes no missing values. It tests multiple depths.

runMain scalation.modeling.regressionTreeRF_MTTest2

Attributes

The regressionTreeRF_MTTest3 main function tests the RegressionTreeRF_MT class using the AutoMPG dataset. Assumes no missing values. It tests forward, backward and stepwise selection.

The regressionTreeRF_MTTest3 main function tests the RegressionTreeRF_MT class using the AutoMPG dataset. Assumes no missing values. It tests forward, backward and stepwise selection.

runMain scalation.modeling.regressionTreeRF_MTTest3

Attributes

The regressionTreeRF_MTTest4 main function tests the RegressionTreeRF_MT class using the Boston House Prices dataset.

The regressionTreeRF_MTTest4 main function tests the RegressionTreeRF_MT class using the Boston House Prices dataset.

runMain scalation.modeling.regressionTreeRF_MTTest4

Attributes

def regressionTreeTest(): Unit

The regressionTreeTest main function is used to test the RegressionTree class. It tests a simple case that does not require a file to be read.

The regressionTreeTest main function is used to test the RegressionTree class. It tests a simple case that does not require a file to be read.

Attributes

See also

translate.google.com/translate?hl=en&sl=zh-CN&u=https: //www.hrwhisper.me/machine-learning-decision-tree/&prev=search

runMain scalation.modeling.regressionTreeTest

def regressionTreeTest2(): Unit

The regressionTreeTest2 main function tests the RegressionTree class using the AutoMPG dataset. Assumes no missing values. It tests multiple depths.

The regressionTreeTest2 main function tests the RegressionTree class using the AutoMPG dataset. Assumes no missing values. It tests multiple depths.

runMain scalation.modeling.regressionTreeTest2

Attributes

def regressionTreeTest3(): Unit

The regressionTreeTest3 main function tests the RegressionTree class using the AutoMPG dataset. Assumes no missing values. It tests forward, backward and stepwise selection.

The regressionTreeTest3 main function tests the RegressionTree class using the AutoMPG dataset. Assumes no missing values. It tests forward, backward and stepwise selection.

runMain scalation.modeling.regressionTreeTest3

Attributes

def regressionTreeTest4(): Unit

The regressionTreeTest4 main function tests the RegressionTree class using the Boston House Prices dataset.

The regressionTreeTest4 main function tests the RegressionTree class using the Boston House Prices dataset.

runMain scalation.modeling.regressionTreeTest4

Attributes