nz.ac.waikato.mcennis.rat.graph.algorithm.collaborativefiltering
Class AssociativeMiningItems

java.lang.Object
  extended by nz.ac.waikato.mcennis.rat.graph.algorithm.collaborativefiltering.AssociativeMiningItems
All Implemented Interfaces:
java.lang.Comparable

public class AssociativeMiningItems
extends java.lang.Object
implements java.lang.Comparable

TODO: update XML import and export Represents a single association between a set of actors and a destiation actor This association has a significance level and may be positive or negative.


Constructor Summary
AssociativeMiningItems(java.util.Collection<Actor> col, LinkQuery relation, LinkQuery.LinkEnd direction, double significance)
          Create a new association containing all actors in the collection over the given relation declaring its significance level.
AssociativeMiningItems(Graph g, LinkQuery relation, LinkQuery.LinkEnd direction, Actor value)
          Create a new association on this graph, with this relation, using this actor.
 
Method Summary
 boolean applies(java.util.HashSet<Actor> data)
          Are all the given actors present in this association?
 void clearTransients()
          Eliiminates all transient objects.
 int compareTo(java.lang.Object o)
           
 AssociativeMiningItems expand(Actor newActor)
          Create a new association that also includes the given new actor.
 Actor[] getActors()
          Get the actors in this association backed by this array.
 double getNegativeSignificance()
          Return the threshold that determines whether or not a candidate association has a negative correlation with the destination.
 double getPositiveSignificance()
          Return the threshold that determines whether or not a candidate association has a positive correlation with the destination.
 double getSignificance()
          Get the statistical significance of the association
 boolean isGreater(Actor a)
          Is this actor greater than all actors in this association
 boolean isPositive()
          Is this association positively or negatively correlated with the destination actor
 void setNegativeSignificance(double negativeSignificance)
          Set the threshold that determines whether or not a candidate association has a negative correlation with the destination.
 void setPositive(boolean isPositive)
          Set whether this association positively or negatively correlated with the destination actor
 void setPositiveSignificance(double positiveSignificance)
          Set the threshold that determines whether or not a candidate association has a positive correlation with the destination.
 void setSignificance(double significance)
          Set the statistical significance of the association
 int significanceTest(Actor target)
          Given the set of all actors in this association and the target, is their a significant difference between the population of the destination actor in the set of all references over the relation in the candidate association compared to over the entire relation.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AssociativeMiningItems

public AssociativeMiningItems(Graph g,
                              LinkQuery relation,
                              LinkQuery.LinkEnd direction,
                              Actor value)
Create a new association on this graph, with this relation, using this actor. The destination actor is not maintained in this object.

Parameters:
g - graph for data
relation - type of link to get assocaitions from
value - seed actor for this association

AssociativeMiningItems

public AssociativeMiningItems(java.util.Collection<Actor> col,
                              LinkQuery relation,
                              LinkQuery.LinkEnd direction,
                              double significance)
Create a new association containing all actors in the collection over the given relation declaring its significance level.

Parameters:
col - collections of actors in this association
relation - link relation from which this association is derived
significance - level of significance of this association
Method Detail

getSignificance

public double getSignificance()
Get the statistical significance of the association

Returns:
statistical significance of this association

setSignificance

public void setSignificance(double significance)
Set the statistical significance of the association

Parameters:
significance - statistical significance of the association

isPositive

public boolean isPositive()
Is this association positively or negatively correlated with the destination actor

Returns:
positive or negative correlation.

setPositive

public void setPositive(boolean isPositive)
Set whether this association positively or negatively correlated with the destination actor

Parameters:
isPositive - is the correlation positive

expand

public AssociativeMiningItems expand(Actor newActor)
Create a new association that also includes the given new actor. It is assumed that the actor is greater (by actor ordering) than any actor already in this the association and that a significane test is performed elsewhere.

Parameters:
newActor - actor that is to added to the new association
Returns:
new association.

getActors

public Actor[] getActors()
Get the actors in this association backed by this array. This will always be at least one actor, but it is not guarenteed to be either ordered or in a consistant order.

Returns:
array of actors in the associative array

isGreater

public boolean isGreater(Actor a)
Is this actor greater than all actors in this association

Parameters:
a - actor to be compared
Returns:
is actor larger than all actors in the association

significanceTest

public int significanceTest(Actor target)
Given the set of all actors in this association and the target, is their a significant difference between the population of the destination actor in the set of all references over the relation in the candidate association compared to over the entire relation.

Parameters:
target - actor to be tentatively added to the association
Returns:
negative or positive if correlated, zero otherwise.

getNegativeSignificance

public double getNegativeSignificance()
Return the threshold that determines whether or not a candidate association has a negative correlation with the destination. Value is a double between 0.0 and 1.0.

Returns:
threshold for declaring a significant negative correlation

setNegativeSignificance

public void setNegativeSignificance(double negativeSignificance)
Set the threshold that determines whether or not a candidate association has a negative correlation with the destination. Value is a double between 0.0 and 1.0.

Parameters:
negativeSignificance - threshold for declaring a significant negative correlation

getPositiveSignificance

public double getPositiveSignificance()
Return the threshold that determines whether or not a candidate association has a positive correlation with the destination. Value is a double between 0.0 and 1.0.

Returns:
threshold for declaring a significant positive correlation

setPositiveSignificance

public void setPositiveSignificance(double positiveSignificance)
Set the threshold that determines whether or not a candidate association has a positive correlation with the destination. Value is a double between 0.0 and 1.0.

Parameters:
positiveSignificance - threshold for declaring a significant positive correlation

clearTransients

public void clearTransients()
Eliiminates all transient objects. This reduces memory usage, but, after calling this, the association is effectively immutable.


applies

public boolean applies(java.util.HashSet<Actor> data)
Are all the given actors present in this association?

Parameters:
data - set of actors to check
Returns:
are all actors present or not

compareTo

public int compareTo(java.lang.Object o)
Specified by:
compareTo in interface java.lang.Comparable

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

Get Relational Analysis Toolkit at SourceForge.net. Fast, secure and Free Open Source software downloads