diff options
Diffstat (limited to 'least_squares.cpp')
-rw-r--r-- | least_squares.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/least_squares.cpp b/least_squares.cpp index 827ede0..36bb1c3 100644 --- a/least_squares.cpp +++ b/least_squares.cpp @@ -2,6 +2,7 @@ #include <eigen3/unsupported/Eigen/CXX11/Tensor> #include <eigen3/unsupported/Eigen/CXX11/TensorSymmetry> #include <getopt.h> +#include <iomanip> #include "pcg-cpp/include/pcg_random.hpp" #include "randutils/randutils.hpp" @@ -224,6 +225,8 @@ int main(int argc, char* argv[]) { Vector x = Vector::Zero(N); x(0) = sqrt(N); + std::cout << std::setprecision(15); + for (unsigned sample = 0; sample < samples; sample++) { QuadraticModel* ls = new QuadraticModel(N, M, r, σ², μA, μJ); Vector xGD = gradientAscent(*ls, x); |