|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.duke.cs.banjo.data.observations.Observations
edu.duke.cs.banjo.data.observations.ObservationsAsArray
Loads the observation data necessary for the search.
Details:
- Important:
The Evaluator class uses the internal representation of the observations
for performance, thus breaking encapsulation.
- Implementation of a data set, using a simple matrix of
    n rows of observationDataPoints
        by
    m columns of variables (nodes)
Change History:
Based on Banjo 1.0 Observations class, created on Mar 4, 2004
4/1/2004 hjs Change data type for external access to int
7/7/2004 hjs Change the internal representation from Char to Integer
9/14/2005 (v1.0.4) hjs Changes to properly handle discretization of multiple
observation files
11/28/2005 (v1.0.5) hjs Correction to interval discretization
10/25/2005 (v2.0) hjs Eliminate the references to the (never supported)
"related observations" code. (This was old code in
desperate need of cleanup.)
10/28/2005 (v2.0) hjs Add additional field for access to the overall maximum
value that the variables can assume.
7/11/2006 (v2.0) hjs Implement more memory efficient storage of observations,
using 1-dim arrays instead of matrices (multi-dim. arrays).
This class and the corresponding ObservationsAsMatrix class
will be combined into a common hierarchy, so code common to both
can be pulled out.
3/4/2008 (v2.2) hjs Pull out JZOOWildCardFilter into separate class.
Field Summary | |
protected int |
dimLags
|
protected int |
dimObservations
|
protected int |
dimVariables
|
int[] |
observationDataPointsCompact
|
protected int |
offsetLags
|
protected int |
offsetObservations
|
protected int |
offsetVariables
|
Fields inherited from class edu.duke.cs.banjo.data.observations.Observations |
combinedObservationDataPointsAsLoaded, combinedPreprocessedObservationsAsLoaded, maxMarkovLag, maxValue, maxValueCount, minMarkovLag, numberOfObservationsFiles, observationCount, observationRowCount, observedObservationCount, preprocessedObservationsWithFileInfo, processData, specifiedObservationCount, varCount, variableNames |
Constructor Summary | |
ObservationsAsArray(Settings _processData)
ObservationsAsMatrix constructor. |
Method Summary | |
protected void |
combinePreprocessedObservations(PreprocessedObservations[] _preprocessedObservations)
Combines the loaded observations into a single large array. |
void |
computeMaxValueCounts()
Computes the maximum values for all the variables in the data set given by the current observations. |
int |
getMaxValueCount()
Get the maximum value that any variable can assume. |
int |
getMaxValueCount(int _nodeID)
Get the maximum value that a specified variable can assume. |
int |
getObservationCount()
|
int |
getObservationRowCount()
|
int |
getObservationValue(int _observationRow,
int _variableID,
int _MarkovLag)
|
PreprocessedObservations[] |
getPreprocessedObservationsWithFileInfo()
|
java.lang.String |
getValueCountList()
|
int |
getVarCount()
|
java.lang.String[] |
getVariableNames()
|
void |
loadData(Settings _processData)
Loads the data from the user-specified observations files. |
void |
prepareData()
Prepares the observations by applying an (optional) discretization. |
void |
releaseStagingData()
Releases the data structures used for storing the original "raw" data (as loaded from file in String format). |
void |
setObservationDataPoints(int[] _observationsCompact)
|
void |
setObservationValue(int _observationIndex,
int _variableIndex,
int _MarkovLagIndex,
int _observationValue)
|
void |
setVariableNames(java.lang.String[] _variableNames)
|
java.lang.String |
toString()
|
private boolean |
validateRequiredData()
Validates the settings values required for loading the observations. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public int[] observationDataPointsCompact
protected final int dimObservations
protected final int dimVariables
protected final int dimLags
protected final int offsetObservations
protected final int offsetVariables
protected final int offsetLags
Constructor Detail |
public ObservationsAsArray(Settings _processData) throws java.lang.Exception
_processData
- The settings that define the search process.Method Detail |
private boolean validateRequiredData() throws java.lang.Exception
java.lang.Exception
public void loadData(Settings _processData) throws java.lang.Exception
_processData
- The settings that define the search process.
java.lang.Exception
protected void combinePreprocessedObservations(PreprocessedObservations[] _preprocessedObservations) throws java.lang.Exception
_preprocessedObservations
- An array of PreprocessedObservations, each obtained, e.g., from a file.
java.lang.Exception
public void prepareData() throws java.lang.Exception
java.lang.Exception
public int getMaxValueCount(int _nodeID)
public int getMaxValueCount()
public void computeMaxValueCounts() throws java.lang.Exception
java.lang.Exception
public java.lang.String toString()
public void setObservationValue(int _observationIndex, int _variableIndex, int _MarkovLagIndex, int _observationValue)
public int getObservationValue(int _observationRow, int _variableID, int _MarkovLag)
public final int getObservationRowCount()
public void setObservationDataPoints(int[] _observationsCompact)
_observationsCompact
- The observationDataPoints to set.public final int getVarCount()
public java.lang.String getValueCountList()
public int getObservationCount()
public PreprocessedObservations[] getPreprocessedObservationsWithFileInfo()
public void releaseStagingData()
public java.lang.String[] getVariableNames()
public void setVariableNames(java.lang.String[] _variableNames)
_variableNames
- The variableNames to set.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |