@@ -87,7 +87,7 @@ In contrast, many problems admit efficient implementations of Hessian–vector o
8787
8888## In-place methods  
8989
90- All solvers in ** RegularizedOptimization.jl**  are implemented in an in-place fashion, minimizing memory allocations and improving performance .
90+ All solvers in ** RegularizedOptimization.jl**  are implemented in an in-place fashion, minimizing memory allocations during the resolution process .
9191
9292# Examples  
9393
@@ -103,14 +103,20 @@ where $\lambda = 10^{-1}$ and $A \in \mathbb{R}^{m \times n}$, with $n = 784$ re
103103``` julia 
104104using  LinearAlgebra, Random
105105using  ProximalOperators
106- using  NLPModels, NLPModelsModifiers, RegularizedProblems, RegularizedOptimization, SolverCore 
106+ using  NLPModels, NLPModelsModifiers, RegularizedProblems, RegularizedOptimization
107107using  MLDatasets
108108
109109random_seed =  1234 
110110Random. seed! (random_seed)
111111
112- #  Load the MNIST dataset
113- model, _, _  =  RegularizedProblems. svm_train_model ()
112+ #  Load MNIST from MLDatasets
113+ imgs, labels =  MLDatasets. MNIST. traindata ()
114+ 
115+ #  Use RegularizedProblems' preprocessing
116+ A, b =  RegularizedProblems. generate_data (imgs, labels, (1 , 7 ), false )
117+ 
118+ #  Build the models
119+ model, _, _ =  RegularizedProblems. svm_model (A, b)
114120
115121#  Define the Hessian approximation
116122f =  LBFGSModel (model)
@@ -135,12 +141,12 @@ Another example is the FitzHugh-Nagumo inverse problem with an $\ell_1$ penalty,
135141
136142``` julia 
137143using  LinearAlgebra
138- using  DifferentialEquations, ProximalOperators
139- using  ADNLPModels, NLPModels, NLPModelsModifiers, RegularizedOptimization, RegularizedProblems
144+ using  ProximalOperators
145+ using  NLPModels, NLPModelsModifiers, RegularizedProblems, RegularizedOptimization
146+ using  DifferentialEquations, ADNLPModels
140147
141- #  Define the Fitzagerald Higgs problem
142- data, _, _, _, _ =  RegularizedProblems. FH_smooth_term ()
143- fh_model =  ADNLPModel (misfit, ones (5 ))
148+ #  Define the Fitzhugh-Nagumo problem
149+ model, _, _ =  RegularizedProblems. fh_model ()
144150
145151#  Define the Hessian approximation
146152f =  LBFGSModel (fh_model)
0 commit comments