การทดสอบ Perceptron
- Perceptron จะต้องได้รับการทดสอบและประเมิน ผล
- Perceptron จะต้องผ่านการทดสอบกับค่าจริง
ทดสอบห้องสมุดของคุณ
สร้างจุดที่ไม่รู้จักใหม่และตรวจสอบว่า Perceptron ของคุณสามารถเดาคำตอบที่ถูกต้องได้หรือไม่:
ตัวอย่าง
// 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);
}
นับข้อผิดพลาด
เพิ่มตัวนับเพื่อนับจำนวนข้อผิดพลาด:
ตัวอย่าง
// 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) {errors++}
}
ปรับแต่ง Perceptron
คุณจะปรับแต่ง Perceptron ได้อย่างไร?
นี่คือคำแนะนำบางส่วน:
- ปรับอัตราการเรียนรู้
- เพิ่มจำนวนข้อมูลการฝึก
- เพิ่มจำนวนการฝึกซ้ำ