edu.ucla.belief.learn
Class LearningData
Object
LearningData
- All Implemented Interfaces:
- Map
public class LearningData
- extends Object
- implements Map
- Since:
- 110603
- Author:
- Keith Cascio
FLAG_REDUCE_CASES
public static final boolean FLAG_REDUCE_CASES
- See Also:
- Constant Field Values
LearningData
public LearningData(List vars)
- Since:
- 111903
LearningData
public LearningData()
- Since:
- 111903
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