Package org.tribuo.provenance
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>>
Model provenance for ensemble models.
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionprotected static final String
The name of the provenance field where the member provenances are stored.Fields inherited from class org.tribuo.provenance.ModelProvenance
ARCH_STRING, archString, className, DATASET, datasetProvenance, INSTANCE_VALUES, instanceProvenance, JAVA_VERSION_STRING, javaVersionString, OS_STRING, osString, time, TRAINER, trainerProvenance, TRAINING_TIME, TRIBUO_VERSION_STRING, UNKNOWN_VERSION, versionString
Fields inherited from interface com.oracle.labs.mlrg.olcut.provenance.ObjectProvenance
CLASS_NAME, DEFAULT_HASH_TYPE
-
Constructor Summary
ConstructorDescriptionEnsembleModelProvenance
(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.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.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.EnsembleModelProvenance
(Map<String, com.oracle.labs.mlrg.olcut.provenance.Provenance> map) Used by the provenance unmarshalling system. -
Method Summary
Modifier and TypeMethodDescriptionboolean
com.oracle.labs.mlrg.olcut.provenance.ListProvenance<? extends ModelProvenance>
Get the provenances for each ensemble member.int
hashCode()
protected List<com.oracle.labs.mlrg.olcut.util.Pair<String,
com.oracle.labs.mlrg.olcut.provenance.Provenance>> Returns a list of all the provenances in this model provenance so subclasses can append to the list.toString()
Methods inherited from class org.tribuo.provenance.ModelProvenance
getArch, getClassName, getDatasetProvenance, getInstanceProvenance, getJavaVersion, getOS, getTrainerProvenance, getTrainingTime, getTribuoVersion, iterator
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
Methods inherited from interface com.oracle.labs.mlrg.olcut.provenance.ObjectProvenance
generateString
-
Field Details
-
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
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
- Overrides:
equals
in classModelProvenance
-
hashCode
public int hashCode()- Overrides:
hashCode
in classModelProvenance
-
toString
- Overrides:
toString
in classModelProvenance
-
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 classModelProvenance
- Returns:
- A list of all the provenances in this class.
-