public final class ModelUtil
extends java.lang.Object
MaxentModel
s.Modifier and Type | Method and Description |
---|---|
static void |
addCutoffAndIterations(java.util.Map<java.lang.String,java.lang.String> manifestInfoEntries,
int cutoff,
int iterations) |
static TrainingParameters |
createDefaultTrainingParameters()
Creates the default training parameters in case they are not provided.
|
static byte[] |
read(java.io.InputStream in)
Writes the provided
InputStream into a byte array
which is returned |
static boolean |
validateOutcomes(MaxentModel model,
java.lang.String... expectedOutcomes)
Checks if the expected outcomes are all contained as outcomes in the given model.
|
static void |
writeModel(MaxentModel model,
java.io.OutputStream out)
Writes the given model to the given
OutputStream . |
public static void writeModel(MaxentModel model, java.io.OutputStream out) throws java.io.IOException, java.lang.IllegalArgumentException
OutputStream
.
This methods does not closes the provided stream.model
- the model to be writtenout
- the stream the model should be written tojava.io.IOException
java.lang.IllegalArgumentException
- in case one of the parameters is nullpublic static boolean validateOutcomes(MaxentModel model, java.lang.String... expectedOutcomes)
model
- expectedOutcomes
- public static byte[] read(java.io.InputStream in) throws java.io.IOException
InputStream
into a byte array
which is returnedin
- stream to read data for the byte array fromjava.io.IOException
- if an exception is thrown while reading
from the provided InputStream
public static void addCutoffAndIterations(java.util.Map<java.lang.String,java.lang.String> manifestInfoEntries, int cutoff, int iterations)
public static TrainingParameters createDefaultTrainingParameters()
Copyright © 2010 - 2020 Adobe. All Rights Reserved