BNEngineNDB-class | R Documentation |
"BNEngineNDB"
A BNEngine
instance which is not connected
to a database.
Class "BNEngine"
, directly.
All reference classes extend and inherit methods from
"envRefClass"
.
signature(x = "BNEngineNDB")
: Returns list of
EvidenceSet
s in the queue.
signature(x = "BNEngineNDB", value="list")
:
Sets the list of EvidenceSet
s in the queue.
At the start of each iteration of the mainLoop
, it
checks eng$shouldHalt()
method. If this returns TRUE
,
then execution is immediately halted. When the queue is empty, it
checks the eng$stopWhenFinished()
method. If this returns
true, then the main loop also terminates.
In the no database version, the process communicates with the rest of
the system by checking the file referenced in the activeTest
field. The eng$activate()
creates this file with the extension
‘.running’. Renaming the file to have the extension
.finish
will cause eng$stopWhenFinished()
to return
true, that is the mainLoop
will finish when the queue is
empty. Renaming the file to have the extension .halt
will
cause eng$shouldHalt()
to return true, and mainLoop
will
stop when it finishes processing the current event.
app
:Object of class character
giving an
globally unique identifier for the application
srs
:Object of class
StudentRecordSet
of NULL
giving the
student record set for the application.
profModel
:Object of class character
giving the
name of the proficiency model (for the default student record) in
the warehouse manifest.
listenerSet
:Object of class ListenerSet
giving
a set of listeners who will listen for new statistics.
statistics
:Object of class list
containing
Statistic
objects to be run on every update
cycle.
histNodes
:Object of class character
giving the
names of the nodes in the proficiency model whose history will be
recorded.
warehouseObj
:Object of class
PnetWarehouse
which stores the Bayes nets, both evidence models and student
models are stored here.
waittime
:Object of class numeric
giving the
time in seconds the main event loop should wait before checking
again for messages.
processN
:Object of class numeric
giving the
number of times that the main loop should run before stopping. If
Inf
, then the main loop will run without stopping.
manifest
:Object of class data.frame
which
provides the manifest for the PnetWarehouse
histnodes
:Object of class character
which
gives the names of the nodes for whom history will be recorded.
evidenceQueue
:A list
of
EvidenceSet
events to be processed.
statmat
:Object of class data.frame
which gives
the descriptions of the Statistic
objects to
be used with the net.
activeTest
:A pathname to the file whose existance will be checked to determine whether or not the engine should be considered active.
activate()
:Creates the activeTest
to indicate
that the process is running.
deactivate()
:Deletes the activeTest
file to
indicate that the process is no longer running.
shouldHalt()
:This function checks the
activeTest
file to see whether or not the flag is set to
cause the process to halt after processing the current record..
stopWhenFinished()
: This function checks the
activeTest
file database to see whether or not the flag is
set to cause the process to stop when the event queue is empty.
studentRecords()
: Returns the
StudentRecordSet
associated with this engine.
fetchStats()
:Fetches the statistics marked in the database configuration.
fetchStats()
: Fetches the statistics or information in
the statmat
field.
initialize(app, warehouse, listeners, profModel,
waittime, statistics, histNodes, evidenceQueue, processN,
statmat, ...)
:Initializes this class
saveManifest(manifest)
:This sets the internal manifest field.
fetchManifest()
:This returns the internal manifest field.
fetchNextEvidence()
: This returns the first evidence set
from the evidenceQueue
field, and removes that element from
the queue.
saveStats(statmat)
:This saves the statistic table to the internal field.
evidenceSets()
:This returns NULL
show()
:This produces a printable summary.
The following methods are inherited (from the corresponding class): evidenceSets ("BNEngine"), stats ("BNEngine"), setProcessed ("BNEngine"), setManifest ("BNEngine"), activate ("BNEngine"), isActivated ("BNEngine"), saveManifest ("BNEngine"), setHistNodes ("BNEngine"), studentRecords ("BNEngine"), saveStats ("BNEngine"), fetchNextEvidence ("BNEngine"), setError ("BNEngine"), getHistNodes ("BNEngine"), warehouse ("BNEngine"), show ("BNEngine"), fetchManifest ("BNEngine"), fetchStats ("BNEngine")
The assumption of this engine is that the serialized student model will be passed in along with the evidence and will be returned along with the updated statistics.
Russell Almond
Almond, Mislevy, Steinberg, Yan and Williamson (2015). Bayesian Networks in Educational Assessment. Springer. Especially Chapter 13.
Classes:
BNEngine
, BNEngineMongo
Constituent parts:
StudentRecordSet
, PnetWarehouse
Setup Functions:
loadManifest
,
setupDefaultSR
,
configStats
,
baselineHist
,
Main Loop Functions:
mainLoop
,
accumulateEvidence
,
handleEvidence
,
getRecordForUser
,
logEvidence
,
updateSM
,
updateStats
,
updateHist
,
announceStats
,
showClass("BNEngineNDB")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.