constructor() {
        // The weights, or coefficients of the model;
        // weights are only populated when training with data.
        this.weights = [];
        // The bias term, or intercept; it is also a weight but
        // it's stored separately for convenience as it is always
        // multiplied by one.
        this.bias = 0;
    }
This is a single-layer [Perceptron Classifier](http://en.wikipedia.org/wiki/Perceptron) that takes
arrays of numbers and predicts whether they should be classified
as either 0 or 1 (negative or positive examples).
@class
@example
// Create the model
var p = new PerceptronModel();
// Train the model with input with a diagonal boundary.
for (var i = 0; i < 5; i++) {
    p.train([1, 1], 1);
    p.train([0, 1], 0);
    p.train([1, 0], 0);
    p.train([0, 0], 0);
}
p.predict([0, 0]); // 0
p.predict([0, 1]); // 0
p.predict([1, 0]); // 0
p.predict([1, 1]); // 1