def __init__(self, title, xLabel, yLabel=None, roundingDecimals=2, nBins=None, dropOutliers=False, sigmaLimit=5, storeHistogram=True): """ __init__ Initialize a more complex histogram structure, containing different data to calculate online average and standard deviations. This data is also stored in the JSON to allow rebuilding and adding histograms. All histograms are binned when requested, the resolution can be specified through nBins, otherwise the value used is the one recommended in: Wand, M.P. (1997), "Data-Based Choice of Histogram Bin Width," The American Statistician, 51, 59-64. If specified, outlier farther than sigmaLimit standard deviations from the mean will not be included in the binned histogram. """ # Initialize the parent object SummaryHistogram.__init__(self, title, xLabel) # Indicate this is a discrete histogram self.continuous = True # Add data only used in the continuous version self.yLabel = yLabel self.nPoints = 0 self.QValue = None self.average = None # Configuration parameters for the continuous histograms self.roundingDecimals = roundingDecimals self.fixedNBins = nBins self.dropOutliers = dropOutliers self.sigmaLimit = sigmaLimit self.binned = False self.storeHistogram = storeHistogram # Override initialization of some attributes self.average = 0.0 self.stdDev = 0.0 return
def __init__(self, title, xLabel, yLabel = None, roundingDecimals = 2, nBins = None, dropOutliers = False, sigmaLimit = 5, storeHistogram = True): """ __init__ Initialize a more complex histogram structure, containing different data to calculate online average and standard deviations. This data is also stored in the JSON to allow rebuilding and adding histograms. All histograms are binned when requested, the resolution can be specified through nBins, otherwise the value used is the one recommended in: Wand, M.P. (1997), "Data-Based Choice of Histogram Bin Width," The American Statistician, 51, 59-64. If specified, outlier farther than sigmaLimit standard deviations from the mean will not be included in the binned histogram. """ # Initialize the parent object SummaryHistogram.__init__(self, title, xLabel) # Indicate this is a discrete histogram self.continuous = True # Add data only used in the continuous version self.yLabel = yLabel self.nPoints = 0 self.QValue = None self.average = None # Configuration parameters for the continuous histograms self.roundingDecimals = roundingDecimals self.fixedNBins = nBins self.dropOutliers = dropOutliers self.sigmaLimit = sigmaLimit self.binned = False self.storeHistogram = storeHistogram # Override initialization of some attributes self.average = 0.0 self.stdDev = 0.0 return
def __init__(self, title, xLabel): """ __init__ Initialize a simpler histogram that only stores the histogram. Everything else is calculated when the JSON is requested. """ # Initialize the parent object SummaryHistogram.__init__(self, title, xLabel) # Indicate this is a discrete histogram self.continuous = False # Add data only used in the discrete version self.yLabels = set() # Override initialization of some attributes self.average = {} self.stdDev = {} return
def __init__(self, title, xLabel): """ __init__ Initialize a simpler histogram that only stores the histogram. Everything else is calculated when the JSON is requested. """ # Initialize the parent object SummaryHistogram.__init__(self, title, xLabel) # Indicate this is a discrete histogram self.continuous = False # Add data only used in the discrete version self.yLabels = set() # Override initialization of some attributes self.average = {} self.stdDev = {} return