edu.ucla.belief.learn
Class LearningData

Object
  extended by LearningData
All Implemented Interfaces:
Map

public class LearningData
extends Object
implements Map

Since:
110603
Author:
Keith Cascio

Nested Class Summary
 class LearningData.Struct
           
 
Nested classes/interfaces inherited from interface Map
Map.Entry<K,V>
 
Field Summary
static boolean FLAG_REDUCE_CASES
           
 
Constructor Summary
LearningData()
           
LearningData(List vars)
           
 
Method Summary
 void add(Map record)
           
 void clear()
           
 boolean containsKey(Object key)
           
 boolean containsValue(Object value)
           
 void debugPrint(Object o, PrintWriter stream)
           
 void debugPrint(PrintWriter stream)
           
 void ensureCapacity(int capacity)
           
 Set entrySet()
           
 boolean equals(Object o)
           
 Object get(Object key)
           
 int getCurrentRecord()
           
 double getCurrentWeight()
           
 FiniteVariable getDebugVariable()
           
 double getWeight(int indexRecord)
           
 int hashCode()
           
 boolean isEmpty()
           
 Set keySet()
           
static void main(String[] args)
          Test/debug
 int numRecords()
          Returns the number of evidence Maps in list.
 Object put(Object key, Object value)
           
 void putAll(Map t)
           
 void readData(BufferedReader in, BeliefNetwork bn)
           
 void readData(File infile, BeliefNetwork bn)
          Reads data from a Hugin-style plain text "case" file.
 Object remove(Object key)
           
 void setCurrentRecord(int index)
           
 int size()
           
 Collection values()
           
 String valuesToString()
           
 Set variables()
          Returns the set of variables.
 void writeData(File outfile)
          Writes data to a Hugin-style plain text "case" file.
 
Methods inherited from class Object
getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FLAG_REDUCE_CASES

public static final boolean FLAG_REDUCE_CASES
See Also:
Constant Field Values
Constructor Detail

LearningData

public LearningData(List vars)
Since:
111903

LearningData

public LearningData()
Since:
111903
Method Detail

valuesToString

public String valuesToString()

getDebugVariable

public FiniteVariable getDebugVariable()

getCurrentWeight

public double getCurrentWeight()

getWeight

public double getWeight(int indexRecord)

getCurrentRecord

public int getCurrentRecord()

setCurrentRecord

public void setCurrentRecord(int index)

size

public int size()
Specified by:
size in interface Map

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface Map

containsKey

public boolean containsKey(Object key)
Specified by:
containsKey in interface Map

containsValue

public boolean containsValue(Object value)
Specified by:
containsValue in interface Map

get

public Object get(Object key)
Specified by:
get in interface Map

put

public Object put(Object key,
                  Object value)
Specified by:
put in interface Map

remove

public Object remove(Object key)
Specified by:
remove in interface Map

putAll

public void putAll(Map t)
Specified by:
putAll in interface Map

clear

public void clear()
Specified by:
clear in interface Map

keySet

public Set keySet()
Specified by:
keySet in interface Map

values

public Collection values()
Specified by:
values in interface Map

entrySet

public Set entrySet()
Specified by:
entrySet in interface Map

equals

public boolean equals(Object o)
Specified by:
equals in interface Map
Overrides:
equals in class Object

hashCode

public int hashCode()
Specified by:
hashCode in interface Map
Overrides:
hashCode in class Object

debugPrint

public void debugPrint(PrintWriter stream)

debugPrint

public void debugPrint(Object o,
                       PrintWriter stream)

readData

public void readData(File infile,
                     BeliefNetwork bn)
              throws IOException
Reads data from a Hugin-style plain text "case" file. The variables listed in the file must contain all of the variables in LearningData. Erroneous records are ignored.

Throws:
IOException

readData

public void readData(BufferedReader in,
                     BeliefNetwork bn)
              throws IOException
Throws:
IOException

writeData

public void writeData(File outfile)
               throws IOException
Writes data to a Hugin-style plain text "case" file.

Throws:
IOException

variables

public Set variables()
Returns the set of variables.


numRecords

public int numRecords()
Returns the number of evidence Maps in list.


ensureCapacity

public void ensureCapacity(int capacity)
Since:
111903

add

public void add(Map record)
Since:
111903

main

public static void main(String[] args)
Test/debug



Copyright 2010 UCLA Automated Reasoning Group