Skip to content

Commit cebb2a4

Browse files
committed
adjust default epsilon
1 parent 1f2e5c2 commit cebb2a4

File tree

6 files changed

+17
-17
lines changed

6 files changed

+17
-17
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -231,9 +231,9 @@ oe.Lasso.[函数名]([矩阵A], [矩阵b], [因子mu], [参数表], [初始迭
231231

232232
| 方法头 | 解释 |
233233
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | --------------------------- |
234-
| gradient(A: NDArray, b: NDArray, mu: float, args: ArgArray, x_0: PointArray, verbose: bool=False, draw: bool=True, output_f: bool=False, delta: float=10., alp: float=1e-3, epsilon: float=1e-2, k: int=0) -> OutputType | 光滑化Lasso函数法 |
234+
| gradient(A: NDArray, b: NDArray, mu: float, args: ArgArray, x_0: PointArray, verbose: bool=False, draw: bool=True, output_f: bool=False, delta: float=10., alp: float=1e-3, epsilon: float=1e-3, k: int=0) -> OutputType | 光滑化Lasso函数法 |
235235
| subgradient(A: NDArray, b: NDArray, mu: float, args: ArgArray, x_0: PointArray, verbose: bool=False, draw: bool=True, output_f: bool=False, alphak: float=2e-2, epsilon: float=1e-3, k: int=0) -> OutputType | 次梯度法Lasso避免一阶不可导 |
236-
| approximate_point(A: NDArray, b: NDArray, mu: float, args: ArgArray, x_0: PointArray, verbose: bool=False, draw: bool=True, output_f: bool=False, epsilon: float=1e-4, k: int=0) -> OutputType | 邻近算子更新 |
236+
| approximate_point(A: NDArray, b: NDArray, mu: float, args: ArgArray, x_0: PointArray, verbose: bool=False, draw: bool=True, output_f: bool=False, epsilon: float=1e-3, k: int=0) -> OutputType | 邻近算子更新 |
237237

238238
#### 曲线相切问题(WanYuan)
239239

README_en.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -232,9 +232,9 @@ oe.Lasso.[Function Name]([Matrxi A], [Matrix b], [Factor mu], [Parameters], [Ini
232232

233233
| head method | explain |
234234
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------- |
235-
| gradient(A: NDArray, b: NDArray, mu: float, args: ArgArray, x_0: PointArray, verbose: bool=False, draw: bool=True, output_f: bool=False, delta: float=10., alp: float=1e-3, epsilon: float=1e-2, k: int=0) -> OutputType | Smoothing Lasso Function Method |
235+
| gradient(A: NDArray, b: NDArray, mu: float, args: ArgArray, x_0: PointArray, verbose: bool=False, draw: bool=True, output_f: bool=False, delta: float=10., alp: float=1e-3, epsilon: float=1e-3, k: int=0) -> OutputType | Smoothing Lasso Function Method |
236236
| subgradient(A: NDArray, b: NDArray, mu: float, args: ArgArray, x_0: PointArray, verbose: bool=False, draw: bool=True, output_f: bool=False, alphak: float=2e-2, epsilon: float=1e-3, k: int=0) -> OutputType | Sub gradient method Lasso: avoiding first order nondifferentiability |
237-
| approximate_point(A: NDArray, b: NDArray, mu: float, args: ArgArray, x_0: PointArray, verbose: bool=False, draw: bool=True, output_f: bool=False, epsilon: float=1e-4, k: int=0) -> OutputType | Adjacent operator updating |
237+
| approximate_point(A: NDArray, b: NDArray, mu: float, args: ArgArray, x_0: PointArray, verbose: bool=False, draw: bool=True, output_f: bool=False, epsilon: float=1e-3, k: int=0) -> OutputType | Adjacent operator updating |
238238

239239
#### Curve Tangency Problem(WanYuan)
240240

examples/doc/_example.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@ $$
2020

2121
给定$A_{m \times n}$,$x_{n \times 1}$,$b_{m \times 1}$,正则化常数$\mu$。解决该无约束最优化问题,该问题目标函数一阶不可导。
2222

23-
| 方法头 | 解释 |
24-
| ------------------------------------------------------------------------------------------------------- | ---------------- |
25-
| gradient(A: NDArray, b: NDArray, mu: float, args: ArgArray, x_0: PointArray, verbose: bool=False, draw: bool=True, output_f: bool=False, delta: float=10., alp: float=1e-3, epsilon: float=1e-2, k: int=0) -> OutputType | 光滑化Lasso函数法 |
23+
| 方法头 | 解释 |
24+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | --------------------------- |
25+
| gradient(A: NDArray, b: NDArray, mu: float, args: ArgArray, x_0: PointArray, verbose: bool=False, draw: bool=True, output_f: bool=False, delta: float=10., alp: float=1e-3, epsilon: float=1e-3, k: int=0) -> OutputType | 光滑化Lasso函数法 |
2626
| subgradient(A: NDArray, b: NDArray, mu: float, args: ArgArray, x_0: PointArray, verbose: bool=False, draw: bool=True, output_f: bool=False, alphak: float=2e-2, epsilon: float=1e-3, k: int=0) -> OutputType | 次梯度法Lasso避免一阶不可导 |
27-
| approximate_point(A: NDArray, b: NDArray, mu: float, args: ArgArray, x_0: PointArray, verbose: bool=False, draw: bool=True, output_f: bool=False, epsilon: float=1e-4, k: int=0) -> OutputType | 邻近算子更新 |
27+
| approximate_point(A: NDArray, b: NDArray, mu: float, args: ArgArray, x_0: PointArray, verbose: bool=False, draw: bool=True, output_f: bool=False, epsilon: float=1e-3, k: int=0) -> OutputType | 邻近算子更新 |
2828

2929

3030
```python
@@ -62,8 +62,8 @@ oe.WanYuan.[函数名]([直线的斜率], [直线的截距], [二次项系数],
6262
给定直线的斜率和截距,给定一个抛物线函数的二次项系数,一次项系数与常数项。 要求解一个给定圆心的圆,该圆同时与抛物线、直线相切,若存在可行方案,请给出切点的坐标。
6363
```
6464

65-
| 方法头 | 解释 |
66-
| --------------------------------------------------------------- | -------------------- |
65+
| 方法头 | 解释 |
66+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------- |
6767
| solution(m: float, n: float, a: float, b: float, c: float, x3: float, y3: float, x_0: tuple, verbose: bool=False, draw: bool=False, eps: float=1e-10) -> str | 使用高斯-牛顿方法求解构造的7个残差函数 |
6868

6969

optimtool/constrain/equal.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ def lagrange_augmentede(funcs: FuncArray,
107107
:param lamk: float, the initial value of the elements in the initial penalty vector. default: float=6.0.
108108
:param sigma: float, penalty factor used to set the degree of convergence of `funcs`. default: float=10.0.
109109
:param p: float, parameter to adjust the degree value of convergence named `sigma`. default: float=2.0.
110-
:param epak: float, used to set the precision to accelerate the completion of kernel. default: float=1e-4.
110+
:param etak: float, used to set the precision to accelerate the completion of kernel. default: float=1e-4.
111111
:param epsilon: float, used to set the precision of stopping the overall algorithm. default: float=1e-6.
112112
:param k: int, iterative times is used to measure the difficulty of learning the `funcs` in the algorithm. default: int=0.
113113

optimtool/example/Lasso.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def gradient(A: NDArray,
3636
output_f: bool=False,
3737
delta: float=10.,
3838
alp: float=1e-3,
39-
epsilon: float=1e-2,
39+
epsilon: float=1e-3,
4040
k: int=0) -> OutputType:
4141
'''
4242
:param A: NDArray, matrix A with size m*n acting on x.
@@ -49,7 +49,7 @@ def gradient(A: NDArray,
4949
:param output_f: bool, use `bool` to control whether to obtain iterative values of `funcs`. default: bool=False.
5050
:param delta: float, value used to adjust the constant influence of mu. default: float=10.0.
5151
:param alp: float, initial update step size acting on smooth gradient. default: float=1e-3.
52-
:param epsilon: float, used to set the precision of stopping the overall algorithm. default: float=1e-2
52+
:param epsilon: float, used to set the precision of stopping the overall algorithm. default: float=1e-3.
5353
:param k: int, iterative times is used to measure the difficulty of learning the `funcs` in the algorithm. default: int=0.
5454
5555
:return: final convergenced point and iterative times, (iterative values in a list).
@@ -146,7 +146,7 @@ def approximate_point(A: NDArray,
146146
verbose: bool=False,
147147
draw: bool=True,
148148
output_f: bool=False,
149-
epsilon: float=1e-4,
149+
epsilon: float=1e-3,
150150
k: int=0) -> OutputType:
151151
'''
152152
:param A: NDArray, matrix A with size m*n acting on x.
@@ -157,7 +157,7 @@ def approximate_point(A: NDArray,
157157
:param verbose: bool, iteration point, function value, numbers of iteration after the k-th iteration. default: bool=False.
158158
:param draw: bool, use `bool` to control whether to draw visual images. default: bool=True.
159159
:param output_f: bool, use `bool` to control whether to obtain iterative values of `funcs`. default: bool=False.
160-
:param epsilon: float, used to set the precision of stopping the overall algorithm. default: float=1e-4.
160+
:param epsilon: float, used to set the precision of stopping the overall algorithm. default: float=1e-3.
161161
:param k: int, iterative times is used to measure the difficulty of learning the `funcs` in the algorithm. default: int=0.
162162
163163
:return: final convergenced point and iterative times, (iterative values in a list).

tests/example/_example.ipynb.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,9 @@
4747
"\n",
4848
"| 方法头 | 解释 |\n",
4949
"| ------------------------------------------------------------------------------------------------------- | ---------------- |\n",
50-
"| gradient(A: NDArray, b: NDArray, mu: float, args: ArgArray, x_0: PointArray, verbose: bool=False, draw: bool=True, output_f: bool=False, delta: float=10., alp: float=1e-3, epsilon: float=1e-2, k: int=0) -> OutputType | 光滑化Lasso函数法 |\n",
50+
"| gradient(A: NDArray, b: NDArray, mu: float, args: ArgArray, x_0: PointArray, verbose: bool=False, draw: bool=True, output_f: bool=False, delta: float=10., alp: float=1e-3, epsilon: float=1e-3, k: int=0) -> OutputType | 光滑化Lasso函数法 |\n",
5151
"| subgradient(A: NDArray, b: NDArray, mu: float, args: ArgArray, x_0: PointArray, verbose: bool=False, draw: bool=True, output_f: bool=False, alphak: float=2e-2, epsilon: float=1e-3, k: int=0) -> OutputType | 次梯度法Lasso避免一阶不可导 |\n",
52-
"| approximate_point(A: NDArray, b: NDArray, mu: float, args: ArgArray, x_0: PointArray, verbose: bool=False, draw: bool=True, output_f: bool=False, epsilon: float=1e-4, k: int=0) -> OutputType | 邻近算子更新 |"
52+
"| approximate_point(A: NDArray, b: NDArray, mu: float, args: ArgArray, x_0: PointArray, verbose: bool=False, draw: bool=True, output_f: bool=False, epsilon: float=1e-3, k: int=0) -> OutputType | 邻近算子更新 |"
5353
]
5454
},
5555
{

0 commit comments

Comments
 (0)