Given a sequence of feature observations (a feature and its magnitude), combine multiple instances of the same feature, and then sort the result.
Given a sequence of feature observations (a feature and its magnitude), combine multiple instances of the same feature, and then sort the result.
E.g. Seq[("foo",1.0),("bar",1.0),("foo",2.0)] becomes Seq[("bar",1.0),("foo",3.0)]
Convert examples stored in CSV format (one per line) into a sequence of Examples.
Convert examples that are stored as files in directories, where each directory name acts as the label for all the files it contains.
Convert examples that are stored as files in directories, where each directory name acts as the label for all the files it contains. (E.g. the 20 News Groups data.)
Read a classifier from disk by using Java deserialization.
Read a classifier from the classpath using Java deserialization.
Given the labels and scores that have been produced for each, return the label with the highest score.
Save a classifier to disk by using Java serialization.
Trains a classifier given indexed examples and the label and feature maps produced by indexation.
Trains a classifier given examples and featurizer.
Trains a classifier given examples and featurizer. Handles indexation of features, and creates a classifier that can be applied directly to new raw observations.
This is the easiest way to build and use a classifier.
Trains a classifier given examples and featurizer.
Trains a classifier given examples and featurizer. Uses the hashing trick for indexing features, and creates a classifier that can be applied directly to new raw observations.
This is the easiest way to build and use a classifier that uses the hashing trick. For more details on the hashing trick, see: http://hunch.net/~jl/projects/hash_reps/index.html
Trains a liblinear model given indexed examples.
Trains a liblinear model given indexed examples. Note: a model is basically just the parameters. The classifiers returned by trainClassifier methods wrap the parameters into a number of convenience methods that makes it easier to use the model.
An object that provides common functions needed for using Nak.