calcNoisyOrTable | R Documentation |
Calculates the conditional probability table for a noisy-and distribution. This follows a logical model where at least one inputs must be true for the output to be true; however, some "noise" is allowed that produces random deviations from the pure logic.
calcNoisyOrTable(skillLevels, obsLevels = c("True", "False"),
suppression = rep(0, length(skillLevels)), noGuess = 1,
thresholds = sapply(skillLevels, function(states) states[1]))
calcNoisyOrFrame(skillLevels, obsLevels = c("True", "False"),
suppression = rep(0, length(skillLevels)), noGuess = 1,
thresholds = sapply(skillLevels, function(states) states[1]))
skillLevels |
A list of character vectors giving names of levels for each of the condition variables. |
obsLevels |
A character vector giving names of levels for the output variables from highest to lowest. As a special case, can also be a vector of integers. Its length should be 2, and the first value is considered to be logically equivalent to "true". |
suppression |
A vector of the same length as |
noGuess |
A scalar value between 0 and 1. This represents the probability that the the output will be false even when all of the inputs are false (e.g., 1-guessing probability). |
thresholds |
If the input variables have more than two states, values that are equal to or higher than this threshold are considered true. It is assumed that the states of the variables are ordered from highest to lowest. |
The noisy-or distribution assumes that both the input and output
variables are binary. Basically, the output should be true if any of
the inputs are true. Let S_k = 1
if the k
th input is
true, and let q_k
be the suppression
parameter
corresponding to the k
th input variable. (If the S_k
's
represent a skill, then q_k
represents the probability that an
examinee who has that skill will fail to correctly apply it.)
Then the probability of the true state for the output
variable will be:
\Pr(X=True|{\bf S}) = 1 - q_0 \prod_k q_k^{1-S_k},
where q_0
(the noGuess
parameter) is the probability that
the output will be false even when all of the inputs are false.
It is assumed that all variables are ordered from highest to lowest
state, so that the first state corresponds to "true" the others to
false. If the input variable has more than two states, then it can be
reduced to a binary variable by using the threshold
argument.
Any values which are equal to or higher than the threshold
for
that variable are assumed to be true. (In this case, higher means
closer to the the beginning of the list of possible values.)
For calcNoisyOrTable
, a matrix whose rows correspond configurations
of the parent variable states (skillLevels
) and whose columns
correspond to obsLevels
. Each row of the table is a
probability distribution, so the whole matrix is a conditional
probability table. The order of the parent rows is the same as is
produced by applying expand.grid
to skillLevels
.
For calcNoisyOrFrame
a data frame with additional columns
corresponding to the entries in skillLevels
giving the parent
value for each row.
This is related to the DINO and NIDO models, but uses a slightly
different parameterization. In particular, if the noSlip
parameter is omitted, it is a noisy input deterministic and-gate
(NIDO), and if the bypass
parameters are omitted, it is similar
to a deterministic input noisy and-gate (DINO), except is lacks a
slip parameter.
Russell Almond
Almond, R.G., Mislevy, R.J., Steinberg, L.S., Yan, D. and Williamson, D.M. (2015) Bayesian Networks in Educational Assessment. Springer. Chapter 8.
Pearl, J. (1988) Probabilistic Reasoning in Intelligent Systems: Networks of Plausible Inference. Morgan Kaufmann.
Diez, F. J. (1993) Parameter adjustment in Bayes networks. The generalized noisy OR-gate. In Heckerman and Mamdani (eds) Uncertainty in Artificial Intelligence 93. Morgan Kaufmann. 99–105.
Srinivas, S. (1993) A generalization of the Noisy-Or model, the generalized noisy OR-gate. In Heckerman and Mamdani (eds) Uncertainty in Artificial Intelligence 93. Morgan Kaufmann. 208–215.
calcDSTable
, calcDNTable
,
calcDPCTable
, expand.grid
,
calcNoisyOrTable
## Logical or table
or <- calcNoisyOrFrame(list(c("True","False"),c("True","False")),
c("Right","Wrong"))
## DINO, logical-or except that is allows for a small chance of slipping.
dino <- calcNoisyOrFrame(list(c("True","False"),c("True","False")),
noGuess=.9)
##NIDO, logical-or except that inputs can randomly be bypassed
nido <- calcNoisyOrFrame(list(c("True","False"),c("True","False")),
suppression=c(.3,.4))
##Full Noisy Or distribution
noisyOr <- calcNoisyOrFrame(list(c("True","False"),c("True","False")),
noGuess=.9,suppression=c(.3,.4))
thresh <- calcNoisyOrFrame(list(c("H","M","L"),c("H","M","L")),
c("Right","Wrong"),
threshold=c("M","H"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.