Skip to content

Commit a86e943

Browse files
change f_tol to f_reltol
1 parent 27b3772 commit a86e943

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

docs/src/quickstart.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,12 +155,12 @@ Which, in my case, gives `setosa`, `setosa` (correct in both cases).
155155

156156
Depending on your data you may want to customize the default solver associated with your model. Since this package uses [Optim](https://julianlsolvers.github.io/Optim.jl/stable/) behind the scene, we can interact directly with this package.
157157

158-
For instance, you may need to be more stringent about the convergence criterion of the LBFGS solver. This can be done by changing the general Optim `f_tol` parameter which defaults to ``10^{-4}``:
158+
For instance, you may need to be more stringent about the convergence criterion of the LBFGS solver. This can be done by changing the general Optim `f_reltol` parameter which defaults to ``10^{-4}``:
159159

160160
```julia
161161
import Optim
162162

163-
new_optim_options = Optim.Options(f_tol=1e-6)
163+
new_optim_options = Optim.Options(f_reltol=1e-6)
164164
mdl = MultinomialClassifier(solver=LBFGS(optim_options=new_optim_options))
165165
mach = machine(mdl, X, y)
166166
fit!(mach)

src/fit/solvers.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ solver = MLJLinearModels.Newton(
5757
```
5858
"""
5959
@with_kw struct Newton{O,S} <: Solver
60-
optim_options::O = Optim.Options(f_tol=1e-4)
60+
optim_options::O = Optim.Options(f_reltol=1e-4)
6161
newton_options::S = (; )
6262
end
6363

@@ -84,7 +84,7 @@ solver = MLJLinearModels.NewtonCG(
8484
```
8585
"""
8686
@with_kw struct NewtonCG{O,S} <: Solver
87-
optim_options::O = Optim.Options(f_tol=1e-4)
87+
optim_options::O = Optim.Options(f_reltol=1e-4)
8888
newtoncg_options::S = (; )
8989
end
9090

@@ -107,7 +107,7 @@ solver = MLJLinearModels.LBFGS(
107107
```
108108
"""
109109
@with_kw struct LBFGS{O,S} <: Solver
110-
optim_options::O = Optim.Options(f_tol=1e-4)
110+
optim_options::O = Optim.Options(f_reltol=1e-4)
111111
lbfgs_options::S = (; )
112112
end
113113

0 commit comments

Comments
 (0)