예제 #1
0
 @Override
 protected void onLoad() {
   super.onLoad();
   if (histogram != null) {
     histogramPanel.clear();
     histogramPanel.add(histogram.createChart(translations.histogram(), translations.density()));
   }
   if (qqPlot != null) {
     normalProbability.clear();
     normalProbability.add(
         qqPlot.createChart(
             translations.normalProbability(),
             translations.theoreticalQuantiles(),
             translations.sampleQuantiles()));
   }
 }
예제 #2
0
  private void initDescriptivestats(ContinuousSummaryDto continuous) {
    DescriptiveStatsDto descriptiveStats = continuous.getSummary();
    addDescriptiveStatistics(descriptiveStats);

    if (descriptiveStats.getVariance() > 0) {
      histogram = new HistogramChartFactory();
      JsArray<IntervalFrequencyDto> frequencyArray = continuous.getIntervalFrequencyArray();
      if (frequencyArray != null) {
        int length = frequencyArray.length();
        for (int i = 0; i < length; i++) {
          IntervalFrequencyDto value = frequencyArray.get(i);
          histogram.push(value.getDensity(), value.getLower(), value.getUpper());
        }
      }
      qqPlot =
          new NormalProbabilityChartFactory(descriptiveStats.getMin(), descriptiveStats.getMax());
      qqPlot.push(
          descriptiveStats.getPercentilesArray(), continuous.getDistributionPercentilesArray());
    }
  }