dist/multilabel/PassiveAggressiveHash.js
function(dataset) {
		// preprocessing: add all the classes in the dataset to the weights vector;
		dataset.forEach(function(datum) {
			this.addClasses(datum.output);
			this.editFeatureValues(datum.input, /*remove_unknown_features=*/false);
		}, this);

		for (var i=0; i<this.retrain_count; ++i)
			dataset.forEach(function(datum) {
				this.update(datum.input, datum.output);
			}, this);
	}
function(dataset) {
		// preprocessing: add all the classes in the dataset to the weights vector;
		dataset.forEach(function(datum) {
			this.addClasses(datum.output);
			this.editFeatureValues(datum.input, /*remove_unknown_features=*/false);
		}, this);

		for (var i=0; i<this.retrain_count; ++i)
			dataset.forEach(function(datum) {
				this.update(datum.input, datum.output);
			}, this);
	}
Train the classifier with all the given documents.

@param dataset
an array with objects of the format:
{input: sample1, output: [class11, class12...]}