exponentialMSE | R Documentation |
This function is part of a set of functions to fit and evaluate an exponential function to describe a series of reach deviations.
exponentialMSE(
par,
signal,
timepoints = c(0:(length(signal) - 1)),
mode = "learning",
setN0 = NULL
)
par |
A named numeric vector with the model parameters (see exponentialModel). |
signal |
A numeric vector of length N with reach deviations matching the perturbation schedule. |
timepoints |
Either an integer with the number of trials (N) or a vector with N trial numbers (this can have missing values or fractions). The exponential will be evaluated at those timepoints. |
mode |
String: "learning" or "washout", sets the function's direction. |
setN0 |
NULL or number, if the asymptote is known, it can be set here. |
The 'par' argument is a named numeric vector that should have the following element: - lambda: the learning rate - N0: the asymptote
A float: the mean squared error between the total model output and the reach deviations.
data(tworatedata)
learning <- rowMeans(tworatedata[which(tworatedata$block == 2),c(4:20)], na.rm=TRUE)
exponentialMSE(par=c('lambda'=0.2, 'N0'=25), signal=learning)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.