uk.co.agena.minerva.model.extendedbn
Class ContinuousIntervalEN
java.lang.Object
uk.co.agena.minerva.model.extendedbn.ExtendedNode
uk.co.agena.minerva.model.extendedbn.NumericalEN
uk.co.agena.minerva.model.extendedbn.ContinuousEN
uk.co.agena.minerva.model.extendedbn.ContinuousIntervalEN
- All Implemented Interfaces:
- java.lang.Comparable, java.util.EventListener, ExtendedNodeListener, ExtendedStateListener, Identifiable, Nameable, Writable
- Direct Known Subclasses:
- RankedEN
public class ContinuousIntervalEN
- extends ContinuousEN
This class represents NumericalExtendedNodes whose ExtendedStates contain ranges (e.g. 10 - 20) rather than point values (e.g. 1).
Fields inherited from class uk.co.agena.minerva.model.extendedbn.ExtendedNode |
actOnMarginalsChangedEvent, answerable, connBn, connectableInputNode, connectableOutputNode, connNodeId, CONTINUOUS_INTERVAL_E_N, CURRENT_FUNCTION_STRING, currentNodeFunction, currentParentModelNodeAltId, currentPartitionedModelNodeFunctions, currentPartitionedParentModelNodeAltIds, currentPartitionedParentModelNodes, DEFAULT_FUNCTION_STRING, defaultNodeFunction, defaultParentModelNodeAltId, defaultPartitionedModelNodeFunctions, defaultPartitionedParentModelNodeAltIds, defaultPartitionedParentModelNodes, DELTA, DISCRETE_REAL_E_N, EDITABLE_NODE_FUNCTION, EDITABLE_NPT, EDITABLE_PARENT_STATE_FUNCTIONS, extendedStates, functionMode, id, inputNodeReceivedMarginals, LABELLED_E_N, name, nptReCalcRequired, nptSynchronisedWithFormula, NUMERICAL_E_N, PROBS_NOT_EDITABLE, reportable, targetValue, targetValuePresent, version, visible |
Constructor Summary |
ContinuousIntervalEN()
Default constructor. |
ContinuousIntervalEN(NameDescription name,
uk.co.agena.minerva.model.corebn.CoreBN connBn)
Creates a new ContinuousIntervalEN with the supplied name and connected Core BN. |
ContinuousIntervalEN(NameDescription name,
java.lang.String connNodeId,
uk.co.agena.minerva.model.corebn.CoreBN connBn)
Constructs an ContinuousIntervalEN with the specified name, connected node ID and connected BN. |
Methods inherited from class uk.co.agena.minerva.model.extendedbn.ContinuousEN |
addDDRelativeSumWidthEntropyError, addRangeNotToBeSplit, areNeighboringStatesDisceteValues, cloneTypeSpecific, constructExtraFieldString, copy, createDataPointFromExtendedState, createDataSetForExtendedStates, createDataSetFromNumericValue, createEmptyDataSet, createLogStates, createLogStates, createNewExtendedState, createNewExtendedState, extendedStateRangesForValue, getClosestMedianStateIndex, getDdRelativeSumWidthEntropyErrors, getDisceteValues, getDisceteValuesStateIndexes, getEntropyConvergenceThreshold, getFirstBound, getIndexOfStateThatContains, getLastBound, getRangesNotToBeSplit, getSamplesForState, getSamplesForState, getSampleSize, getScaledTargetValue, getSupportedFunctionTypes, getTargetValueAsString, getTargetValueRange, insertExtendedState, insertExtendedState, insertStatesForValues, isContinueToDynamicallyDiscretise, isDynamicallyDiscretisable, isSimulationNode, isStateSplitable, isUniformJustSet, mergeExtendedStates, mergeExtendedStates, performSplit, processExtraFields, replaceState, replaceState, resetRangesNotToBeSplitList, setContinueToDynamicallyDiscretise, setDdRelativeSumWidthEntropyErrors, setDynamicallyDiscretisable, setEntropyConvergenceThreshold, setNameOfIntervalDataPoint, setNameOfStateUsingRange, setSampleSize, setSimulationNode, setTargetValueFromString, setUniform, setUniformJustSet, truncateStates |
Methods inherited from class uk.co.agena.minerva.model.extendedbn.ExtendedNode |
addChild, addExpressionVariable, addExtendedNodeListener, addExtendedState, addExtendedState, addExtendedStates, addParent, compareTo, containsFunctionOfType, containsOnlyStatisticalFunctions, cropFunctions, enterDistributionOfEvidence, enterDistributionOfEvidence, enterHardEvidence, enterHardEvidence, extendedNodeConnBNNotFound, extendedNodeConnNodeIdChanged, extendedNodeInconsistentEvidenceEntered, extendedNodeMarginalsChanged, extendedNodeNameDescriptionChanged, extendedNodeStateNameChanged, extendedNodeStatesReplaced, extendedNodeVariableAdded, extendedNodeVariableRemoved, extendedNodeVisibleAttributeChanged, extendedStateAdded, extendedStateNameDescriptionChanged, extendedStateRemoved, fireMarginalsChangedEvent, getActOnMarginalsChangedEvent, getAnswerable, getConcreteNodeName, getConcreteNodeType, getConcreteNodeTypeNames, getConnBn, getConnNodeId, getCoreBNNodeEquivalents, getCurrentNodeFunction, getCurrentParentModelNodeAltId, getCurrentPartitionedModelNodeFunctions, getCurrentPartitionedParentModelNodeAltIds, getCurrentPartitionedParentModelNodes, getDefaultNodeFunction, getDefaultParentModelNodeAltId, getDefaultPartitionedModelNodeFunctions, getDefaultPartitionedParentModelNodeAltIds, getDefaultPartitionedParentModelNodes, getExpression, getExpressionVariables, getExtendedState, getExtendedStateAtIndex, getExtendedStates, getExtendedStateShortNames, getExtendedStateWithName, getExtendedStateWithShortDesc, getFunctionMode, getHardEvidence, getId, getInputNodeRecivedMarginalsAsEvidenceDS, getLastSavedPriorIndex, getMarginals, getName, getNextExtendedStateId, getNodeType, getNotes, getNPT, getNPTPopulationMethodAsString, getNPTSize, getNumberOfStateCombsForModelNodes, getPartitionedExpressionModelNodes, getPartitionedExpressions, getReportable, getRowMajorNPT, getSavedPriors, getSuitableMessagePassingNodes, getTargetValue, getTargetValueRangeAsString, getTotalNumberOfExtendedFunctions, getVersion, getVisible, hasParents, isChangeStatesOnInputNodeIfRequired, isConnectableInputNode, isConnectableOutputNode, isInputNodeReceivedMarginals, isInputNodeRecivedMarginalsAsEvidence, isNptReCalcRequired, isNptSynchronisedWithFormula, isTargetValuePresent, isTemporaryNodeOrderFlag, mode, nodeChanged, read, recalculateConnStateIndices, removeAllFurtherSavedPriors, removeExpressionVariable, removeExtendedNodeListener, removeExtendedState, replicateNodeStates, revert2savedPrior, savePrior, setActOnMarginalsChangedEvent, setAnswerable, setChangeStatesOnInputNodeIfRequired, setConnBn, setConnectableInputNode, setConnectableOutputNode, setConnNodeId, setCurrentNodeFunction, setCurrentParentModelNodeAltId, setCurrentPartitionedModelNodeFunctions, setCurrentPartitionedParentModelNodeAltIds, setCurrentPartitionedParentModelNodes, setDefaultNodeFunction, setDefaultParentModelNodeAltId, setDefaultPartitionedModelNodeFunctions, setDefaultPartitionedParentModelNodeAltIds, setDefaultPartitionedParentModelNodes, setExpression, setExpressionVariables, setExtendedStates, setExtendedStates, setFunctionMode, setId, setInputNodeReceivedMarginals, setInputNodeRecivedMarginalsAsEvidence, setInputNodeRecivedMarginalsAsEvidenceDS, setName, setNotes, setNPT, setNPT, setNPT, setNPTForSingleModelParentNode, setNptReCalcRequired, setNptSynchronisedWithFormula, setPartitionedExpressionModelNodes, setPartitionedExpressions, setReportable, setSavedPriors, setTargetValue, setTargetValuePresent, setTemporaryNodeOrderFlag, setupActionForMarginalsChangedEvent, setVersion, setVisible, storeFunctionsCorrectly, toString, updateConnNodeId, updateExpressionVariable, updateFunctionsParentConnNodeId, updateFunctionType, usedInCurrentExpression, write |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
defaultStateNames
protected static java.lang.String[][] defaultStateNames
ContinuousIntervalEN
public ContinuousIntervalEN()
- Default constructor.
ContinuousIntervalEN
public ContinuousIntervalEN(NameDescription name,
uk.co.agena.minerva.model.corebn.CoreBN connBn)
throws ExtendedBNException
- Creates a new ContinuousIntervalEN with the supplied name and connected Core BN. Note that in this constructor, the Core BN node is created afterwards.
- Parameters:
name
- the name of the nodeconnBn
- the Core BN to which it is connect
- Throws:
ExtendedBNException
ContinuousIntervalEN
public ContinuousIntervalEN(NameDescription name,
java.lang.String connNodeId,
uk.co.agena.minerva.model.corebn.CoreBN connBn)
throws ExtendedBNException
- Constructs an ContinuousIntervalEN with the specified name, connected node ID and connected BN. It also initialises the ExtendedStates with numerical
values and Ranges. The numerical value will be the midpoint of the Range. If the Range has infinity at either end, then the midpoint is calculated as the
scaled value, as specified in scaleInfinities().
- Parameters:
name
- the name of the NumericalENconnNodeId
- the ID of the connected node in the underlying BN.connBn
- a reference to the underlying CoreBN
- Throws:
ExtendedBNException
- if there is a problem creating the node
getDefaultStateNames
public static java.lang.String[][] getDefaultStateNames()
configureDefaultExtendedStates
public void configureDefaultExtendedStates()
throws ExtendedStateException
- Sets up a default list of ExtendedStates for this node based on the default state names for this class.
- Specified by:
configureDefaultExtendedStates
in class ExtendedNode
- Throws:
ExtendedStateException
createExtendedStates
public java.util.List createExtendedStates(DataSet ds)
throws ExtendedStateNumberingException,
ExtendedStateException
- Description copied from class:
ExtendedNode
- Takes the supplied DataSet and uses it to generate a List of ExtendedStates
which are then returned. Each type of node can potentially use the DataSet
to generate states in a different. Implementations are provided lower down
in the hierarchy.
- Specified by:
createExtendedStates
in class ExtendedNode
- Parameters:
ds
- the DataSet used for creating the ExtendedStates
- Returns:
- a List of created ExtendedStates
- Throws:
ExtendedStateNumberingException
ExtendedStateException
extendedNodeAttributeChanged
public void extendedNodeAttributeChanged(ExtendedNodeEvent ene,
int attribute)
- Description copied from class:
ExtendedNode
- Called when selected attributes of the node are changed. The Int value in
the second arguement defines what attribute it was that changed, the
constant value for which are available on the ExtendedNodeEvent class
- Specified by:
extendedNodeAttributeChanged
in interface ExtendedNodeListener
- Overrides:
extendedNodeAttributeChanged
in class ExtendedNode
fillArraysUsingAbsolutes
protected void fillArraysUsingAbsolutes(double[] xVals,
double[] pXs)
throws ExtendedBNException
- Description copied from class:
NumericalEN
- Fills the two specified arrays with numerical values and their associated
probabilities using the node marginals. For example, the xVals array might
end up containing [1, 2, 3] and the pXs array might end up containing
[0.5, 0.3, 0.2].
- Overrides:
fillArraysUsingAbsolutes
in class NumericalEN
- Parameters:
xVals
- the array to be filled with numerical valuespXs
- the array to be filled with probabilities
- Throws:
ExtendedBNException
- if there is a problem accessing the marginals
or looking up an ExtendedState
Copyright © 2006 Agena Ltd. All Rights Reserved.