public class TreeFeature extends Object implements Iterable<InvertedFeature>
Can be split into two values based on an example index list.
Constructor and Description |
---|
TreeFeature(int id) |
Modifier and Type | Method and Description |
---|---|
TreeFeature |
deepCopy()
Returns a deep copy of this tree feature.
|
void |
fixSize()
Fixes the size of each
InvertedFeature 's inner arrays. |
List<InvertedFeature> |
getFeature() |
Iterator<InvertedFeature> |
iterator() |
void |
observeValue(double value,
int exampleID)
Observes a value for this feature.
|
void |
sort()
Sort the list using InvertedFeature's natural ordering.
|
com.oracle.labs.mlrg.olcut.util.Pair<TreeFeature,TreeFeature> |
split(int[] leftIndices,
int[] rightIndices,
IntArrayContainer firstBuffer,
IntArrayContainer secondBuffer)
Splits this tree feature into two.
|
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
forEach, spliterator
public Iterator<InvertedFeature> iterator()
iterator
in interface Iterable<InvertedFeature>
public List<InvertedFeature> getFeature()
public void observeValue(double value, int exampleID)
value
- The value observed.exampleID
- The example id number.public void sort()
public void fixSize()
InvertedFeature
's inner arrays.public com.oracle.labs.mlrg.olcut.util.Pair<TreeFeature,TreeFeature> split(int[] leftIndices, int[] rightIndices, IntArrayContainer firstBuffer, IntArrayContainer secondBuffer)
leftIndices
- The indices to go in the left branch.rightIndices
- The indices to go in the right branch.firstBuffer
- A buffer for temporary work.secondBuffer
- A buffer for temporary work.public TreeFeature deepCopy()
Copyright © 2015–2021 Oracle and/or its affiliates. All rights reserved.