org.deidentifier.arx.aggregates

## Class ClassificationConfigurationRandomForest

- java.lang.Object
- - org.deidentifier.arx.ARXClassificationConfiguration<ClassificationConfigurationRandomForest>
  - - org.deidentifier.arx.aggregates.ClassificationConfigurationRandomForest

All Implemented Interfaces:
  java.io.Serializable, java.lang.Cloneable

    public class ClassificationConfigurationRandomForest
    extends ARXClassificationConfiguration<ClassificationConfigurationRandomForest>
    implements java.io.Serializable, java.lang.Cloneable

Configuration for Random Forest classifiers

Author:
  Fabian Prasser
See Also:
  Serialized Form

### Nested Class Summary

Nested Classes
`static class` `ClassificationConfigurationRandomForest.SplitRule` Split rule for the decision tree

### Field Summary

Fields
`static int` `DEFAULT_MAXMIMUM_NUMBER_OF_LEAF_NODES` Default value
`static int` `DEFAULT_MINIMUM_SIZE_OF_LEAF_NODES` Default value
`static int` `DEFAULT_NUMBER_OF_TREES` Default value
`static int` `DEFAULT_NUMBER_OF_VARIABLES_TO_SPLIT` Default value = 0: sqrt(#features) seems to provide good results
`static ClassificationConfigurationRandomForest.SplitRule` `DEFAULT_SPLIT_RULE` Split rule
`static double` `DEFAULT_SUBSAMPLE` 1.0 = sampling with replacement; <1.0 = sampling without replacement

### Fields inherited from class org.deidentifier.arx.ARXClassificationConfiguration

`DEFAULT_DETERMINISTIC, DEFAULT_MAX_RECORDS, DEFAULT_NUMBER_OF_FOLDS, DEFAULT_VECTOR_LENGTH`

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`ClassificationConfigurationRandomForest` `clone()`
`static ClassificationConfigurationRandomForest` `create()` Returns a new instance
`int` `getMaximumNumberOfLeafNodes()`
`int` `getMinimumSizeOfLeafNodes()`
`int` `getNumberOfTrees()`
`int` `getNumberOfVariablesToSplit()`
`ClassificationConfigurationRandomForest.SplitRule` `getSplitRule()`
`double` `getSubsample()`
`void` `parse(ARXClassificationConfiguration<?> config)` Parses another configuration
`ClassificationConfigurationRandomForest` `setMaximumNumberOfLeafNodes(int maximumNumberOfLeafNodes)`
`ClassificationConfigurationRandomForest` `setMinimumSizeOfLeafNodes(int minimumSizeOfLeafNodes)`
`ClassificationConfigurationRandomForest` `setNumberOfTrees(int numberOfTrees)`
`ClassificationConfigurationRandomForest` `setNumberOfVariablesToSplit(int numberOfVariablesToSplit)`
`ClassificationConfigurationRandomForest` `setSplitRule(ClassificationConfigurationRandomForest.SplitRule splitRule)`
`ClassificationConfigurationRandomForest` `setSubsample(double subsample)`

### Methods inherited from class org.deidentifier.arx.ARXClassificationConfiguration

`createLogisticRegression, createNaiveBayes, createRandomForest, getMaxRecords, getNumFolds, getSeed, getVectorLength, isDeterministic, isModified, setDeterministic, setMaxRecords, setModified, setNumFolds, setSeed, setUnmodified, setVectorLength`

### Methods inherited from class java.lang.Object

`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### DEFAULT_NUMBER_OF_TREES

    public static final int DEFAULT_NUMBER_OF_TREES

Default value

See Also:
  Constant Field Values

#### DEFAULT_NUMBER_OF_VARIABLES_TO_SPLIT

    public static final int DEFAULT_NUMBER_OF_VARIABLES_TO_SPLIT

Default value = 0: sqrt(#features) seems to provide good results

See Also:
  Constant Field Values

#### DEFAULT_MINIMUM_SIZE_OF_LEAF_NODES

    public static final int DEFAULT_MINIMUM_SIZE_OF_LEAF_NODES

Default value

See Also:
  Constant Field Values

#### DEFAULT_MAXMIMUM_NUMBER_OF_LEAF_NODES

    public static final int DEFAULT_MAXMIMUM_NUMBER_OF_LEAF_NODES

Default value

See Also:
  Constant Field Values

#### DEFAULT_SUBSAMPLE

    public static final double DEFAULT_SUBSAMPLE

1.0 = sampling with replacement; <1.0 = sampling without replacement

See Also:
  Constant Field Values

#### DEFAULT_SPLIT_RULE

    public static final ClassificationConfigurationRandomForest.SplitRule DEFAULT_SPLIT_RULE

Split rule

### Method Detail

#### create

    public static ClassificationConfigurationRandomForest create()

Returns a new instance

Returns:

#### clone

    public ClassificationConfigurationRandomForest clone()

Specified by:
  `clone` in class `ARXClassificationConfiguration<ClassificationConfigurationRandomForest>`

#### getMaximumNumberOfLeafNodes

    public int getMaximumNumberOfLeafNodes()

Returns:
  the maximumNumberOfLeafNodes

#### getMinimumSizeOfLeafNodes

    public int getMinimumSizeOfLeafNodes()

Returns:
  the minimumSizeOfLeafNodes

#### getNumberOfTrees

    public int getNumberOfTrees()

Returns:
  the numberOfTrees

#### getNumberOfVariablesToSplit

    public int getNumberOfVariablesToSplit()

Returns:
  the numberOfVariablesToSplit

#### getSplitRule

    public ClassificationConfigurationRandomForest.SplitRule getSplitRule()

Returns:
  the splitRule

#### getSubsample

    public double getSubsample()

Returns:
  the subsample

#### parse

    public void parse(ARXClassificationConfiguration<?> config)

Description copied from class: `ARXClassificationConfiguration`
Parses another configuration

Overrides:
  `parse` in class `ARXClassificationConfiguration<ClassificationConfigurationRandomForest>`

#### setMaximumNumberOfLeafNodes

    public ClassificationConfigurationRandomForest setMaximumNumberOfLeafNodes(int maximumNumberOfLeafNodes)

Parameters:
  `maximumNumberOfLeafNodes` - the maximumNumberOfLeafNodes to set

#### setMinimumSizeOfLeafNodes

    public ClassificationConfigurationRandomForest setMinimumSizeOfLeafNodes(int minimumSizeOfLeafNodes)

Parameters:
  `minimumSizeOfLeafNodes` - the minimumSizeOfLeafNodes to set

#### setNumberOfTrees

    public ClassificationConfigurationRandomForest setNumberOfTrees(int numberOfTrees)

Parameters:
  `numberOfTrees` - the numberOfTrees to set

#### setNumberOfVariablesToSplit

    public ClassificationConfigurationRandomForest setNumberOfVariablesToSplit(int numberOfVariablesToSplit)

Parameters:
  `numberOfVariablesToSplit` - the numberOfVariablesToSplit to set

#### setSplitRule

    public ClassificationConfigurationRandomForest setSplitRule(ClassificationConfigurationRandomForest.SplitRule splitRule)

Parameters:
  `splitRule` - the splitRule to set

#### setSubsample

    public ClassificationConfigurationRandomForest setSubsample(double subsample)

Parameters:
  `subsample` - the subsample to set