uniCycle: unicycle

Description Usage Arguments Details Value See Also Examples

Description

Divides a mapping, of any sort (bounded, semi-bounded, or unbounded) into a finite number of distinct regions, by creating 'references' inside the space. Functionally, unicycle simply divides a vector of stimuli into A list of vectors of values based on their proportional distances between two references. Usually, these are then fed into a psi function which creates a unbounded space containing multiple infinite unbounded regions which are conceptually adjacent.

Usage

1
uniCycle(stimuli, references = c(0))

Arguments

stimuli

a vector of stimuli, between -inf and inf, or a list of vectors of stimuli

references

A vector of values. This should include -Inf and Inf, but these are implicitly added if they are omitted

Details

Unicycling is a simplification of multicycling. Unicycling (and its inverse), like multicycling,

For instance, a spatial region |—————-| might be divided into three regions |=======||——–||=========| Where the central |——–| region is turned into a preLec function, and the regions outside are 'no op' regions, in whihc no predictions can be made, and no probability density is placed (or, to keep things from underflowying, very very little). with a command like -10:10

Value

A vector containing warped stimuli, or a list of vectors

See Also

psiIdentity, multiCycle

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
uniCycle(-99:100, c(-100, 0, 100))
(-99:100/100) %>% multiCycle(references= c(-1, 0, 1)) %>% 
    psiLogOdds() %>% vanillaBayes() %>% 
    psiLogOddsInverse() %>% multiCycleInverse(references=c(-1, 0, 1)) 
    # Implements Landy et al's model of one-dimensional spatial memory, with fixed boundaries
plot(-99:100, unlist(multiCycle(-99:100, c(-100, -50, 0, 50, 100))))
plot(-99:100/100, (-99:100/100) %>% multiCycle(references= c(-1, 0, 1)) %>% 
    psiLogOdds() %>% vanillaBayes(kappa=c(-.8, .8)) %>% 
    psiLogOddsInverse() %>%
     uniCycleInverse(references=c(-1, 0, 1))-(-99:100/100),
          ylab="bias", xlab="stimulus");abline(0,0)

dlandy/WarpedBayes documentation built on May 29, 2019, 2:49 p.m.