Re: Minimisation Problem
- To: mathgroup at smc.vnet.net
- Subject: [mg40814] Re: [mg40803] Minimisation Problem
- From: sean kim <shawn_s_kim at yahoo.com>
- Date: Sat, 19 Apr 2003 23:00:51 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
i just realized that the function you want to minimize is the altchisquare function not the f(x, p) but the idea of gradient descent should be sound as far as i can tell. you have this altchi function that depends on the values of p? and then altchi function will vary depending on the choices of the paraemter p and p+i. what you could do is to define a numerical derivative with a set increment i. so that what you have is the (alchif(p) - altchi(p+i))/ i if this is greater than 0 then it means the direction of the incrememnt is giving youa postitive derivative or your are moving uphill on the difference function or score fuction or your altchi function. if this is less than 0 then it means that you are moving downhill which is what you want to get to the minimum. I would implement this using If statements then again i'm new to mathemtica or programming for that matter and i don;t know too many tricks of tips... then it should look something like this. daltchifdp_i = (altchisq(x, p) - altchisq(x,p+i))/ i; If[daltchifdp_i <0, p = p+i, p = p-i] Last if statement says if the derivative is less than 0 then accept the move you have made in increment i. if npt, then make the make the opposite move. you would have to figure out how to implement the part about the altchisq thing. and how to perturb it using the increment i in the parameter vector. hope that helps a bit more. sean ===== when riding a dead horse, some dismount. while others... buy a new whip. which one might you be? __________________________________________________ Do you Yahoo!? The New Yahoo! Search - Faster. Easier. Bingo http://search.yahoo.com