run_stochastic_model: Run Stochastic Model on Provided Conditions

View source: R/fitting.R

run_stochastic_modelR Documentation

Run Stochastic Model on Provided Conditions

Description

This function runs a stochastic version of the specified word learning model on a set of provided conditions. It simulates the model multiple times and aggregates the results. The function can return either a response matrix, model performance, or sum of squared errors (SSE).

Usage

run_stochastic_model(
  conds,
  model_name,
  parameters,
  SSE_only = F,
  print_perf = F,
  get_resp_matrix = F,
  Nsim = 500
)

Arguments

conds

A list representing the conditions under which the model is run. This could include training and testing data, along with human item accuracy (HumanItemAcc).

model_name

A string specifying the name of the stochastic model to run.

parameters

A list of parameters to be used by the stochastic model.

SSE_only

Logical; if TRUE, only the SSE will be returned.

print_perf

Logical; if TRUE, model performance and SSE will be printed.

get_resp_matrix

Logical; if TRUE, the function returns the response matrix instead of the standard performance metrics.

Nsim

Integer; the number of simulations to run for the stochastic model.

Value

Depending on the parameters, the function can return different types of outputs:

  • If get_resp_matrix is TRUE, it returns a response matrix aggregated over all simulations.

  • If SSE_only is TRUE, it returns only the SSE.

  • Otherwise, it returns a list containing model performance across conditions and the SSE.


kachergis/XSLmodels documentation built on Feb. 25, 2024, 10:43 p.m.