Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get Accuracy #1

Open
meltingCat opened this issue Nov 21, 2020 · 1 comment
Open

Get Accuracy #1

meltingCat opened this issue Nov 21, 2020 · 1 comment

Comments

@meltingCat
Copy link

@alishdipani Hi, I would like to know how to get accuracy from the result. Will the code update in the future? Thanks.

@alishdipani
Copy link
Owner

Hi @meltingCat , thanks for opening this issue. I am not sure if I would be able to update the code in near future but I can explain how to go about implementing getting accuracy:

  1. Train the network in a unsupervised manner using STDP
  2. After training the network, set the learning rate to zero and simulate the network for the training set while recording last layer neuron responses for each class.
  3. In the last layer, for each neuron, calculate how many number of times did that neuron spike for each class. Assign the neuron a class for which it spiked the most.
  4. For testing set, simulate the network with learning rate zero. For each example, record which neuron spiked the most and then assign the class of that neuron as the class of the example.
  5. Now, you have a class assigned to each example. Just calculate the accuracy as number of examples classified correctly divided by the total number of examples.

For more details refer to Section 2.6 of the paper Diehl et al.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants