backpropagation(features, labels, probabilities) {
            for (var i = 0; i < probabilities.length; ++i) {
                probabilities[i][this.dicts.inputs[labels[i]]] -= 1;
            }

            // remember, the last delta doesn't matter
            var delta = probabilities;
            for (i = this.model.length - 1; i >= 0; --i) {
                var a = i > 0 ? this.model[i - 1].a : features;
                delta = this.model[i].backpropagation(delta, a);
            }

            for (i = 0; i < this.model.length; ++i) {
                this.model[i].update();
            }
        }
@private
Function that applies the backpropagation algorithm on each layer of the network
in order to fit the features and labels.
@param {Matrix} features
@param {Array} labels
@param {Matrix} probabilities - probabilities of each class of the feature set.