def getConfidenceInterval(self, value_list, confidenceLevel):
        from dream.KnowledgeExtraction.ConfidenceIntervals import Intervals
        from dream.KnowledgeExtraction.StatisticalMeasures import BasicStatisticalMeasures

        BSM = BasicStatisticalMeasures()
        lb, ub = Intervals().ConfidIntervals(value_list, confidenceLevel)
        return {"lb": lb, "ub": ub, "avg": BSM.mean(value_list)}
Exemple #2
0
def getConfidenceIntervals(value_list):
    from Globals import G
    if len(set(value_list)) == 1:
        # All values are same, no need to perform statistical analysis
        return { 'lb': value_list[0],
                 'ub': value_list[0],
                 'avg': value_list[0], }
    from dream.KnowledgeExtraction.ConfidenceIntervals import Intervals
    from dream.KnowledgeExtraction.StatisticalMeasures import BasicStatisticalMeasures
    BSM=BasicStatisticalMeasures()
    lb, ub = Intervals().ConfidIntervals(value_list, G.confidenceLevel)
    return {'lb': lb,
            'ub': ub,
            'avg': BSM.mean(value_list) }
Exemple #3
0
def getConfidenceIntervals(value_list):
    from Globals import G
    if len(set(value_list)) == 1:
        # All values are same, no need to perform statistical analysis
        return { 'lb': value_list[0],
                 'ub': value_list[0],
                 'avg': value_list[0], }
    from dream.KnowledgeExtraction.ConfidenceIntervals import Intervals
    from dream.KnowledgeExtraction.StatisticalMeasures import BasicStatisticalMeasures
    BSM=BasicStatisticalMeasures()
    lb, ub = Intervals().ConfidIntervals(value_list, G.confidenceLevel)
    return {'lb': lb,
            'ub': ub,
            'avg': BSM.mean(value_list) }
Exemple #4
0
def main():

    # add all the objects in a list
    objectList = [S, M1, M2, E, Q, R, F1, F2]
    # set the length of the experiment
    maxSimTime = 1440.0
    # call the runSimulation giving the objects and the length of the experiment
    runSimulation(objectList, maxSimTime, numberOfReplications=10, seed=1)

    print 'The exit of each replication is:'
    print E.Exits

    # calculate confidence interval using the Knowledge Extraction tool
    from dream.KnowledgeExtraction.ConfidenceIntervals import Intervals
    from dream.KnowledgeExtraction.StatisticalMeasures import BasicStatisticalMeasures
    BSM = BasicStatisticalMeasures()
    lb, ub = Intervals().ConfidIntervals(E.Exits, 0.95)
    print 'the 95% confidence interval for the throughput is:'
    print 'lower bound:', lb
    print 'mean:', BSM.mean(E.Exits)
    print 'upper bound:', ub
def main():
    
    # add all the objects in a list
    objectList=[S,M1,M2,E,Q,R,F1,F2]  
    # set the length of the experiment  
    maxSimTime=1440.0
    # call the runSimulation giving the objects and the length of the experiment
    runSimulation(objectList, maxSimTime, numberOfReplications=10, seed=1)
        
    print 'The exit of each replication is:'
    print E.Exits
    
    # calculate confidence interval using the Knowledge Extraction tool
    from dream.KnowledgeExtraction.ConfidenceIntervals import Intervals
    from dream.KnowledgeExtraction.StatisticalMeasures import BasicStatisticalMeasures
    BSM=BasicStatisticalMeasures()
    lb, ub = Intervals().ConfidIntervals(E.Exits, 0.95)
    print 'the 95% confidence interval for the throughput is:'
    print 'lower bound:', lb 
    print 'mean:', BSM.mean(E.Exits)
    print 'upper bound:', ub       
Exemple #6
0
 def getConfidenceInterval(self, value_list, confidenceLevel):
     from dream.KnowledgeExtraction.ConfidenceIntervals import Intervals
     from dream.KnowledgeExtraction.StatisticalMeasures import BasicStatisticalMeasures
     BSM = BasicStatisticalMeasures()
     lb, ub = Intervals().ConfidIntervals(value_list, confidenceLevel)
     return {'lb': lb, 'ub': ub, 'avg': BSM.mean(value_list)}