public class IsolationForest
extends weka.classifiers.RandomizableClassifier
implements weka.core.TechnicalInformationHandler, java.io.Serializable
@inproceedings{Liu2008,
author = {Fei Tony Liu and Kai Ming Ting and Zhi-Hua Zhou},
booktitle = {ICDM},
pages = {413-422},
publisher = {IEEE Computer Society},
title = {Isolation Forest},
year = {2008}
}
-I <number of trees> The number of trees in the forest (default 100).
-N <the size of the subsample for each tree> The subsample size for each tree (default 256).
-S <num> Random number seed. (default 1)
-output-debug-info If set, classifier is run in debug mode and may output additional info to the console
-do-not-check-capabilities If set, classifier capabilities are not checked before classifier is built (use with caution).
-num-decimal-places The number of decimal places for the output of numbers in the model (default 2).
| Constructor and Description |
|---|
IsolationForest() |
| Modifier and Type | Method and Description |
|---|---|
void |
buildClassifier(weka.core.Instances data)
Builds the forest.
|
static double |
c(double n)
Returns the average path length of an unsuccessful search.
|
double[] |
distributionForInstance(weka.core.Instance inst)
Returns distribution of scores.
|
weka.core.Capabilities |
getCapabilities()
Returns the Capabilities of this filter.
|
int |
getNumTrees()
Get the value of numTrees.
|
java.lang.String[] |
getOptions()
Gets options from this classifier.
|
int |
getSubsampleSize()
Get the value of subsampleSize.
|
weka.core.TechnicalInformation |
getTechnicalInformation()
Returns an instance of a TechnicalInformation object, containing detailed
information about the technical background of this class, e.g., paper
reference or book this class is based on.
|
java.lang.String |
globalInfo()
Returns a string describing this filter
|
java.util.Enumeration<weka.core.Option> |
listOptions()
Lists the command-line options for this classifier.
|
static void |
main(java.lang.String[] args)
Main method for this class.
|
java.lang.String |
numTreesTipText()
Returns the tip text for this property
|
void |
setNumTrees(int k)
Set the value of numTrees.
|
void |
setOptions(java.lang.String[] options)
Parses a given list of options.
|
void |
setSubsampleSize(int n)
Set the value of subsampleSize.
|
java.lang.String |
subsampleSizeTipText()
Returns the tip text for this property
|
java.lang.String |
toString()
Returns brief description of the classifier.
|
batchSizeTipText, classifyInstance, debugTipText, distributionsForInstances, doNotCheckCapabilitiesTipText, forName, getBatchSize, getDebug, getDoNotCheckCapabilities, getNumDecimalPlaces, getRevision, implementsMoreEfficientBatchPrediction, makeCopies, makeCopy, numDecimalPlacesTipText, postExecution, preExecution, run, runClassifier, setBatchSize, setDebug, setDoNotCheckCapabilities, setNumDecimalPlacespublic java.lang.String globalInfo()
public weka.core.TechnicalInformation getTechnicalInformation()
getTechnicalInformation in interface weka.core.TechnicalInformationHandlerpublic weka.core.Capabilities getCapabilities()
getCapabilities in interface weka.classifiers.ClassifiergetCapabilities in interface weka.core.CapabilitiesHandlergetCapabilities in class weka.classifiers.AbstractClassifierpublic java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String numTreesTipText()
public int getNumTrees()
public void setNumTrees(int k)
k - value to assign to numTrees.public java.lang.String subsampleSizeTipText()
public int getSubsampleSize()
public void setSubsampleSize(int n)
n - value to assign to subsampleSize.public java.util.Enumeration<weka.core.Option> listOptions()
listOptions in interface weka.core.OptionHandlerlistOptions in class weka.classifiers.RandomizableClassifierpublic java.lang.String[] getOptions()
getOptions in interface weka.core.OptionHandlergetOptions in class weka.classifiers.RandomizableClassifierpublic void setOptions(java.lang.String[] options)
throws java.lang.Exception
Valid options are:
-I <number of trees> The number of trees in the forest (default 100).
-N <the size of the subsample for each tree> The subsample size for each tree (default 256).
-S <num> Random number seed. (default 1)
-output-debug-info If set, classifier is run in debug mode and may output additional info to the console
-do-not-check-capabilities If set, classifier capabilities are not checked before classifier is built (use with caution).
-num-decimal-places The number of decimal places for the output of numbers in the model (default 2).
setOptions in interface weka.core.OptionHandlersetOptions in class weka.classifiers.RandomizableClassifieroptions - the list of options as an array of stringsjava.lang.Exception - if an option is not supportedpublic void buildClassifier(weka.core.Instances data)
throws java.lang.Exception
buildClassifier in interface weka.classifiers.Classifierjava.lang.Exceptionpublic static double c(double n)
public double[] distributionForInstance(weka.core.Instance inst)
distributionForInstance in interface weka.classifiers.ClassifierdistributionForInstance in class weka.classifiers.AbstractClassifierpublic static void main(java.lang.String[] args)