Package elki.outlier.density
Class IsolationForest.ForestBuilder
- java.lang.Object
-
- elki.outlier.density.IsolationForest.ForestBuilder
-
- Enclosing class:
- IsolationForest
protected static class IsolationForest.ForestBuilder extends java.lang.Object
Class to build the forest- Author:
- Erich Schubert
-
-
Field Summary
Fields Modifier and Type Field Description (package private) int[]
active
Active dimensions (not constant)(package private) ArrayModifiableDBIDs
ids
Array of current candidates(package private) DBIDArrayMIter
iter
Iterator into candidates(package private) double[]
max
Current value range(package private) int
maxheight
Maximum height(package private) double[]
min
Current value range(package private) Relation<? extends NumberVector>
relation
Data relation to use(package private) java.util.Random
rnd
Random generator(package private) int
subsampleSize
Subsample size to use for the trees.
-
Constructor Summary
Constructors Modifier Constructor Description protected
ForestBuilder(Relation<? extends NumberVector> relation, int subsampleSize, java.util.Random random)
Constructor for the tree builder.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected IsolationForest.Node
build(int s, int e, int h)
Recursively build the treeprotected IsolationForest.Node
newTree()
Build a new tree.
-
-
-
Field Detail
-
relation
Relation<? extends NumberVector> relation
Data relation to use
-
ids
ArrayModifiableDBIDs ids
Array of current candidates
-
iter
DBIDArrayMIter iter
Iterator into candidates
-
min
double[] min
Current value range
-
max
double[] max
Current value range
-
active
int[] active
Active dimensions (not constant)
-
maxheight
int maxheight
Maximum height
-
rnd
java.util.Random rnd
Random generator
-
subsampleSize
int subsampleSize
Subsample size to use for the trees.
-
-
Constructor Detail
-
ForestBuilder
protected ForestBuilder(Relation<? extends NumberVector> relation, int subsampleSize, java.util.Random random)
Constructor for the tree builder.- Parameters:
relation
- Data relationsubsampleSize
- Sampling sizerandom
- Random generator
-
-
Method Detail
-
newTree
protected IsolationForest.Node newTree()
Build a new tree.- Returns:
- New tree
-
build
protected IsolationForest.Node build(int s, int e, int h)
Recursively build the tree- Parameters:
s
- Start rangee
- End rangeh
- Height- Returns:
- Tree node
-
-