learn: Learn the most probable context for a given data

Description Usage Arguments Value Author(s) Examples

Description

Learn the most probable context for a given data

Usage

1
learn(model, data)

Arguments

model

a character string indicates which model governs the learning process.

data

a list contains data that needs to be synthesized, first component is the response matrix, the other components are additional information that the specified model requires.

Value

the most probable context corresponds to data under the assumptions made by model

Author(s)

Hoang-Trieu Trinh, thtrieu@apcs.vn

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
# Let us make up some data to learn
p <- pars(students = 20, concepts = 4, items = 15)
poks.data <- gen("poks", p)
# Notice that the generated data is in component poks,
# together with other hyper-parameters for learning by POKS model.
poks.data$poks
# Assume we want to learn with DINA (Deterministic Input Noisy And) model
# then poks.data$poks is not relevant anymore, instead we need a Q-matrix
# For demonstration, let's just make it up
Q <- get.par("Q", p)$value
R <- poks.data$poks$R
dina_dat <- list(R=R, Q=Q)
# Now learn from poks.data
learned.poks <- learn("dina", data = dina_dat)
# learned.poks is a context with learned parameters
class(learned.poks) # returns "context"

thtrieu/edmsyn documentation built on May 31, 2019, 11:18 a.m.