Skip to content

Commit 30ee963

Browse files
committed
Add examples and update docs
1 parent 4bf0d53 commit 30ee963

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+2029
-1498
lines changed

dfols/params.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ def __init__(self, n, npt, maxfun, objfun_has_noise=False):
113113
self.params["dykstra.d_tol"] = 1e-10
114114
self.params["dykstra.max_iters"] = 100
115115
# Matrix rank algorithm
116-
self.params["matrix_rank.r_tol"] = 1e-15
116+
self.params["matrix_rank.r_tol"] = 1e-18
117117

118118
self.params_changed = {}
119119
for p in self.params:

dfols/tests/test_util.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ def runTest(self):
170170
# Trivial case of full rank
171171
class TestMatrixRankQR1(unittest.TestCase):
172172
def runTest(self):
173-
mr_tol = 1e-15
173+
mr_tol = 1e-18
174174
A = np.array([
175175
[1,0,0,0],
176176
[0,1,0,0],
@@ -183,7 +183,7 @@ def runTest(self):
183183
# Full rank but QR has negative entries for diag(R)
184184
class TestMatrixRankQR2(unittest.TestCase):
185185
def runTest(self):
186-
mr_tol = 1e-15
186+
mr_tol = 1e-18
187187
A = np.array([
188188
[1,2,3,4],
189189
[0,6,7,8],
@@ -194,15 +194,15 @@ def runTest(self):
194194
self.assertTrue(rank == 4, "Incorrect rank output")
195195

196196

197-
# Full rank but QR has negative entries for diag(R)
197+
# Not full rank
198198
class TestMatrixRankQR3(unittest.TestCase):
199199
def runTest(self):
200-
mr_tol = 1e-15
200+
mr_tol = 1e-18
201201
A = np.array([
202202
[1,2,3,4],
203203
[2,6,4,8],
204-
[-1,-2,-3,-4],
205-
[1,3,2,4]])
204+
[0,0,0,0],
205+
[0,0,0,0]])
206206
rank, D = qr_rank(A,mr_tol)
207207
self.assertTrue(np.all(D[0:2] > mr_tol), "Incorrect diagonal matrix output (rows 1,2)")
208208
self.assertTrue(np.all(D[2:4] <= mr_tol), "Incorrect diagonal matrix output (rows 3,4)")

docs/advanced.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,15 @@ Dynamically Growing Initial Set
103103
* :code:`growing.gamma_dec` - Trust region decrease parameter during the growing phase. Default is :code:`tr_radius.gamma_dec`.
104104
* :code:`growing.num_new_dirns_each_iter` - Number of new search directions to add with each iteration where we do not have a full set of search directions. Default is 0, as this approach is not recommended.
105105

106+
Dykstra's Algorithm
107+
-------------------------------
108+
* :code:`dykstra.d_tol` - Tolerance on the stopping conditions of Dykstra's algorithm. Default is :math:`10^{-10}`.
109+
* :code:`dykstra.max_iters` - The maximum number of iterations Dykstra's algorithm is allowed to take before stopping. Default is :math:`100`.
110+
111+
Checking Matrix Rank
112+
-------------------------------
113+
* :code:`matrix_rank.r_tol` - Tolerance on what is the smallest posisble diagonal entry value in the QR factorization before being considered zero. Default is :math:`10^{-18}`.
114+
106115

107116
References
108117
----------
3.35 KB
Binary file not shown.
-5 Bytes
Binary file not shown.
1.55 KB
Binary file not shown.
827 Bytes
Binary file not shown.

docs/build/doctrees/index.doctree

416 Bytes
Binary file not shown.

docs/build/doctrees/info.doctree

292 Bytes
Binary file not shown.
-5 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)