DecisionTree_C45

scalation.modeling.classifying.DecisionTree_C45
See theDecisionTree_C45 companion class

The DecisionTree_C45 companion object provides factory methods.

Attributes

Companion
class
Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Value members

Concrete methods

def apply(xy: MatrixD, fname: Array[String], k: Int, cname: Array[String], conts: Set[Int], hparam: HyperParameter)(col: Int): DecisionTree_C45

Create a decision tree for the given combined matrix where the column col is the response/classification vector.

Create a decision tree for the given combined matrix where the column col is the response/classification vector.

Value parameters

cname

the names for all classes

col

the designated response column (defaults to the last column)

conts

the set of feature indices for variables that are treated as continuous

fname

the names for all features/variables

hparam

the hyper-parameters

k

the number of classes

xy

the combined data matrix (features and response)

Attributes

def findSplit(xj: VectorD, y_: VectorI, idx_: VectorI, k: Int): Double

Find the best split threshold 'thres' that divides feature/variable 'xj' into low (<= 'thesh') and high (> 'thres') values such that weighted entropy is minimized.

Find the best split threshold 'thres' that divides feature/variable 'xj' into low (<= 'thesh') and high (> 'thres') values such that weighted entropy is minimized.

Value parameters

idx_

the index positions within x (if null, use all index positions)

k

the number of classes

xj

the vector for feature fea (column j of matrix)

y_

the classification/response vector

Attributes