public class ReproducibleInstancesextends weka.core.Instances
LoadDataSetInstruction
and changed by FoldBasedSubsetInstruction
s saved as a list of instructions. This history of the instances can be converted to json and used to reproduce a specific set of instances.Constructor and Description |
---|
ReproducibleInstances(ReproducibleInstances dataset) |
Modifier and Type | Method and Description |
---|---|
void | addInstruction(Instruction i) Adds a new Instruction to the history of these Instances |
static ReproducibleInstances | fromARFF(java.lang.String path) Creates a new ReproducibleInstances object. |
static ReproducibleInstances | fromHistory(java.util.List<Instruction> history, java.lang.String apiKey) Creates a ReproducibleInstances Object based on the given History. |
static ReproducibleInstances | fromOpenML(java.lang.String id, java.lang.String apiKey) Creates a new ReproducibleInstances object. |
java.util.List<Instruction> | getInstructions() |
boolean | isCacheLookup() If true signifies that performance on this data should be looked up in cache |
boolean | isCacheStorage() If true signifies that performance evaluation should be stored. |
void | setCacheLookup(boolean cacheLookup) If true signifies that performance on this data should be looked up in cache |
void | setCacheStorage(boolean cacheStorage) If set to true, signifies that performance evaluation should be stored. |
add, add, allAttributeWeightsIdentical, allInstanceWeightsIdentical, attribute, attribute, attributeStats, attributeToDoubleArray, checkForAttributeType, checkForStringAttributes, checkInstance, classAttribute, classIndex, compactify, copyInstances, delete, delete, deleteAttributeAt, deleteAttributeType, deleteStringAttributes, deleteWithMissing, deleteWithMissing, deleteWithMissingClass, enumerateAttributes, enumerateInstances, equalHeaders, equalHeadersMsg, firstInstance, get, getRandomNumberGenerator, getRevision, initialize, insertAttributeAt, instance, instancesAndWeights, kthSmallestValue, kthSmallestValue, lastInstance, main, meanOrMode, meanOrMode, mergeInstances, numAttributes, numClasses, numDistinctValues, numDistinctValues, numInstances, randomize, readInstance, relationName, remove, renameAttribute, renameAttribute, renameAttributeValue, renameAttributeValue, replaceAttributeAt, resample, resampleWithWeights, resampleWithWeights, resampleWithWeights, resampleWithWeights, resampleWithWeights, resampleWithWeights, resampleWithWeights, set, setAttributeWeight, setAttributeWeight, setClass, setClassIndex, setRelationName, size, sort, sort, sortBasedOnNominalAttribute, stableSort, stableSort, stratify, stratStep, stringFreeStructure, stringWithoutHeader, sumOfWeights, swap, test, testCV, toString, toSummaryString, trainCV, trainCV, variance, variance, variances
addAll, clear, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, removeRange, subList
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
public ReproducibleInstances(ReproducibleInstances dataset)
public static ReproducibleInstances fromHistory(java.util.List<Instruction> history, java.lang.String apiKey) throws java.io.IOException
ReproducibleInstances
Object based on the given History. Instructions that no not modify the Instances will be ignored (No evaluation will be done).history
- List of Instructions used to create the original InstancesapiKey
- apiKey in case openml.org is usedReproducibleInstances
objectjava.io.IOException
- if something goes wrong while loading Instances from openml or when reading arff filepublic static ReproducibleInstances fromOpenML(java.lang.String id, java.lang.String apiKey) throws java.io.IOException
ReproducibleInstances
object. Data is loaded from openml.org.id
- The id of the openml datasetapiKey
- apikey to useReproducibleInstances
objectjava.io.IOException
- if something goes wrong while loading Instances from openmlpublic static ReproducibleInstances fromARFF(java.lang.String path) throws java.io.IOException
ReproducibleInstances
object. Data is loaded from a local arff file.path
- path to the datasetReproducibleInstances
objectjava.io.IOException
- if the ARFF file is not read successfullypublic java.util.List<Instruction> getInstructions()
public void addInstruction(Instruction i)
i
- - new Instructionpublic boolean isCacheStorage()
public void setCacheStorage(boolean cacheStorage)
cacheStorage
- the cacheStorage to setpublic boolean isCacheLookup()
public void setCacheLookup(boolean cacheLookup)
cacheLookup
- the cacheLookup to set