public class MeanSquaredError extends Object implements RegressorImpurity
Used to calculate the impurity of a regression node.
RegressorImpurity.ImpurityTuple
Constructor and Description |
---|
MeanSquaredError() |
Modifier and Type | Method and Description |
---|---|
com.oracle.labs.mlrg.olcut.provenance.ConfiguredObjectProvenance |
getProvenance() |
double |
impurity(float[] targets,
float[] weights)
Calculates the impurity based on the supplied weights and targets.
|
RegressorImpurity.ImpurityTuple |
impurityTuple(int[] indices,
int indicesLength,
float[] targets,
float[] weights)
Calculates the weighted impurity of the targets specified in the indices array.
|
RegressorImpurity.ImpurityTuple |
impurityTuple(List<int[]> indices,
float[] targets,
float[] weights)
Calculates the weighted impurity of the targets specified in all the indices arrays.
|
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
impurity, impurity, impurity, impurity
public double impurity(float[] targets, float[] weights)
RegressorImpurity
impurity
in interface RegressorImpurity
targets
- The targets.weights
- The weights.public RegressorImpurity.ImpurityTuple impurityTuple(int[] indices, int indicesLength, float[] targets, float[] weights)
RegressorImpurity
impurityTuple
in interface RegressorImpurity
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.public RegressorImpurity.ImpurityTuple impurityTuple(List<int[]> indices, float[] targets, float[] weights)
RegressorImpurity
impurityTuple
in interface RegressorImpurity
indices
- The indices in the targets and weights arrays.targets
- The regression targets.weights
- The example weights.public com.oracle.labs.mlrg.olcut.provenance.ConfiguredObjectProvenance getProvenance()
getProvenance
in interface com.oracle.labs.mlrg.olcut.provenance.Provenancable<com.oracle.labs.mlrg.olcut.provenance.ConfiguredObjectProvenance>
Copyright © 2015–2021 Oracle and/or its affiliates. All rights reserved.