| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectemolib.classifier.machinelearning.ARNReduced.Graph
public class ARNReduced.Graph
Generic graph inner class. As a general rule, the graph contains the minimum amount of valuable information, i.e., the term frequencies. For more enhanced IR measures the ARN should be able to manage with these rates.
| Constructor Summary | |
|---|---|
| ARNReduced.Graph()Graph constructor. | |
| Method Summary | |
|---|---|
|  void | addLink(ARNReduced.GraphElement link)Method to add a link with its frequential information. | 
|  void | addLink(java.lang.String lTerm,
        java.lang.String rTerm)Method to add a link. | 
|  void | addNode(ARNReduced.GraphElement term)Method to add a node with its frequential information. | 
|  void | addNode(java.lang.String term)Method to add a node. | 
|  ARNReduced.Graph | cloneGraph()Function to clone this graph. | 
|  boolean | containsElement(ARNReduced.GraphElement elem)Function to determine if it contains an element. | 
|  boolean | containsLink(java.lang.String linkLeftTerm,
             java.lang.String linkRightTerm)Function to check if the graph contains a specific link. | 
|  boolean | containsNode(java.lang.String nodeTerm)Function to check if the graph contains a specific node. | 
|  void | dumpContent()Dump the content of this graph for debugging purposes. | 
|  int[] | exportVectorTF()Function to export this graph as a vector of term frequencies. | 
|  float[] | exportWeighedVector()Function to export this graph as a vector of weighed measures. | 
|  Jama.Matrix | exportWeightedMatrix()Function to export this graph into a weighted matrix. | 
|  java.util.ArrayList<java.lang.String> | getArrayOfTerms()Function to retrieve a list of terms from this graph. | 
|  java.lang.String | getCategoryName()Function to get the category name of this graph. | 
|  ARNReduced.GraphElement | getElement(int num)Function to retrive the specified element of this graph. | 
|  int | getElementTermFrequency(ARNReduced.GraphElement elem)Function to retrieve the TF of the given graph element, whatsoever it is (node or term). | 
|  int | getLinkTermFrequency(java.lang.String linkLeftTerm,
                     java.lang.String linkRightTerm)Function to retrieve the term frequency of a given link. | 
|  java.util.ArrayList<java.lang.String> | getListOfNodes()Function to retrieve the number of nodes (ie words) of this graph. | 
|  int | getNodeTermFrequency(java.lang.String nodeTerm)Function to retrieve the term frequency of a given node. | 
|  int | getNumberOfElements()Function to retrieve the number of elements of this graph. | 
|  int | getTotalSumTF()Function to retrieve the total sum of term frequencies in this structure. | 
|  void | pruneUtility(int numSelected)Prunes the graph by ordering terms wrt their utility and removing the least useful. | 
|  void | removeElement(int index)Removes a single element. | 
|  void | resetTermFrequencies()Method to reset the term frequencies of this graph. | 
|  void | setCategoryName(java.lang.String name)Method to add a category name to this graph. | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
|---|
public ARNReduced.Graph()
| Method Detail | 
|---|
public int getNumberOfElements()
public java.util.ArrayList<java.lang.String> getListOfNodes()
public java.util.ArrayList<java.lang.String> getArrayOfTerms()
public void setCategoryName(java.lang.String name)
name - The name.public java.lang.String getCategoryName()
public int getTotalSumTF()
public void dumpContent()
public void addNode(java.lang.String term)
term - The term of the node to add.public void addNode(ARNReduced.GraphElement term)
term - The node to add.public boolean containsNode(java.lang.String nodeTerm)
nodeTerm - The node term.
public int getNodeTermFrequency(java.lang.String nodeTerm)
nodeTerm - The node term.
public void addLink(java.lang.String lTerm,
                    java.lang.String rTerm)
lTerm - The left term of the link to add.rTerm - The right term of the link to add.public void addLink(ARNReduced.GraphElement link)
link - The link to add.
public boolean containsLink(java.lang.String linkLeftTerm,
                            java.lang.String linkRightTerm)
linkLeftTerm - The link left term.linkRightTerm - The link right term.
public int getLinkTermFrequency(java.lang.String linkLeftTerm,
                                java.lang.String linkRightTerm)
linkLeftTerm - The link left term.linkRightTerm - The link right term.
public ARNReduced.GraphElement getElement(int num)
num - Element number.
public boolean containsElement(ARNReduced.GraphElement elem)
elem - The element under test.
public int getElementTermFrequency(ARNReduced.GraphElement elem)
elem - The input graph element.
public int[] exportVectorTF()
public float[] exportWeighedVector()
public Jama.Matrix exportWeightedMatrix()
public ARNReduced.Graph cloneGraph()
public void resetTermFrequencies()
public void pruneUtility(int numSelected)
numSelected - The number of useful terms desired.public void removeElement(int index)
index - The index of the element to remove.| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||