org.allenai.nlpstack.parse.poly

decisiontree

package decisiontree

Implements C4.5 decision trees for integral labels and attributes.

Main class to use is org.allenai.nlpstack.parse.poly.decisiontree.DecisionTree. Use the companion object to build the tree. Then use ) or ) to do prediction.

The tree takes data in the form of org.allenai.nlpstack.parse.poly.decisiontree.FeatureVectors. This is a container for a collection of org.allenai.nlpstack.parse.poly.decisiontree.FeatureVector objects.

Implementations of these are org.allenai.nlpstack.parse.poly.decisiontree.SparseVector or org.allenai.nlpstack.parse.poly.decisiontree.DenseVector.

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. decisiontree
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Type Members

  1. case class DecisionTree(child: IndexedSeq[Seq[(Int, Int)]], splittingAttribute: IndexedSeq[Option[Int]], categoryCounts: IndexedSeq[Seq[(Int, Int)]]) extends Product with Serializable

    Immutable decision tree for integer-valued features and categories.

  2. case class DenseVector(label: Option[Int], attributes: IndexedSeq[Int]) extends FeatureVector with Product with Serializable

    Instance with arbitrary integral attributes

  3. sealed trait FeatureVector extends AnyRef

    A feature vector with integral features and label.

  4. case class FeatureVectors(featureVectors: IndexedSeq[FeatureVector]) extends Product with Serializable

    FeatureVectors is a convenience container for feature vectors.

  5. case class SparseVector(label: Option[Int], numAttributes: Int, trueAttributes: Set[Int]) extends FeatureVector with Product with Serializable

    Instance with sparse binary attributes

Value Members

  1. object DecisionTree extends Serializable

  2. object DecisionTreeTrainer

    Functions for training decision trees.

Inherited from AnyRef

Inherited from Any

Ungrouped