javax.datamining.supervised.classification
Interface CostMatrix
- All Superinterfaces:
- CategoryMatrix, MiningObject
- public interface CostMatrix
- extends CategoryMatrix, MiningObject
CostMatrix is used to measure the cost
of predictions made by a supervised model. The
value at entry (j, k) of a cost matrix
specifies the user valuation of predicting target
class k when target class j is the
truth. By default, returns 0 on the diagonal
and 1 on the off-diagonal if no other value has
been set.
- Author:
- JSR-73 Java Data Mining Expert Group
- See Also:
CategoryMatrix,
MiningObject
|
Method Summary |
void |
setValue(java.lang.Object actualTarget,
java.lang.Object predictedTarget,
double cost)
Adds an entry to the cost matrix at the specified location. |
setValue
public void setValue(java.lang.Object actualTarget,
java.lang.Object predictedTarget,
double cost)
throws JDMException
- Adds an entry to the cost matrix at the specified location. The value represents the user valuation of predicting target class
predictedTarget when target class actualTarget is the truth.
Requires that the actual and predicted categories be members of the CategorySet, if it is present.
- Parameters:
actualTarget - The actual target value.predictedTarget - The predicted target value.cost - The cost of misprediction.
- Returns:
- void
- Throws:
JDMException