Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

convertSUSTAIN

Convert nominal-dimension input representation into a 'padded' (slpSUSTAIN) format


Description

Changes a nominal-dimension input representation (e.g. 3 1 2) into a padded representation (e.g. 001 100 010). This form out input representation is required by e.g. slpSUSTAIN.

Usage

convertSUSTAIN(input, dims)

Arguments

input

A matrix containing the nominal-dimension input representation. Each row is a trial and each column is a stimulus dimension.

dims

A vector of the number of nominal values for each dimension. For example, if there are three dimensions with three, one and two possible values, then dims = c(3, 1, 2).

Value

Returns a matrix containing the padded input representation.

Author(s)

Lenard Dome, Andy Wills

See Also

Examples

## Create a dummy training matrix with two dimensions. The first
## two dimensions have two possible nominal values, while the
## third and fourth have three possible nominal values.

dummy <- cbind(matrix(sample(1:2, 20, replace=TRUE), ncol = 2),
               matrix(sample(1:3, 20, replace=TRUE), ncol = 2))

## Specify the number of nominal spaces for each dimension
dims <- c(2, 2, 3, 3)

## Convert the input representation into a binary padded representation
convertSUSTAIN(dummy, dims)

catlearn

Formal Psychological Models of Categorization and Learning

v0.8
GPL (>= 2)
Authors
Andy Wills, Lenard Dome, Charlotte Edmunds, Garrett Honke, Angus Inkster, René Schlegelmilch, Stuart Spicer
Initial release
2020-09-16

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.