Class EnsembleModelProvenance

java.lang.Object
org.tribuo.provenance.ModelProvenance
org.tribuo.provenance.EnsembleModelProvenance
All Implemented Interfaces:
com.oracle.labs.mlrg.olcut.provenance.ObjectProvenance, com.oracle.labs.mlrg.olcut.provenance.Provenance, Serializable, Iterable<com.oracle.labs.mlrg.olcut.util.Pair<String,com.oracle.labs.mlrg.olcut.provenance.Provenance>>

public class EnsembleModelProvenance extends ModelProvenance
Model provenance for ensemble models.
See Also:
  • Field Details

    • MEMBERS

      protected static final String MEMBERS
      The name of the provenance field where the member provenances are stored.
      See Also:
  • Constructor Details

    • EnsembleModelProvenance

      public EnsembleModelProvenance(String className, OffsetDateTime time, DatasetProvenance datasetProvenance, TrainerProvenance trainerProvenance, com.oracle.labs.mlrg.olcut.provenance.ListProvenance<? extends ModelProvenance> memberProvenance)
      Creates a provenance for an ensemble model tracking the class name, creation time, dataset provenance and trainer provenance along with the individual model provenances for each ensemble member.

      Also tracks system details like the os name, os architecture, java version, and Tribuo version.

      Parameters:
      className - The model class name.
      time - The model creation time.
      datasetProvenance - The dataset provenance.
      trainerProvenance - The trainer provenance.
      memberProvenance - The ensemble member provenances.
    • EnsembleModelProvenance

      public EnsembleModelProvenance(String className, OffsetDateTime time, DatasetProvenance datasetProvenance, TrainerProvenance trainerProvenance, Map<String,com.oracle.labs.mlrg.olcut.provenance.Provenance> instanceProvenance, com.oracle.labs.mlrg.olcut.provenance.ListProvenance<? extends ModelProvenance> memberProvenance)
      Creates a provenance for an ensemble model tracking the class name, creation time, dataset provenance, trainer provenance and any instance specific provenance along with the individual model provenances for each ensemble member.

      Also tracks system details like the os name, os architecture, java version, and Tribuo version.

      Parameters:
      className - The model class name.
      time - The model creation time.
      datasetProvenance - The dataset provenance.
      trainerProvenance - The trainer provenance.
      instanceProvenance - Provenance for this specific model training run.
      memberProvenance - The ensemble member provenances.
    • EnsembleModelProvenance

      public EnsembleModelProvenance(String className, OffsetDateTime time, DatasetProvenance datasetProvenance, TrainerProvenance trainerProvenance, Map<String,com.oracle.labs.mlrg.olcut.provenance.Provenance> instanceProvenance, boolean trackSystem, com.oracle.labs.mlrg.olcut.provenance.ListProvenance<? extends ModelProvenance> memberProvenance)
      Creates a provenance for an ensemble model tracking the class name, creation time, dataset provenance, trainer provenance and any instance specific provenance along with the individual model provenances for each ensemble member.

      Also optionally tracks system details like the os name, os architecture, java version, and Tribuo version.

      Parameters:
      className - The model class name.
      time - The model creation time.
      datasetProvenance - The dataset provenance.
      trainerProvenance - The trainer provenance.
      instanceProvenance - Provenance for this specific model training run.
      memberProvenance - The ensemble member provenances.
      trackSystem - If true then store the java version, os name and os arch in the provenance.
    • EnsembleModelProvenance

      public EnsembleModelProvenance(Map<String,com.oracle.labs.mlrg.olcut.provenance.Provenance> map)
      Used by the provenance unmarshalling system.

      Throws ProvenanceException if there are missing fields.

      Parameters:
      map - The provenance map.
  • Method Details

    • getMemberProvenance

      public com.oracle.labs.mlrg.olcut.provenance.ListProvenance<? extends ModelProvenance> getMemberProvenance()
      Get the provenances for each ensemble member.
      Returns:
      The member provenances.
    • equals

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

      public int hashCode()
      Overrides:
      hashCode in class ModelProvenance
    • toString

      public String toString()
      Overrides:
      toString in class ModelProvenance
    • internalProvenances

      protected List<com.oracle.labs.mlrg.olcut.util.Pair<String,com.oracle.labs.mlrg.olcut.provenance.Provenance>> internalProvenances()
      Description copied from class: ModelProvenance
      Returns a list of all the provenances in this model provenance so subclasses can append to the list.
      Overrides:
      internalProvenances in class ModelProvenance
      Returns:
      A list of all the provenances in this class.