Interface RegressorImpurity

All Superinterfaces:
com.oracle.labs.mlrg.olcut.config.Configurable, com.oracle.labs.mlrg.olcut.provenance.Provenancable<com.oracle.labs.mlrg.olcut.provenance.ConfiguredObjectProvenance>
All Known Implementing Classes:
MeanAbsoluteError, MeanSquaredError

public interface RegressorImpurity extends com.oracle.labs.mlrg.olcut.config.Configurable, com.oracle.labs.mlrg.olcut.provenance.Provenancable<com.oracle.labs.mlrg.olcut.provenance.ConfiguredObjectProvenance>
Calculates a tree impurity score based on the regression targets.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static class 
    Tuple class for the impurity and summed weight.
  • Method Summary

    Modifier and Type
    Method
    Description
    double
    impurity(float[] targets, float[] weights)
    Calculates the impurity based on the supplied weights and targets.
    default double
    impurity(int[] indices, float[] targets, float[] weights)
    Calculates the weighted impurity of the targets specified in the indices array.
    default double
    impurity(int[] indices, int indicesLength, float[] targets, float[] weights)
    Calculates the weighted impurity of the targets specified in the indices array.
    default double
    impurity(List<int[]> indices, float[] targets, float[] weights)
    Calculates the weighted impurity of the targets specified in all the indices arrays.
    default double
    impurity(IntArrayContainer indices, float[] targets, float[] weights)
    Calculates the weighted impurity of the targets specified in the indices container.
    impurityTuple(int[] indices, int indicesLength, float[] targets, float[] weights)
    Calculates the weighted impurity of the targets specified in the indices array.
    impurityTuple(List<int[]> indices, float[] targets, float[] weights)
    Calculates the weighted impurity of the targets specified in all the indices arrays.

    Methods inherited from interface com.oracle.labs.mlrg.olcut.config.Configurable

    postConfig

    Methods inherited from interface com.oracle.labs.mlrg.olcut.provenance.Provenancable

    getProvenance
  • Method Details

    • impurity

      double impurity(float[] targets, float[] weights)
      Calculates the impurity based on the supplied weights and targets.
      Parameters:
      targets - The targets.
      weights - The weights.
      Returns:
      The impurity.
    • impurityTuple

      RegressorImpurity.ImpurityTuple impurityTuple(int[] indices, int indicesLength, float[] targets, float[] weights)
      Calculates the weighted impurity of the targets specified in the indices array.
      Parameters:
      indices - The indices in the targets and weights arrays.
      indicesLength - The number of values to use in indices.
      targets - The regression targets.
      weights - The example weights.
      Returns:
      A tuple containing the impurity and the used weight sum.
    • impurityTuple

      RegressorImpurity.ImpurityTuple impurityTuple(List<int[]> indices, float[] targets, float[] weights)
      Calculates the weighted impurity of the targets specified in all the indices arrays.
      Parameters:
      indices - The indices in the targets and weights arrays.
      targets - The regression targets.
      weights - The example weights.
      Returns:
      A tuple containing the impurity and the used weight sum.
    • impurity

      default double impurity(int[] indices, int indicesLength, float[] targets, float[] weights)
      Calculates the weighted impurity of the targets specified in the indices array.
      Parameters:
      indices - The indices in the targets and weights arrays.
      indicesLength - The number of values to use in indices.
      targets - The regression targets.
      weights - The example weights.
      Returns:
      The weighted impurity.
    • impurity

      default double impurity(List<int[]> indices, float[] targets, float[] weights)
      Calculates the weighted impurity of the targets specified in all the indices arrays.
      Parameters:
      indices - The indices in the targets and weights arrays.
      targets - The regression targets.
      weights - The example weights.
      Returns:
      The weighted impurity.
    • impurity

      default double impurity(int[] indices, float[] targets, float[] weights)
      Calculates the weighted impurity of the targets specified in the indices array.
      Parameters:
      indices - The indices in the targets and weights arrays.
      targets - The regression targets.
      weights - The example weights.
      Returns:
      The weighted impurity.
    • impurity

      default double impurity(IntArrayContainer indices, float[] targets, float[] weights)
      Calculates the weighted impurity of the targets specified in the indices container.
      Parameters:
      indices - The indices in the targets and weights arrays.
      targets - The regression targets.
      weights - The example weights.
      Returns:
      The weighted impurity.