public class Model extends Object implements Serializable
Modifier and Type | Method and Description |
---|---|
void |
addFeature(Feature f,
double weight) |
boolean |
containsFeature(Feature feature) |
List<Feature> |
getFeatures() |
double |
getMaxWeight() |
int |
getNumFeatures() |
List<Double> |
getWeights() |
static Model |
readFromFile(String modelFile) |
String |
toString() |
void |
write(String modelFile) |
public Model()
public Model(Model model)
public void addFeature(Feature f, double weight)
public boolean containsFeature(Feature feature)
public double getMaxWeight()
public int getNumFeatures()
public static Model readFromFile(String modelFile) throws FileNotFoundException, IOException, ClassNotFoundException
public void write(String modelFile) throws FileNotFoundException, IOException
FileNotFoundException
IOException