コード例 #1
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)}
コード例 #2
0
ファイル: Globals.py プロジェクト: Kodextor/dream
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) }
コード例 #3
0
ファイル: Globals.py プロジェクト: bchiroma/DreamProject_2
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) }
コード例 #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
コード例 #5
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       
コード例 #6
0
ファイル: plugin.py プロジェクト: PanosBarlas/dream
 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)}