BNEngineMongo | R Documentation |
The BNEngineMongo
is a
BNEngine
which is attached to a
MongoDB
database, which hold both the queue and
the StudentRecordSet
.
newBNEngineMongo(app = "default", warehouse, listenerSet = NULL, processN = Inf,
statistics = list(),
dburi = "mongodb://localhost", sslops = mongolite::ssl_options(),
eadbname = "EARecords", admindbname = "Proc4", waittime = 0.25,
profModel = character(), histNodes = character(),
errorRestart = c("checkNoScore", "stopProcessing", "scoreAvailable"),
srcol = "StudentRecords",
mongoverbose = FALSE,
srs = StudentRecordSet(app = app, warehouse = warehouse,
db = MongoDB(srcol, eadbname, dburi, verbose = mongoverbose,
options = sslops)),
manifestCol = "Manifest", manifestDB = MongoDB(manifestCol,
eadbname, dburi, verbose = mongoverbose, options = sslops),
evidenceCol = "EvidenceSets", evidenceQueue = new("MongoQueue",
app = app, messDB = MongoDB(evidenceCol, eadbname, dburi,
verbose = mongoverbose, options = sslops), builder = Proc4::buildMessage),
histcol = "histNodes", histNodesDB = MongoDB(histcol, eadbname,
dburi, verbose = mongoverbose, options = sslops),
statcol = "Statistics",
statDB = MongoDB(statcol, eadbname, dburi, verbose = mongoverbose,
options = sslops),
admincol = "AuthorizedApps", adminDB = MongoDB(admincol,
admindbname, dburi, verbose = mongoverbose, options = sslops),
...)
app |
A character scalar giving the globally unique identifier for the application. |
warehouse |
A |
listenerSet |
A |
statistics |
Object of class |
dburi |
A character scalar giving the login information for the
mongo database. See |
sslops |
Options for SSL connections to database. See |
eadbname |
The name for the EA database. |
admindbname |
The name of the admin database used to check for shutdown requests. |
processN |
The number of records to process before stopping. The
default value |
waittime |
The amout of time (in seconds) to wait before checking again for new evidence sets when the evidence set queue is empty. |
profModel |
The name of the proficiency model (its ID in the warehouse manifest). |
histNodes |
A character vector giving the names of the nodes for which history will automaticall be recorded. |
errorRestart |
A character scalar describing how to handle errors. The default, "checkNoScore" will continue scoreing to try to find additional errors, but will not report statistics; the "scoreAvailable" option reports the scores based on the evidence sets which do not produce errors. The "stopProcessing" option immediately stops processing. |
srcol |
A character scalar giving the name of the database backing the student record set. Ignored if |
mongoverbose |
A flag. If true, extra debugging information from database calls is generated. |
srs |
A |
manifestCol |
The name of the column containing the manifest data, ignored if |
manifestDB |
A |
evidenceCol |
The name of the column containing the evidence sets, ignored if |
evidenceQueue |
A |
histcol |
The name of the column into which history data should be stored, ignored if |
histNodesDB |
A |
statcol |
The name of the column into which statistics should be stored, ignored if |
statDB |
A |
admincol |
The name of the column in the administrative database where engine status information is stored, ignored if |
adminDB |
A |
... |
Extra arguments are ignored. This allows arguments for other engine versions to be set in the parameters and ignored. |
This creates an uninitialized BNEngine
,
specifically a BNEngineMongo
.
The app
, warehouse
, and listenerSet
arguments need to be supplied,
for most of the rest, the default arguments work.
In particular, most of the “db” arguments are built using the default arguments.
The makeDBuri
function provides a useful
shorthand for calculating the dburi
field.
An object of calls BNEngineMongo
which is capable
of scoring student models.
Much of this information comes from the “config.json” file, with the dburi
, eadbname
,
admindbname
, and sslops
arguments come from the “EA.ini” file.
Russell Almond
Almond, Mislevy, Steinberg, Yan and Williamson (2015). Bayesian Networks in Educational Assessment. Springer. Especially Chapter 13.
Classes:
BNEngine
, BNEngineNDB
Constituent parts:
StudentRecordSet
, PnetWarehouse
ListenerSet
Setup Functions:
loadManifest
,
setupDefaultSR
,
configStats
,
baselineHist
,
Main Loop Functions:
mainLoop
,
accumulateEvidence
,
handleEvidence
,
getRecordForUser
,
logEvidence
,
updateSM
,
updateStats
,
updateHist
,
announceStats
,
## Not run:
## Requires database setup, also PNetica
library(RNetica) ## Must load to setup Netica DLL
app <- "ecd://epls.coe.fsu.edu/EATest"
sess <- RNetica::NeticaSession()
RNetica::startSession(sess)
config.dir <- file.path(library(help="Peanut")$path, "auxdata")
net.dir <- file.path(library(help="PNetica")$path,"testnets")
netman <- read.csv(file.path(config.dir, "Mini-PP-Nets.csv"),
row.names=1, stringsAsFactors=FALSE)
stattab <- read.csv(file.path(config.dir, "Mini-PP-Statistics.csv"),
as.is=TRUE)
Nethouse <- PNetica::BNWarehouse(netman,session=sess,
address=net.dir)
cl <- new("CaptureListener")
listeners <- list("cl"=cl)
ls <- ListenerSet(sender= paste("EAEngine[",basename(app),"]"),
dbname="EARecords", dburi=makeDBuri(host="localhost"),
listeners=listeners,
colname="Messages")
eng <- newBNEngineMongo(app=app,warehouse=Nethouse,
listenerSet=ls,
dburi=makeDBuri(host="localhost"),
dbname="EARecords",profModel="miniPP_CM",
histNodes="Physics")
## Standard initialization methods.
loadManifest(eng,netman)
eng$setHistNodes("Physics")
configStats(eng,stattab)
setupDefaultSR(eng)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.