Example #1
0
 public static List<Double> getLinearRegression(List<Double> list) {
   List<Double> regression;
   PolynomialApproximator approximator = new PolynomialApproximator();
   regression = approximator.getApproxSignal(list, 1);
   list.forEach(e -> System.out.printf("%.1f", e));
   regression.forEach(e -> System.out.printf("%.1f", e));
   if (viewGraph) {
     viewGraph(list, regression);
   }
   return regression;
 }