@Test public void testEdmx_range0() { val data = new double[100]; Arrays.fill(data, 1.0); val estBreakout = EdmxEstimator.estimate(data, 24, 0); assertEquals(-1, estBreakout.getLocation()); }
public static EdmxEstimate estimate(double[] data, int delta, int numPerms) { val scaledData = DataUtil.unitScale(data); val breakout = estimateSimpleBreakout(scaledData, delta); val energyDistance = breakout.getEnergyDistance(); val pValue = estimatePValue(scaledData, delta, numPerms, energyDistance); return new EdmxEstimate() .setLocation(breakout.location) .setEnergyDistance(breakout.energyDistance) .setPreBreakoutMedian(breakout.preBreakoutMedian) .setPostBreakoutMedian(breakout.postBreakoutMedian) .setPValue(pValue); }
EdmxEstimator { public static EdmxEstimate estimate(double[] data, int delta, int numPerms) { val scaledData = DataUtil.unitScale(data); val breakout = estimateSimpleBreakout(scaledData, delta); val energyDistance = breakout.getEnergyDistance(); val pValue = estimatePValue(scaledData, delta, numPerms, energyDistance); return new EdmxEstimate() .setLocation(breakout.location) .setEnergyDistance(breakout.energyDistance) .setPreBreakoutMedian(breakout.preBreakoutMedian) .setPostBreakoutMedian(breakout.postBreakoutMedian) .setPValue(pValue); } }
EdmxEstimator { public static EdmxEstimate estimate(double[] data, int delta, int numPerms) { val scaledData = DataUtil.unitScale(data); val breakout = estimateSimpleBreakout(scaledData, delta); val energyDistance = breakout.getEnergyDistance(); val pValue = estimatePValue(scaledData, delta, numPerms, energyDistance); return new EdmxEstimate() .setLocation(breakout.location) .setEnergyDistance(breakout.energyDistance) .setPreBreakoutMedian(breakout.preBreakoutMedian) .setPostBreakoutMedian(breakout.postBreakoutMedian) .setPValue(pValue); }  }
EdmxEstimator { public static EdmxEstimate estimate(double[] data, int delta, int numPerms) { val scaledData = DataUtil.unitScale(data); val breakout = estimateSimpleBreakout(scaledData, delta); val energyDistance = breakout.getEnergyDistance(); val pValue = estimatePValue(scaledData, delta, numPerms, energyDistance); return new EdmxEstimate() .setLocation(breakout.location) .setEnergyDistance(breakout.energyDistance) .setPreBreakoutMedian(breakout.preBreakoutMedian) .setPostBreakoutMedian(breakout.postBreakoutMedian) .setPValue(pValue); }  static EdmxEstimate estimate(double[] data, int delta, int numPerms); }
EdmxEstimator { public static EdmxEstimate estimate(double[] data, int delta, int numPerms) { val scaledData = DataUtil.unitScale(data); val breakout = estimateSimpleBreakout(scaledData, delta); val energyDistance = breakout.getEnergyDistance(); val pValue = estimatePValue(scaledData, delta, numPerms, energyDistance); return new EdmxEstimate() .setLocation(breakout.location) .setEnergyDistance(breakout.energyDistance) .setPreBreakoutMedian(breakout.preBreakoutMedian) .setPostBreakoutMedian(breakout.postBreakoutMedian) .setPValue(pValue); }  static EdmxEstimate estimate(double[] data, int delta, int numPerms);  }