public final class ModelUtil extends Object
MaxentModels.| Modifier and Type | Method and Description |
|---|---|
static void |
addCutoffAndIterations(Map<String,String> manifestInfoEntries,
int cutoff,
int iterations) |
static TrainingParameters |
createTrainingParameters(int iterations,
int cutoff)
Note: Do not use this legacy support method, internal use only!
|
static byte[] |
read(InputStream in)
Writes the provided
InputStream into a byte array
which is returned |
static boolean |
validateOutcomes(MaxentModel model,
String... expectedOutcomes)
Checks if the expected outcomes are all contained as outcomes in the given model.
|
static void |
writeModel(AbstractModel model,
OutputStream out)
Writes the given model to the given
OutputStream. |
public static void writeModel(AbstractModel model, OutputStream out) throws IOException
OutputStream.
This methods does not closes the provided stream.model - the model to be writtenout - the stream the model should be written toIOException{@link - IllegalArgumentException} in case one of the parameters is nullpublic static boolean validateOutcomes(MaxentModel model, String... expectedOutcomes)
model - expectedOutcomes - public static byte[] read(InputStream in) throws IOException
InputStream into a byte array
which is returnedin - stream to read data for the byte array fromIOException - if an exception is thrown while reading
from the provided InputStreampublic static void addCutoffAndIterations(Map<String,String> manifestInfoEntries, int cutoff, int iterations)
public static TrainingParameters createTrainingParameters(int iterations, int cutoff)
iterations - number of iterationscutoff - cutoff thresholdCopyright © 2016 The Apache Software Foundation. All rights reserved.