Package ai.libs.hasco.knowledgebase
Class PerformanceKnowledgeBase
- java.lang.Object
-
- ai.libs.hasco.knowledgebase.PerformanceKnowledgeBase
-
public class PerformanceKnowledgeBase extends java.lang.ObjectKnowledge base that manages observed performance behavior
-
-
Constructor Summary
Constructors Constructor Description PerformanceKnowledgeBase()PerformanceKnowledgeBase(ai.libs.jaicore.basic.SQLAdapter sqlAdapter)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddPerformanceSample(java.lang.String benchmarkName, ComponentInstance componentInstance, double score, boolean addToDB)voidaddPerformanceSampleToDB(java.lang.String benchmarkName, ComponentInstance componentInstance, double score)weka.core.InstancescreateInstancesForPerformanceSamples(java.lang.String benchmarkName, ComponentInstance composition)weka.core.InstancegetInstanceForIndividualCI(java.lang.String benchmarkName, ComponentInstance ci, double score)weka.core.InstancesgetInstancesForCI(ComponentInstance ci)weka.core.InstancesgetInstancesForCIList(java.util.List<ComponentInstance> componentInstances)intgetNumSamples(java.lang.String benchmarkName, java.lang.String identifier)Returns the number of samples for the given benchmark name and pipeline identifier.intgetNumSamplesForComponent(java.lang.String benchmarkName, Component component)intgetNumSignificantSamples(java.lang.String benchmarkName, java.lang.String identifier)Returns the number of significant samples for the given benchmark name and pipeline identifier.java.util.Map<java.lang.String,java.util.HashMap<java.lang.String,weka.core.Instances>>getPerformanceInstancesIndividualComponents()weka.core.InstancesgetPerformanceSamples(java.lang.String benchmarkName, ComponentInstance composition)java.util.Map<java.lang.String,java.util.HashMap<java.lang.String,java.util.List<org.apache.commons.lang3.tuple.Pair<ai.libs.hasco.knowledgebase.PerformanceKnowledgeBase.ParameterConfiguration,java.lang.Double>>>>getPerformanceSamplesByIdentifier()weka.core.InstancesgetPerformanceSamplesForIndividualComponent(java.lang.String benchmarkName, Component component)java.lang.StringgetStringOfMaps()voidinitializeDBTables()booleankCompletelyDistinctSamplesAvailable(java.lang.String benchmarkName, ComponentInstance composition, int minNum)Checks whether at least k sample are available, that are pairwise distinct in each of their attribute values.booleankDistinctAttributeValuesAvailable(java.lang.String benchmarkName, ComponentInstance composition, int minNum)Checks whether k samples are available, which arevoidloadPerformanceSamplesFromDB()voidsetPerformanceSamples(weka.core.Instances instances, ComponentInstance composition, java.lang.String benchmarkName)
-
-
-
Method Detail
-
getInstancesForCI
public weka.core.Instances getInstancesForCI(ComponentInstance ci)
-
getInstancesForCIList
public weka.core.Instances getInstancesForCIList(java.util.List<ComponentInstance> componentInstances)
-
addPerformanceSample
public void addPerformanceSample(java.lang.String benchmarkName, ComponentInstance componentInstance, double score, boolean addToDB)
-
getInstanceForIndividualCI
public weka.core.Instance getInstanceForIndividualCI(java.lang.String benchmarkName, ComponentInstance ci, double score)
-
getPerformanceInstancesIndividualComponents
public java.util.Map<java.lang.String,java.util.HashMap<java.lang.String,weka.core.Instances>> getPerformanceInstancesIndividualComponents()
-
getPerformanceSamplesByIdentifier
public java.util.Map<java.lang.String,java.util.HashMap<java.lang.String,java.util.List<org.apache.commons.lang3.tuple.Pair<ai.libs.hasco.knowledgebase.PerformanceKnowledgeBase.ParameterConfiguration,java.lang.Double>>>> getPerformanceSamplesByIdentifier()
-
getStringOfMaps
public java.lang.String getStringOfMaps()
-
initializeDBTables
public void initializeDBTables()
-
addPerformanceSampleToDB
public void addPerformanceSampleToDB(java.lang.String benchmarkName, ComponentInstance componentInstance, double score)
-
getNumSamples
public int getNumSamples(java.lang.String benchmarkName, java.lang.String identifier)Returns the number of samples for the given benchmark name and pipeline identifier.- Parameters:
benchmarkName-identifier-- Returns:
-
getNumSignificantSamples
public int getNumSignificantSamples(java.lang.String benchmarkName, java.lang.String identifier)Returns the number of significant samples for the given benchmark name and pipeline identifier. Significant means, that- Parameters:
benchmarkName-identifier-- Returns:
-
loadPerformanceSamplesFromDB
public void loadPerformanceSamplesFromDB()
-
kDistinctAttributeValuesAvailable
public boolean kDistinctAttributeValuesAvailable(java.lang.String benchmarkName, ComponentInstance composition, int minNum)Checks whether k samples are available, which are- Parameters:
k-- Returns:
-
kCompletelyDistinctSamplesAvailable
public boolean kCompletelyDistinctSamplesAvailable(java.lang.String benchmarkName, ComponentInstance composition, int minNum)Checks whether at least k sample are available, that are pairwise distinct in each of their attribute values.- Parameters:
benchmarkName-composition-minNum- strictly positive minimum number of samples- Returns:
-
getPerformanceSamples
public weka.core.Instances getPerformanceSamples(java.lang.String benchmarkName, ComponentInstance composition)
-
createInstancesForPerformanceSamples
public weka.core.Instances createInstancesForPerformanceSamples(java.lang.String benchmarkName, ComponentInstance composition)
-
getPerformanceSamplesForIndividualComponent
public weka.core.Instances getPerformanceSamplesForIndividualComponent(java.lang.String benchmarkName, Component component)
-
getNumSamplesForComponent
public int getNumSamplesForComponent(java.lang.String benchmarkName, Component component)
-
setPerformanceSamples
public void setPerformanceSamples(weka.core.Instances instances, ComponentInstance composition, java.lang.String benchmarkName)
-
-