public interface LabelImpurity
extends com.oracle.labs.mlrg.olcut.config.Configurable, com.oracle.labs.mlrg.olcut.provenance.Provenancable<com.oracle.labs.mlrg.olcut.provenance.ConfiguredObjectProvenance>
Modifier and Type | Method and Description |
---|---|
default double |
impurity(double[] input)
Calculates the impurity assuming the inputs are counts.
|
default double |
impurity(float[] input)
Calculates the impurity assuming the input are fractional counts.
|
default double |
impurity(int[] input)
Calculates the impurity assuming the input are counts.
|
default double |
impurity(Map<String,Double> counts)
Takes a
Map for weighted counts. |
double |
impurityNormed(double[] input)
Calculates the impurity, assuming it's input is a normalized probability distribution.
|
default double |
impurityWeighted(double[] input)
Calculates the impurity assuming the inputs are weighted counts normalizing by their sum.
|
default double |
impurityWeighted(float[] input)
Calculates the impurity by assuming the input are weighted counts and converting them into a probability
distribution by dividing by their sum.
|
double impurityNormed(double[] input)
input
- The input probability distribution.default double impurityWeighted(double[] input)
input
- The input counts.default double impurity(double[] input)
input
- The input counts.default double impurityWeighted(float[] input)
input
- The input counts.default double impurity(float[] input)
input
- The input counts.default double impurity(int[] input)
input
- The input counts.Copyright © 2015–2021 Oracle and/or its affiliates. All rights reserved.