Package org.tribuo.dataset
Class DatasetView.DatasetViewProvenance
java.lang.Object
org.tribuo.provenance.DatasetProvenance
org.tribuo.dataset.DatasetView.DatasetViewProvenance
- 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>> DataProvenance
- Enclosing class:
- DatasetView<T extends Output<T>>
Provenance for the
DatasetView
.- See Also:
-
Field Summary
Fields inherited from interface com.oracle.labs.mlrg.olcut.provenance.ObjectProvenance
CLASS_NAME, DEFAULT_HASH_TYPE
-
Constructor Summary
ConstructorDescriptionDatasetViewProvenance
(Map<String, com.oracle.labs.mlrg.olcut.provenance.Provenance> map) Deserialization constructor. -
Method Summary
Modifier and TypeMethodDescriptionprotected List<com.oracle.labs.mlrg.olcut.util.Pair<String,
com.oracle.labs.mlrg.olcut.provenance.Provenance>> Returns a list of all the provenances.boolean
int[]
Generates the indices from this DatasetViewProvenance by rerunning the bootstrap sample.int
hashCode()
boolean
Is this view from a bootstrap sample.boolean
Is this view a weighted bootstrap sample.toString()
This toString doesn't put the indices in the string, as it's likely to be huge.Methods inherited from class org.tribuo.provenance.DatasetProvenance
getClassName, getNumExamples, getNumFeatures, getNumOutputs, getSourceProvenance, getTransformationProvenance, getTribuoVersion, isDense, isSequence, 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
-
Constructor Details
-
DatasetViewProvenance
Deserialization constructor.- Parameters:
map
- The provenances.
-
-
Method Details
-
generateBootstrap
public int[] generateBootstrap()Generates the indices from this DatasetViewProvenance by rerunning the bootstrap sample. Note these indices are invalid if the view is a weighted sample, or not sampled.- Returns:
- The bootstrap indices.
-
isSampled
public boolean isSampled()Is this view from a bootstrap sample.- Returns:
- True if it's a bootstrap sample.
-
isWeighted
public boolean isWeighted()Is this view a weighted bootstrap sample.- Returns:
- True if it's a weighted bootstrap sample.
-
equals
- Overrides:
equals
in classDatasetProvenance
-
hashCode
public int hashCode()- Overrides:
hashCode
in classDatasetProvenance
-
allProvenances
protected List<com.oracle.labs.mlrg.olcut.util.Pair<String,com.oracle.labs.mlrg.olcut.provenance.Provenance>> allProvenances()Description copied from class:DatasetProvenance
Returns a list of all the provenances.- Overrides:
allProvenances
in classDatasetProvenance
- Returns:
- The provenances.
-
toString
This toString doesn't put the indices in the string, as it's likely to be huge.- Overrides:
toString
in classDatasetProvenance
- Returns:
- A string describing this provenance.
-