Description Usage Arguments Details Value Author(s) References See Also Examples
ndlCrossvalidate
undertakes a crossvalidation of a Naive
Discriminative Learning model fitted using ndlClassify
.
1 |
formula |
An object of class |
data |
A data frame (as in |
frequency |
A numeric vector (or the name of a column in the input data frame) with the frequencies of the exemplars. If absent, each exemplar is assigned a frequency equal to 1. |
k |
The number of folds, by default equal to 10. |
folds |
A list of user-defined folds, each item on the list representing a
vector of indices indicating lines in the data frame to be used
for testing a model fitted with the rest of the data. By default
|
... |
Control arguments to be passed along to auxiliary functions, in specific
|
Crossvalidation of a Naive Discriminative Learning model.
A list of the class "ndlCrossvalidate"
with the following components:
call
The call matched by ndlCrossvalidate
formula
The formula specified for ndlCrossvalidate
fits
A list of individual fits resulting from ndlCrossvalidate
k
The number of folds, by default equal to 10
n.total
The sum frequency of data points
n.train
The size of the training set
n.test
The size of of the testing set
folds
A list with the folds used in the crossvalidation;
either selected at random by ndlCrossvalidate
or provided by
the user.
Antti Arppe
Baayen, R. H. and Milin, P. and Filipovic Durdevic, D. and Hendrix, P. and Marelli, M., An amorphous model for morphological processing in visual comprehension based on naive discriminative learning. Psychological Review, 118, 438-482.
Arppe, A. and Baayen, R. H. (in prep.). Statistical modeling and the principles of human learning.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | data(think)
set.seed(314)
think <- think[sample(1:nrow(think),500),]
think.cv5 <- ndlCrossvalidate(Lexeme ~ Agent + Patient, data=think, k=5)
summary(think.cv5)
rm(think)
## Not run:
data(think)
think.cv10 <- ndlCrossvalidate(Lexeme ~ Person + Number + Agent + Patient + Register,
data=think, k=10)
summary(think.cv10)
## End(Not run)
## Not run:
library(languageR)
data(finalDevoicing)
finDev.cv10 <- ndlCrossvalidate(Voice ~ Onset1Type + Onset2Type + VowelType *
ConsonantType * Obstruent + Nsyll + Stress, data=finalDevoicing, k=10)
summary(finDev.cv10)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.