mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
import back LeastSquares into eigen2support. Pass most of eigen2's 'regression' test, except for regression_4 which is about complex numbers.
This commit is contained in:
@@ -88,6 +88,7 @@ void check_fitHyperplane(int numPoints,
|
||||
fitHyperplane(numPoints, points, &result);
|
||||
result.coeffs() *= original.coeffs().coeff(size)/result.coeffs().coeff(size);
|
||||
typename VectorType::Scalar error = (result.coeffs() - original.coeffs()).norm() / original.coeffs().norm();
|
||||
std::cout << ei_abs(error) << " xxx " << ei_abs(tolerance) << std::endl;
|
||||
VERIFY(ei_abs(error) < ei_abs(tolerance));
|
||||
}
|
||||
|
||||
@@ -109,7 +110,7 @@ void test_eigen2_regression()
|
||||
CALL_SUBTEST(check_linearRegression(100, points2f_ptrs, coeffs2f, 0.01f));
|
||||
CALL_SUBTEST(check_linearRegression(1000, points2f_ptrs, coeffs2f, 0.002f));
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
#ifdef EIGEN_TEST_PART_2
|
||||
{
|
||||
Vector2f points2f [1000];
|
||||
|
||||
Reference in New Issue
Block a user