Class TrainingDetails

java.lang.Object
org.tribuo.interop.modelcard.TrainingDetails

public final class TrainingDetails extends Object
TrainingDetails section of a ModelCard.
  • Constructor Details

    • TrainingDetails

      public TrainingDetails(Model<?> model)
      Creates an instance of TrainingDetails.
      Parameters:
      model - The trained Model for which a TrainingDetails will be built.
    • TrainingDetails

      public TrainingDetails(com.fasterxml.jackson.databind.JsonNode trainingDetailsJson) throws com.fasterxml.jackson.core.JsonProcessingException
      Creates an instance of TrainingDetails.
      Parameters:
      trainingDetailsJson - The Json content corresponding to a serialized TrainingDetails that will be used to recreate a new instance of a TrainingDetails.
      Throws:
      com.fasterxml.jackson.core.JsonProcessingException - if a problem is encountered when processing Json content.
  • Method Details

    • getSchemaVersion

      public String getSchemaVersion()
      Gets the schema version of the TrainingDetails object.
      Returns:
      A string specifying the schema version of the TrainingDetails object.
    • getTrainingTime

      public String getTrainingTime()
      Gets the training time of the TrainingDetails object.
      Returns:
      A string specifying the training time of the TrainingDetails object.
    • getTrainingSetSize

      public int getTrainingSetSize()
      Gets the training set size of the TrainingDetails object.
      Returns:
      An int specifying the training set size of the TrainingDetails object.
    • getNumFeatures

      public int getNumFeatures()
      Gets the number of features in the training set of the TrainingDetails object.
      Returns:
      An int specifying the number of features of the TrainingDetails object.
    • getFeatures

      public List<String> getFeatures()
      Gets the list of features of the TrainingDetails object.
      Returns:
      An unmodifiable list of the features of the TrainingDetails object.
    • getNumOutputs

      public int getNumOutputs()
      Gets the number of outputs in the training set of the TrainingDetails object.
      Returns:
      An int specifying the number of outputs of the TrainingDetails object.
    • getOutputsDistribution

      public Map<String,Long> getOutputsDistribution()
      Gets the distribution of the outputs of the TrainingDetails object.
      Returns:
      An unmodifiable map of the distribution of the outputs for the TrainingDetails object.
    • toJson

      public com.fasterxml.jackson.databind.node.ObjectNode toJson()
      Creates a Json object corresponding this TrainingDetails instance.
      Returns:
      The ObjectNode corresponding to this TrainingDetails instance.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object