summaryrefslogtreecommitdiff
path: root/src/README.md
blob: 5d0dcb0b46aa034493ba87dd23a80dde7c43dc82 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# public api
## benchmark.c

The public API for running crossbar simulation, calculating performance metrics,
and generating plots.

* **MemModel struct**
    * This is a struct for making model swapping easier
    * members
        * const char *model_path
        * const char *subcircuit_name

* **run_benchmark() (int)**
    * Executes the full crossbar simulation pipeline and stores the decoded
    crossbar predictions in the passed output array.
    * parameters
        * const spires_reservoir_config *config
        * spires_reservoir *reservoir
        * Reservoir_State_Matrix *state_matrix
        * const char *model_path
        * const char *subcircuit_name
        * double *predictions_out

* **calculate_MSE() (double)**
    * calculates the mean squared error of the predictions against the expected
    values
    * parameters
        * const double *expected
        * const double *predicted
        * const size_t *num_steps
        * const size_t num_outputs

* **plot_raster() (int)**
    * generates a raster plot of the reservoir based on the spike threshhold parameter
    (not that useful tbh but can be cool to see), plot stored as svg in output directory
    * parameters
        * const Reservoir_State_Matrix *matrix
        * const size_t neurons_to_plot
        * const double spike_threshold

* **plot_reservoir_predictions() (int)** 
    * plots the decoded crossbar predictions against the expected values, plot stored
    as svg in output directory with name "reservoir_prediction_$(model_name).svg"
    * parameters
        * const double *expected
        * const double *predicted
        * size_t num_samples
        * size_t num_outputs
        * size_t output_to_plot
        * const char *model_path

* **plot_model_delta() (int)**
    * plots the prediction differences for every timestep between the given model
    and the fixed resistor baseline
    * parameters
        * const double *fixed
        * const double *model
        * const size_t num_samples
        * const size_t num_outputs
        * const size_t output_to_plot

# Internal header files