algorithms-for-computing-li.../LinearRegressionTool/src/test/java/de/wwwu/awolf/presenter/algorithms/advanced/TheilSenEstimatorTest.java

54 lines
1.5 KiB
Java

package de.wwwu.awolf.presenter.algorithms.advanced;
/**
* Implementierung verschiedener Algorithmen zur Berechnung von Ausgleichsgeraden.
*
* @Author: Armin Wolf
* @Email: a_wolf28@uni-muenster.de
* @Date: 23.10.2017.
*/
public class TheilSenEstimatorTest {
//
// TheilSenEstimator estimator;
//
// @Before
// public void setUp(){
// Double[] x = {18d, 24d, 30d, 34d, 38d};
// Double[] y = {18d, 26d, 30d, 40d, 70d};
//
//
// List<Line> lines = new LinkedList<>();
//
// for (int i = 0; i < 5; i++) {
// lines.add(new Line(x[i], y[i]));
// }
//
// estimator = new TheilSenEstimator(lines);
// }
//
//
// @Test
// public void getIntervalSize() throws Exception {
// // assertEquals(estimator.getIntervalSize(-2d, 0d), 5, 0.001);
// }
//
// @Test
// public void getOpenIntervalSize() throws Exception {
// // assertEquals(estimator.getIntervalSize(-1.4d, 0.6666d), 4, 0.001);
// }
//
// @Test
// public void getOpenIntervalElements() throws Exception {
// List<Point> intersectionInInterval = estimator.getOpenIntervalElements(-1.4d, -0.67d);
// double[] expected = {-1.375, -1.333, -1.0};
// double[] actual = new double[3];
// for (int i=0;i<intersectionInInterval.size();i++) {
// actual[i] = intersectionInInterval.get(i).getX();
// }
//
// Arrays.sort(expected);
// Arrays.sort(actual);
// assertArrayEquals(expected, actual, 0.001);
// }
}