mulan.data
Class UnconditionalChiSquareIdentifier

java.lang.Object
  extended by mulan.data.UnconditionalChiSquareIdentifier
All Implemented Interfaces:
Serializable, LabelPairsDependenceIdentifier

public class UnconditionalChiSquareIdentifier
extends Object
implements LabelPairsDependenceIdentifier, Serializable

A class for identification of unconditional dependence between each pair of labels using Chi Square Test For Independence. The chi-square test for independence is applied to the number of instances for each possible combination of two categories.

Version:
30.11.2010
Author:
Lena Chekina (lenat@bgu.ac.il)
See Also:
Serialized Form

Constructor Summary
UnconditionalChiSquareIdentifier()
           
 
Method Summary
 LabelsPair[] calculateDependence(MultiLabelInstances mlInstances)
          Calculates Chi Square values for each pair of labels.
 double getCriticalValue()
          Returns a critical value
 void setCriticalValue(double criticalValue)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UnconditionalChiSquareIdentifier

public UnconditionalChiSquareIdentifier()
Method Detail

calculateDependence

public LabelsPair[] calculateDependence(MultiLabelInstances mlInstances)
Calculates Chi Square values for each pair of labels. It uses Phi correlation value calculated in Statistics as follows: ChiSquareValue = PhiValue^2 * NumberOfInstances in the data set.

Specified by:
calculateDependence in interface LabelPairsDependenceIdentifier
Parameters:
mlInstances - multilabel data set
Returns:
an array of label pairs sorted in descending order of the ChiSquare value

setCriticalValue

public void setCriticalValue(double criticalValue)
Parameters:
criticalValue -

getCriticalValue

public double getCriticalValue()
Description copied from interface: LabelPairsDependenceIdentifier
Returns a critical value

Specified by:
getCriticalValue in interface LabelPairsDependenceIdentifier
Returns:
critical value