Levenberg-Marquardt Algorithm #2

I am trying to write a MATLAB code of the Levenberg-Marquardt Algorithm based on Section III in the paper "Training Feedforward networks with the Marquardt Algorithm" by Matin.T.Hagan. So considering I have a set of training inputs and a set of Target inputs, my question is 

  - How do I calculate the Jacobian Matrix ? I understand that it is a matrix of the partial derivatives of the vector being calculated. But am not sure how do I actually use the Jacobian command that is in MATLAB to compute the jacobian matrix ? .

   hoping somone can help me out. Thank you .
0
manosamuel (35)
1/24/2010 5:01:02 PM
comp.soft-sys.matlab 206942 articles. 560 followers. lunamoonmoon (258) is leader. Post Follow

5 Replies
426 Views

Similar Articles

[PageSpeed] 26
On 24 Jan, 18:01, "Mano Samuel" <manosam...@rediffmail.com> wrote:
> I am trying to write a MATLAB code of the Levenberg-Marquardt Algorithm b=
ased on Section III in the paper "Training Feedforward networks with the Ma=
rquardt Algorithm" by Matin.T.Hagan. So considering I have a set of trainin=
g inputs and a set of Target inputs, my question is
>
> =A0 - How do I calculate the Jacobian Matrix ? I understand that it is a =
matrix of the partial derivatives of the vector being calculated. But am no=
t sure how do I actually use the Jacobian command that is in MATLAB to comp=
ute the jacobian matrix ? .

I would be very surprised if there is such a command.

The Jacobian is a matrix of partial derivatives of the
function you attempt to optimize. If you have an analytic
expression for the fucntion, compute the partial derivatives
analytically and arrange in a matrix.

If you can't find the analytic expressions for the partial
derivatives, you can come up with all kinds of numerical
estimates. But be aware that not all such estimates are
very good. In which case you might prefer to use a method
that does not require the Jacobian at all.

All this is standard material in an intro class on
numerical optimization. Find a textbook and read.

Rune
0
allnor (8507)
1/24/2010 5:57:58 PM
MATLAB has two potentially relevant commands.  The jacobian function
in the symbolic computation toolbox computes a symbolic Jacobian.  The
numjac command uses finite difference approximations to compute the
jacobian of a function at a particular point.
0
1/24/2010 6:02:52 PM
"Mano Samuel" <manosamuel@rediffmail.com> wrote in message <hjhuce$6fh$1@fred.mathworks.com>...

>   - How do I calculate the Jacobian Matrix ? I understand that it is a matrix of the partial derivatives of the vector being calculated. But am not sure how do I actually use the Jacobian command that is in MATLAB to compute the jacobian matrix ? .
================

jacobian() is a command in the Symbolic Math Toolbox, so first off, you have to have that. If you do have that, its usage is documented here, with an example: 


http://www.mathworks.com/access/helpdesk/help/toolbox/symbolic/jacobian.html
0
mattjacREMOVE (3194)
1/24/2010 6:07:02 PM
"Matt J " <mattjacREMOVE@THISieee.spam> wrote in message <hji286$9u7$1@fred.mathworks.com>...
> "Mano Samuel" <manosamuel@rediffmail.com> wrote in message <hjhuce$6fh$1@fred.mathworks.com>...
> 
> >   - How do I calculate the Jacobian Matrix ? I understand that it is a matrix of the partial derivatives of the vector being calculated. But am not sure how do I actually use the Jacobian command that is in MATLAB to compute the jacobian matrix ? .
> ================
> 
> jacobian() is a command in the Symbolic Math Toolbox, so first off, you have to have that. If you do have that, its usage is documented here, with an example: 
> 
> 
> http://www.mathworks.com/access/helpdesk/help/toolbox/symbolic/jacobian.html

Thank you .. 
0
manosamuel (35)
1/25/2010 9:45:04 AM
"Mano Samuel" wrote in message <hjhuce$6fh$1@fred.mathworks.com>...
> 
> I am trying to write a MATLAB code of the Levenberg-Marquardt Algorithm based on Section III in the paper "Training Feedforward networks with the Marquardt Algorithm" by Matin.T.Hagan. So considering I have a set of training inputs and a set of Target inputs, my question is 
> 
>   - How do I calculate the Jacobian Matrix ? I understand that it is a matrix of the partial derivatives of the vector being calculated. But am not sure how do I actually use the Jacobian command that is in MATLAB to compute the jacobian matrix ? .
> 
>    hoping somone can help me out. Thank you .

Hello Mr.Mano Samuel,

  I am also trying to write own code for   Levenberg-Marquardt Algorithm for feed forward neural network, i hope you would have programmed it so can you please help me out in programming the same. i am new in using matlab so can you please help me out to program for  Levenberg-Marquardt Algorithm

Thanking you

raj
0
prk_mect (15)
4/5/2011 8:09:04 AM
Reply:
Similar Artilces:

[wxW 2.6.1.] wxTreeCtrl missing the icons #2
--=_courier.cluj.astral.ro-25927-1122029893-0001-2 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit I forgot to add that imgId gets >= 0 as a result of Add(). Cristina. --=_courier.cluj.astral.ro-25927-1122029893-0001-2 Content-Type: text/html; charset=us-ascii Content-Transfer-Encoding: 7bit <html> <body> <font size=3>I forgot to add that imgId gets &gt;= 0 as a result of Add().<br><br> Cristina. </font></body> </html> --=_courier.cluj.astral.ro-25927-1122029893-0001-2-- ...

How to resolve 5 coefficents of 2 variables funct
Hello, I want to resolve 5 coefficents of 2 variables function: z=WA*abs(x.*exp(-A*(x-B).^2-C*(y-D).^2)) I have more than 6 points (X,Y,Z) to interpolate the surface. Please help, k_g_r In article <ef233eb.-1@webx.raydaftYaTP>, k_g_r <kgr@plusnet.pl> wrote: > Hello, > > I want to resolve 5 coefficents of 2 variables function: > > z=WA*abs(x.*exp(-A*(x-B).^2-C*(y-D).^2)) > > I have more than 6 points (X,Y,Z) to interpolate the surface. > > Please help, > k_g_r Don't just keep asking the same question. Its a nonlinear regressio...

Help: 3D surface plot in gnuplot #2
I want to plot a surface. The data file is grid. Currently I do as follows: set hidden3d splot "*.dat" w l But I want a wire frame surface. I know gnuplot can do it for function plot. How can I get it for a data plot? When I did "set dgrid3d 30,30,2" it said "all polygons not defined or out of range". Thanks. ...

IPod Video Downloads
=85This article will let you in on the kinds of download sites that are online nowadays and how to avoid scams and illegal downloads=85 http://gadgetupdates.googlepages.com/ipod_video_downloads ...

question #2
In my in-box I suddenly get (?) question marks in front of all my messages instead of the regular codes that used to be there. I also don't get the sender's name any more. I do not have a virus Has anyone got an explanation and how can I repair this? Thanks, - Peter - ...

Re: SQL equivalent #2
On Fri, 24 Aug 2007 08:49:15 -0700, Syb it <sas_datalover@YAHOO.COM> wrote: >What SQL statement does this: > > proc freq data=Have; tables Group; by first_prod; run; The COUNT function and GROUP BY clause can do the basics, but emulating percentages and especially cumulatives can get quite complicated. ...

how to use a complex model with levenberd-marquardt vi
I am trying to use the Levenberg-Marquardt vi. My problem is that I have a model that predicts a complex valued impedance spectrogram. The model requires for input the 3 parameters as well as a collected complex valued data vector also as input to produce a prediction for a complex valued impedance spectrogram vector. I want to use the LM vi to curve fit the 3 parameters against a seperately collected experimental impedance spectrogram. Can this be done or is this a limitation to LabView V6.02 at the present. I have looked all over the website and found no reference to using a complex valu...

Dangerous Road 2.0
When he gets on his bike he becomes invincible at once. His friends are hot asphalt, cold wind blowing in the face, and his native gun that has never let him down. This daredevil takes all chances to prove that he is the best on the road, and no car can overtake him. He has a sixth sense for bad guys, so he is always vigilant. Would you help him to withstand in this mortal combat with the evil; grab the steering wheel and be a good shooter. More Info: http://www.freegamesway.com/dangerous_road Download URL: http://www.freegamesway.com/files/droadsetup.exe Screenshot URL: http://www....

Re: dynamic time warping algorithm
On Thu, 31 Jul 2003, Sujai wrote: > i came across an algorithm for dynamic time warping in this article: > http://citeseer.nj.nec.com/keogh00scaling.html > > we are trying to use the algorithm to calculate the distance between two > sequences (of letters, for eg: AAAAABBCCCCCCCCDDD and AABBBBBBCDDDDDD). > > i understand the algorithm but have never used the dynamic programming > technique described in the article. > > would anyone here know how this could be implemented in mathematica or > if there is a resource where this has been done before? i h...

US-TX-Austin: DSP Architect Eng.,DSP algorithms, Write specifications, chip leve (45328614405)
US-TX-Austin: DSP Architect Eng.,DSP algorithms, Write specifications, chip leve (45328614405) ============================================================================================== Position: DSP Architect Eng. Reference: SMC01734 Location: Austin TX Duration: DH Skills: Should have practical familiarity with the following disciplines: DSP algorithms and DSP instruction set development Performance modeling Pipelined microarchitectures Datapath, ALU and multiplier design ...

QNX Neutrino OS installation #2
Hi, I am installing the QNX Neutrino OS on a compact flash card. My CF card is attached to the mother via a CF to IDE adapter and I am booting off of a CD-ROM drive. When I boot the system, I disable DMA and it gives me 2 options: F2 - to boot from CD F3 - to install on a new partition. I choose F3 and the system reports that there is no available space on any partition of the CF card. The CF card is 1GB and is formatted under DOS FAT filesystem. I try to delete the partition during the installation and still the system reports that there is no space on the CF card. Please ...

Digital Filter Design and Simulation #2
Hi. I have a project on Digital Filter Design and Simulation. Can any body tell me if i can use simulink for this purpose? ...

=?ISO-2022-JP?B?SW50ZXJuZXQgc2VjcmV0cxskQiEnGyhCVGhlIG5vYm9keSBrbm93IG9mIHBsYWNl?= #2
We engaged in the development of the depth of resources,Now we need to expand personnel. If you are interested, we can exchange. More information, visit: http://www.ivoivo.cn ...

US-TX-Austin: Engineering Assoc. 2, 2+yrs exp, BSEE, SCADA, TX DL; 6M (45345757606)
US-TX-Austin: Engineering Assoc. 2, 2+yrs exp, BSEE, SCADA, TX DL; 6M (45345757606) =================================================================================== Position: Engineering Assoc. 2 Reference: SMC02004 Location: Austin TX Duration: 6M Skills: 1-2 year of overall exp. Must posses a BA in Electrical Engineering or related field. Experience in electric utility relay protection, SCADA, fault recording and metering is desireable. Ability to effectively use spreadsheets, databases and other ...

help with for loop #2
i have a matrix with numbers of -1 and 1 i want to switch them, in communication i.e. map them using the binary shift keying at the receiver side. I should get 1 for 1 and -1 should equal 0. I have written the for loop but what seems to be the problem it doesnt work for all of the numbers code: debpsk=[-1 1 -1 -1 -1 -1 1 1 1 1 1 -1 ]; k=1; i=1; D=[]; for i=1:length(debpsk) a=debpsk(i); if a==-1 D(1,k)=0; else D(1,k)=1; end k=k+1; i=i+1; end debpsk D your help will be greatly appreciated i just tried your snippet and got this ...

shortest distance algorithm
Hello SAS Users, I am looking for an efficient way to find the closest dealer location for every customer in our db. We have a customer table (37 mil unique customers) and a dealer table (5000 unique dealers). Customer table has the latitude & the longitude of the customer location in decimal degrees and the Dealer table has the latitude & the longitude of the dealer location in decimal degrees I was able to get the formula for calculating the distance between two points based on lat & long from wiki. Is there a way other than using the brute force to get the shortest dealer...

ALgorithm Solution
Dear ALL : I try to set up a simulation coding. THe formula I am with is like SUMi (SUMj(SUMk(SUM..))) (Ai*Bj*Ck....) Let n= number of sums. THe problem is n is not fixed, which is really depend on the input variable. Now my question is how to develop such kind of algorithm. I can not figure it out. Thanks for any comments. Bin yezi wrote: > Dear ALL : > > I try to set up a simulation coding. THe formula I am with is like > > SUMi (SUMj(SUMk(SUM..))) (Ai*Bj*Ck....) > > Let n= number of sums. > THe problem is n is not fixed, which is really depend on the inp...

parsing HTML #2
Hi All: I'm working on a mini HTML parser. Basically, what I need to do is to take a HTML file and parse thru it. I want to pick out all of the text that is between table data tags <td> and </td> and all of the text between list item tags <li> and </li>. Since, its possible that a line of HTML could have no spaces at all like the below: <tr><td>SomeFixture</td></tr> I'm thinking that I'm going to need to read the HTML file one line at a time. Then look for < and its closing >. If the text between the two is td or li, t...

US-TX-Austin: Digital Design Eng., 5+yrs related DSP exp., algorithm; Perm , (45333014406)
US-TX-Austin: Digital Design Eng., 5+yrs related DSP exp., algorithm; Perm , (45333014406) ========================================================================================== Position: Digital Design Eng. Reference: SMC01825 Location: Austin TX Duration: Perm Skills: Both require a min of 5 Years Related DSP Experience Masters in E.E. , PhD a plus Filter design DSP algorithm Fixed point implementation Mapping algorithms to digital implementation Micro coding/firmware...

STL algorithm problem vector<vector<double> > and find
Hi I'm trying to implement a vector of vectors where find can be used to find a vector<double> in the vectors of vectors, that is hard to understand i guess. What I mean is that I got a vector foo containing vectors of the size 3. I then want to compare a vector<double> of size 3 (coord) with foo to find a sequence of elements in foo that equals coord. However, when I try this it returns when just one of the element of coord equals one element in foo. I just can't figure this out, is it possible to do this in any way ? Example of what I want: vector<double> coord(...

Error during startup of 7.4.2 database
This is a multi-part message in MIME format. ------=_NextPart_000_0069_01C41D57.A36E4690 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit I have just installed 7.4.2 and initialized a database using the default values. When I start the database It fails with the following message: FATAL: invalid value for parameter "lc_messages": "en_US" Looking at the postgresql.conf file I see the following lines: # These settings are initialized by initdb -- they may be changed lc_messages = 'en_US' # locale...

Bind 9.2.2
Hi. I have OpenBSD v3.3 i386 install of a fresh system. I've been trying to configure Bind v9.2.2. Bind seems to resolve external domains or ips just fine. But my internal network it does not. I'm getting an error message from Bind (snipped from /var/log/daemon), zone domainname.com/IN: loading master file /var/named/etc/domainname.com.hosts: file not found. Yes the file is there and yes Bind is running as the Named user. The directory structure under /var/named/ is mostly owned by root but in group named. All this was already done for me by OpenBSD crew. Any ideas...

Levenberg Marquardt
Can anyone recommend a good text that describes exactly and in detail the Levenberg Marquardt Algorithm? Thanks >Richard wrote: > > Can anyone recommend a good text that describes exactly and > in detail the Levenberg Marquardt Algorithm? > > Thanks How about Numerical Recipes? <http://www.library.cornell.edu/nr/bookcpdf/c15-5.pdf> Ken ...

How to multicast on more then one network card #2
Hello, I face the problem in multicast when the machine having two network card and each card is attached to different LAN. In this situation I can multicast by default on only one network card and the device which are attached on first LAN can receive the message. But ideally the device connected on both the LAN could receive the message. So here what should I do to multicast on all the attached network cards? For multicast I used IP: "224.0.0.10" and Port: 32000 Thanks in advance for your answer and time Regards, Kalpesh. ...

HPLASTJOB and HPLASTSPID problem #2
Thanks Paul and to all who responded -- Yes, that's exactly what is happening. The program is calling HPCIGETVAR prior to the job logging on. Bummer. A minor problem but more of a pain than anything else. Thanks again. Brian. << I suspect that the job has to be in the 'exec' state in order for its $stdlist to be opened and thus the HPLASTSPID to contain a valid value. A quick test, raised the jobfence to where the new job went into the 'deferred' state, seems to confirm it. Could it be that your call occurs before the job has ...