# Calculation CEM baseline

 Document ID : KB000032401 Last Modified Date : 14/02/2018 Show Technical Document Details
 Question: How exactly does CEM calculate its baselines? Answer:   APM CE (CEM)  baselines are calculated based on the algorithms below. To change the algorithms, modify the parameters in the tess-default.properties file and restart the EM. APM CE uses these values for Box-Whisker graphs.The tess-default.properties file contains the following default settings:baseline.durationInDays = 28baseline.upper.discardOutlierPercentage = 5.0baseline.upper.offsetPercentage = 20.0baseline.lower.discardOutlierPercentage = 5.0baseline.lower.offsetPercentage = 20.0The upper baseline is calculated as follows:Take all hourly maximums over the last baseline.durationInDays days (datapoints)if number of datapoints = = 0 then return -1outlierCount = number of datapoints * baseline.upper.discardOutlierPercentage / 100Discard the largest "outlierCount" datapointsmaxWithoutOutliers = largest datapoint leftreturn upperBaseline = maxWithoutOutliers + (maxWithoutOutliers * baseline.upper.offsetPercentage/100)The lower baseline is calculated as follows:Take all hourly minimums over the last baseline.durationInDays daysif number of datapoints == 0 then return -1outlierCount = number of datapoints * baseline.lower.discardOutlierPercentage / 100Discard the smallest "outlierCount" datapointsminWithoutOutliers = smallest datapoint leftreturn lowerBaseline = minWithoutOutliers - (minWithoutOutliers * baseline.lower.offsetPercentage/100)