BNEngineNDB: Creates a Bayes net engine not attached to a database.

BNEngineNDBR Documentation

Creates a Bayes net engine not attached to a database.

Description

The BNEngineNDB is a BNEngine which is not attached to the database. In particular, it cannot store student records, so it cannot maintain state between scoring sessions without extenal help.

Usage

newBNEngineNDB(app = "default", warehouse, listenerSet = NULL,
  manifest = data.frame(), processN = Inf, waittime = 0.25,
  profModel = character(), statmat = data.frame(),
  evidenceQueue = new("ListQueue",app, list()),
  activeTest = "EAActive",
  errorRestart=c("checkNoScore","stopProcessing","scoreAvailable"),
  srs =StudentRecordSet(app=app,warehouse=warehouse, db=MongoDB(noMongo=TRUE)),
  ...)

Arguments

app

A character scalar giving the globally unique identifier for the application.

warehouse

A PnetWarehouse which stores the default student model and evidence models. (It will also store the student models.

listenerSet

A ListenerSet which contains the listeners for clients of the engine's messages.

manifest

A data frame providing a manifest for the PnetWarehouse.

processN

The number of records to process before stopping. The default value Inf runs the process until the active flag is cleared.

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).

statmat

A data.frame describing the statistics. See configStats.

evidenceQueue

A object of class MessageQueue-class containing evidence sets to be processed.

activeTest

The pathname for the file whose existance will be used to determine when the engine should shut down.

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.

srs

A StudentRecordSet object used to manage student records.

...

Extra arguments are ignored. This allows arguments for other engine versions to be set in the parameters and ignored.

Details

This creates an uninitialized BNEngine, specifically a BNEngineNDB.

Value

An object of calls BNEngineNDB which is capable of scoring student models.

Author(s)

Russell Almond

References

Almond, Mislevy, Steinberg, Yan and Williamson (2015). Bayesian Networks in Educational Assessment. Springer. Especially Chapter 13.

See Also

Classes: BNEngine, BNEngineMongo

Constituent parts: StudentRecordSet, PnetWarehouse ListenerSet

Setup Functions: loadManifest, setupDefaultSR, configStats, baselineHist,

Main Loop Functions: mainLoop, accumulateEvidence, handleEvidence, getRecordForUser, logEvidence, updateSM, updateStats, updateHist, announceStats,

Examples



## Requires database setup, also PNetica
library(RNetica)  ## Must load to setup Netica DLL
appid <- "ecd://epls.coe.fsu.edu/EITest"
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[",appid,"]"),
                  listeners=listeners)

eng <- newBNEngineNDB(app=appid,warehouse=Nethouse,
                     listenerSet=ls,manifest=netman,
                     profModel="miniPP_CM",
                     histNodes="Physics",
                     statmat=stattab,
                     activeTest="EAActive.txt")

## Standard initialization methods.
loadManifest(eng,netman)
eng$setHistNodes("Physics")
configStats(eng,stattab)
setupDefaultSR(eng)




ralmond/EABN documentation built on Aug. 30, 2023, 12:52 p.m.