id3
Class NodeLoss

java.lang.Object
  |
  +--id3.NodeLoss

public class NodeLoss
extends java.lang.Object

Class used for node accuracies. Stores the total weight of instances this node is responsible for, and also the total losses incurred by this node.


Field Summary
 double totalLoss
          Total losses incurred by this node.
 double totalLossSquared
          The totalLoss value squared.
 double totalWeight
          The total weight of instances in this node.
 
Method Summary
 void display(java.io.BufferedWriter ostream)
          Display this NodeLoss object to a BufferedWriter.
 void update(double weight, double loss)
          Updates the total weight and total loss information.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

totalWeight

public double totalWeight
The total weight of instances in this node.

totalLoss

public double totalLoss
Total losses incurred by this node.

totalLossSquared

public double totalLossSquared
The totalLoss value squared.
Method Detail

display

public void display(java.io.BufferedWriter ostream)
Display this NodeLoss object to a BufferedWriter.
Parameters:
ostream - The BufferedWriter to which this NodeLoss is displayed.

update

public void update(double weight,
                   double loss)
Updates the total weight and total loss information.
Parameters:
weight - The new total weight.
loss - The new loss value.