Perceptron test
Create new unknown points and test whether your perceptron can correctly predict the answer.
Table of Contents
- A perceptron needs to be inspected and evaluated.
- A perceptron needs to be tested with real values.
Check your library
Create new unknown points and test whether your perceptron can correctly predict the answer:
For example:
// Test Against Unknown Data const counter = 500; for (let i = 0; i < counter; i++) { let x = Math.random() * xMax; let y = Math.random() * yMax; let guess = ptron.activate([x, y, ptron.bias]); let color = "black"; if (guess == 0) color = "blue"; plotter.plotPoint(x, y, color); }
Error counting
Add a tool to count the number of errors:
For example:
// Test Against Unknown Data const counter = 500; let errors = 0; for (let i = 0; i < counter; i++) { let x = Math.random() * xMax; let y = Math.random() * yMax; let guess = ptron.activate([x, y, ptron.bias]); let color = "black"; if (guess == 0) color = "blue"; plotter.plotPoint(x, y, color); if ((y > f(x) && guess == 0) || (y < f(x) && guess == 1)) {errors++} }
Perceptron adjustment
How do you tune a Perceptron? Here are some suggestions:
- Adjust the learning pace.
- Increase the amount of training data.
- Increase the number of training repetitions.
You've just finished reading the article "Perceptron test" edited by the TipsMake team. You can save perceptron-test-wfkjo.pdf to your computer here to read later or print it out. We hope this article has provided you with many useful tech tips and tricks. You can search for similar articles on tips and guides. Thank you for reading and for following us regularly.