ndlClassify {ndl}R Documentation

Classification using naive discriminative learning.

Description

ndlClassify uses the equilibrium equations of Danks (2003) for the Rescorla-Wagner model (1972) to estimate association strengths (weights) for cues (typically levels of factorial predictors) to outcomes (typically a binary or polytomous response variable). Given the association strengths, the probability of a response level is obtained by summation over the weights on active incoming links.

Usage

ndlClassify(formula, data, frequency=NA, variable.value.separator="", ...)

## S3 method for class 'ndlClassify'
print(x, max.print=10, ...)

Arguments

formula

An object of class formula (or one that can be coerced to that class): a symbolic description of the model to be fitted.

data

A data frame containing the variables in the model.

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.

x

An object of the class "ndlClassify" fitted with ndlClassify to be printed with print.ndlClassify.

max.print

The maximum number of rows of the weightMatrix to be output when printing with print.ndlClassify; by default equal to 10; if set to NA all rows will be output.

variable.value.separator

A character string which will separate variable names from variable values in their combination as cue values; by default an empty character string (="").

...

Control arguments to be passed along to ndlCuesOutcomes, estimateWeights, estimateActivations, and/or print.ndlClassify.

Details

Classification by naive discriminative learning.

Value

A list of the class "ndlClassify" with the following components:

activationMatrix

A matrix specifying for each row of the input data frame the activations (probabilities) of the levels of the response variable (nrow observations by nlevels of response variable).

weightMatrix

A matrix specifying for each cue (predictor value) the association strength (weight) to each outcome (level of the response variable) (number of distinct predictor values by number of response levels).

cuesOutcomes

The input data structure for naive discriminative learning created by ndlCuesOutcomes based on the data argument (number of observations by 3: Frequency, Cues, Outcomes).

call

The call matched to fit the resulting "ndlClassify" object.

formula

The formula specified for fitting the resulting "ndlClassify" object.

data

The supplied data argument, excluding all elements not specified for the modeling task in formula and frequency.

Author(s)

R. H. Baayen and Antti Arppe

References

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.

Danks, D. (2003). Equilibria of the Rescorla-Wagner model. Journal of Mathematical Psychology, 47 (2), 109-121.

Rescorla, R. A., & Wagner, A. R. (1972). A theory of Pavlovian conditioning: Variations in the effectiveness of reinforcement and nonreinforcement. In Black, A. H., & Prokasy, W. F. (Eds.), Classical conditioning II: Current research and theory (pp. 64-99). New York: Appleton-Century-Crofts.

Arppe, A. and Baayen, R. H. (in prep.) Statistical classification and principles of human learning.

See Also

summary.ndlClassify, plot.ndlClassify, anova.ndlClassify, predict.ndlClassify, ndlCuesOutcomes, estimateWeights, cueCoding

Examples

data(think)
set.seed(314)
think <- think[sample(1:nrow(think),500),]
think.ndl <- ndlClassify(Lexeme ~ (Person * Number * Agent) + Register,
   data=think)
summary(think.ndl)

## Not run: 
think.ndl.SA <- ndlClassify(Lexeme ~ (Polarity + Voice + Mood + Person +
  Number + Covert + ClauseEquivalent + Agent + Patient + Manner + Time +
  Modality1 + Modality2 + Source + Goal + Quantity + Location +
  Duration + Frequency + MetaComment + ReasonPurpose + Condition +
  CoordinatedVerb)^2 + Author + Section, data=think)
summary(think.ndl.SA)

## End(Not run)

## Not run: 
data(dative)
out <- which(is.element(colnames(dative), c("Speaker","Verb")))
dative <- dative[-out]
dative.ndl <- ndlClassify(RealizationOfRecipient ~ ., data=dative)
summary(dative.ndl)


## End(Not run)

[Package ndl version 0.2.18 Index]