is.discrete {RNetica} | R Documentation |
A NeticaNode
object can take on either a discrete set of
values or an arbitrary real value. These functions determine which
type of node this is.
is.discrete(node) is.continuous(node)
node |
A |
While in the Netica GUI, one first creates a node and then determines
whether it will be discrete or continuous, in the API this is
determined at the time of creation (by calling
NewContinuousNode()
or NewDiscreteNode()
.
These functions determine which type of node the given node is.
Note that setting NodeLevels
can make a continuous node
behave like a discrete one and vice versa. For continuous nodes, the
levels are cut points for getting a discrete state from the node. For
a discrete node, the levels are real values representing the midpoint
of the states.
TRUE
or FALSE
depending on whether a node is discrete or
continuous.
Currently, this function does not actually look at the internal Netica
state, but rather looks at the field "discrete"
which
is set when the node is created.
Russell Almond
http://norsys.com/onLineAPIManual/index.html: GetNodeType_bn(), SetNodeLevels_bn()
NewDiscreteNode()
, NewContinuousNode()
,
NeticaNode
, NodeLevels()
,
NodeStates()
sess <- NeticaSession() startSession(sess) netx <- CreateNetwork("netx", session=sess) bnode <- NewDiscreteNode(netx,"bool",c("True","False")) stopifnot(is.discrete(bnode)) stopifnot(!is.continuous(bnode)) rnode <- NewContinuousNode(netx,"real") stopifnot(!is.discrete(rnode)) stopifnot(is.continuous(rnode)) DeleteNetwork(netx) stopSession(sess)