Error in optimset function

5 visualizaciones (últimos 30 días)
Ridhima Kumar
Ridhima Kumar el 24 de Oct. de 2017
Comentada: Nayana Sharma el 20 de Nov. de 2018
I am taking Machine Learning course from Coursera. When I run the code in MATLAB(R2017), I am getting error in some optimset function. Error is copied below:
Error using optimset (line 255) Unrecognized parameter name 'GradObj'. Please see the optimset reference page in the documentation for a list of acceptable option parameters. Link to reference page.
How do I resolve this issue.
Regards Ridhima Kumar
  3 comentarios
Ridhima Kumar
Ridhima Kumar el 24 de Oct. de 2017
That is a pre written code by Coursera
KSSV
KSSV el 24 de Oct. de 2017
You check with the version course era people used and your version....

Iniciar sesión para comentar.

Respuesta aceptada

Walter Roberson
Walter Roberson el 24 de Oct. de 2017
GradObj is not a valid option to optimset() unless a license is present for one of the following products:
Optimization Toolbox
Curve Fitting Toolbox
Statistics and Machine Learning Toolbox
Computer Vision Toolbox
System Identification Toolbox
  4 comentarios
Walter Roberson
Walter Roberson el 22 de Oct. de 2018
Which optimization routine are you trying to call?
Nayana Sharma
Nayana Sharma el 20 de Nov. de 2018
Hi Animesh, you can remove the parameter GradObj and its value 'on' from the list of parameters for optimset function, and the code runs without error. i.e. just use options = optimset('MaxIter', 400);
Hope this helps.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Get Started with Optimization Toolbox en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by