mafc_test: Evaluate m-alternative forced choice test

View source: R/evaluation.R

mafc_testR Documentation

Evaluate m-alternative forced choice test

Description

Scores a set of test trials against a model's word-object matrix, returning the probability of choosing the correct object on each trial. Each trial presents one word and a set of candidate referents; the correct object is the one whose id matches the word's id (the package's diagonal convention). A thin wrapper over predict_referent().

Usage

mafc_test(m, test, ...)

Arguments

m

A matrix representing model memory with words as rows and referents as columns.

test

A list representing the test trials, each containing a word and its associated referents.

...

Further arguments passed to predict_referent() (e.g. pragmatic, threshold).

Value

A vector with the probability of choosing the correct object, given each word.

Examples

dat <- xsl_datasets[[10]]
x <- xsl_run(baseline(), dat)
mat <- x$fits[[1]]$matrix
mafc_test(mat, dat$test)

XSLmodels documentation built on Oct. 18, 2026, 5:08 p.m.