public class MSEImpurityMeasure extends Object implements ImpurityMeasure<MSEImpurityMeasure>
\frac{1}{L}\sum_{i=0}^{n}(y_i - \mu)^2
.Constructor and Description |
---|
MSEImpurityMeasure(double leftY,
double leftY2,
long leftCnt,
double rightY,
double rightY2,
long rightCnt)
Constructs a new instance of mean squared error (variance) impurity measure.
|
Modifier and Type | Method and Description |
---|---|
MSEImpurityMeasure |
add(MSEImpurityMeasure b)
Adds the given impurity to this.
|
long |
getLeftCnt() |
double |
getLeftY() |
double |
getLeftY2() |
long |
getRightCnt() |
double |
getRightY() |
double |
getRightY2() |
double |
impurity()
Calculates impurity measure as a single double value.
|
MSEImpurityMeasure |
subtract(MSEImpurityMeasure b)
Subtracts the given impurity for this.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
compareTo
public MSEImpurityMeasure(double leftY, double leftY2, long leftCnt, double rightY, double rightY2, long rightCnt)
leftY
- Sum of all elements in the left part.leftY2
- Sum of all squared elements in the left part.leftCnt
- Number of elements in the left part.rightY
- Sum of all elements in the right part.rightY2
- Sum of all squared elements in the right part.rightCnt
- Number of elements in the right part.public double impurity()
impurity
in interface ImpurityMeasure<MSEImpurityMeasure>
public MSEImpurityMeasure add(MSEImpurityMeasure b)
add
in interface ImpurityMeasure<MSEImpurityMeasure>
b
- Another impurity.public MSEImpurityMeasure subtract(MSEImpurityMeasure b)
subtract
in interface ImpurityMeasure<MSEImpurityMeasure>
b
- Another impurity.public double getLeftY()
public double getLeftY2()
public long getLeftCnt()
public double getRightY()
public double getRightY2()
public long getRightCnt()
GridGain In-Memory Computing Platform : ver. 8.9.14 Release Date : November 5 2024