public class Bag<T> extends Object
public Bag(T[] features)
features
- the list of feature objects.public Bag(T[] features, boolean binary)
features
- the list of feature objects. The feature objects should be unique in the list.
Note that the Bag class doesn't learn the features, but just use them as attributes.binary
- true to check if feature object appear in a collection
instead of their frequencies.public double[] feature(T[] x)
Copyright © 2015. All rights reserved.