From b93b825bfaed83f76422ded2b39e0cb6a0382f57 Mon Sep 17 00:00:00 2001
From: Michele Nottoli <michele.nottoli@gmail.com>
Date: Thu, 9 Nov 2023 12:58:55 +0100
Subject: [PATCH] Changed the default value for the regularization.

---
 README.md       | 2 +-
 gext/fitting.py | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/README.md b/README.md
index 131c46c..d494ed1 100644
--- a/README.md
+++ b/README.md
@@ -51,7 +51,7 @@ This is an up to date list of available keyword options:
   - `store_overlap`:  bool, default True. Store the overlaps for later usage in calling guess without passing the current overlap. It can be disabled for performance, but calling guess will require passing the overlap.
 
 Some options can be piped to the fitting modules.
-  - `fitting_regularization`: float, default 0.0. Controls the regularization for both the "leastsquare" and "qtr" fitting schemes. In both the fitting schemes, an additional term of the form $\varepsilon^2 ||\alpha||^2$ is added to the error function, in this expression $\alpha$ is the vector of coefficients and $\varepsilon$ is the regularization.
+  - `fitting_regularization`: float, default 0.001. Controls the regularization for both the "leastsquare" and "qtr" fitting schemes. In both the fitting schemes, an additional term of the form $\varepsilon^2 ||\alpha||^2$ is added to the error function, in this expression $\alpha$ is the vector of coefficients and $\varepsilon$ is the regularization.
 
 
 ## Acknowledgments
diff --git a/gext/fitting.py b/gext/fitting.py
index 21fa5a3..d9b7997 100644
--- a/gext/fitting.py
+++ b/gext/fitting.py
@@ -46,7 +46,7 @@ class LeastSquare(AbstractFitting):
     """Simple least square minimization fitting."""
 
     supported_options = {
-        "regularization": 0.0,
+        "regularization": 1e-3,
     }
 
     def set_options(self, **kwargs):
@@ -73,7 +73,7 @@ class QuasiTimeReversible(AbstractFitting):
     """Quasi time reversible fitting scheme."""
 
     supported_options = {
-        "regularization": 0.0,
+        "regularization": 1e-3,
     }
 
     def set_options(self, **kwargs):
-- 
GitLab