Skip to content

Latest commit

 

History

History
29 lines (21 loc) · 462 Bytes

README.md

File metadata and controls

29 lines (21 loc) · 462 Bytes

A general purpose perceptron library.

Usage

// Make an object
let perceptron = new Perceptron();

// Predict
let prediction = perceptron.predict(features);

// Get loss/error.
let loss = perceptron.getLoss(label, prediction);

// If has error/loss.
if(loss)
{
   // Train
   perceptron.train(features, loss);
}

Examples

Classification

``