summaryrefslogtreecommitdiff
path: root/src/benchmark.h
blob: 57156cc07a64bc7767dfa69ee9bf92cf554994e3 (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
#ifndef BENCHMARK_H
#define BENCHMARK_H

#include "crossbar_generator.h"
#include "read_crossbar.h"
#include "spires_interface.h"
#include <stddef.h>

typedef struct {
	const char *model_path;
	const char *subcircuit_name;
} MemModel;

int run_benchmark(const spires_reservoir_config *config,
		  spires_reservoir *reservoir,
		  Reservoir_State_Matrix *state_matrix, const char *model_path,
		  const char *subcircuit_name, double *predictions_out);

double calculate_MSE(const double *expected, const double *predicted,
		     const size_t num_steps, const size_t num_outputs);

int plot_raster(const Reservoir_State_Matrix *matrix,
		const size_t neurons_to_plot, const double spike_threshold);

int plot_reservoir_predictions(const double *expected, const double *predicted,
			       const size_t num_samples,
			       const size_t num_outputs,
			       const size_t output_to_plot,
			       const char *model_path);

int plot_model_delta(const double *fixed, const double *model,
		     const size_t num_samples, const size_t num_outputs,
		     const size_t output_to_plot, const char *model_path);

#endif