Class ModelUtil


  • public final class ModelUtil
    extends Object
    Utility class for handling of MaxentModels.
    • Method Detail

      • validateOutcomes

        public static boolean validateOutcomes​(MaxentModel model,
                                               String... expectedOutcomes)
        Checks if the expected outcomes are all contained as outcomes in the given model.
        Parameters:
        model -
        expectedOutcomes -
        Returns:
        true if all expected outcomes are the only outcomes of the model.
      • read

        public static byte[] read​(InputStream in)
                           throws IOException
        Writes the provided InputStream into a byte array which is returned
        Parameters:
        in - stream to read data for the byte array from
        Returns:
        byte array with the contents of the stream
        Throws:
        IOException - if an exception is thrown while reading from the provided InputStream
      • addCutoffAndIterations

        public static void addCutoffAndIterations​(Map<String,​String> manifestInfoEntries,
                                                  int cutoff,
                                                  int iterations)
      • createDefaultTrainingParameters

        public static TrainingParameters createDefaultTrainingParameters()
        Creates the default training parameters in case they are not provided. Note: Do not use this method, internal use only!
        Returns:
        training parameters instance