Learn R Programming

passt (version 0.1.3)

run_sim: Run simulations

Description

Runs several simulations and returns output activation for each simulation and each input pattern

Usage

run_sim(
  patterns,
  frequency,
  duration,
  lrate_onset,
  lrate_drop_time,
  lrate_drop_perc,
  n_runs = 100,
  n_output_units = ncol(patterns),
  pulses_per_second = 1
)

Arguments

patterns

matrix with input patterns, one row is one pattern

frequency

presentation frequency for each pattern in the matrix

duration

presentation duration for each pattern in the matrix

lrate_onset

learning rate at the onset of a stimulus

lrate_drop_time

point at which the learning rate drops, must be lower than duration

lrate_drop_perc

how much the learning rate drops at lrate_drop_time

n_runs

number of simulations to be run, default is 100

n_output_units

number of output units, defaults to number of input units

pulses_per_second

how many time steps should be simulated per second

Value

list with following elements

  • output: the sum of the activation strengths of the output units for each input pattern

  • weight_matrix: final weight_matrix

  • pres_matrix: presentation matrix

See Also

run_exp

Examples

Run this code
# NOT RUN {
run_sim(diag(10), 1:10, 10:1, 0.05, 2, 0.2)
# }

Run the code above in your browser using DataLab