<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<META content="MSHTML 6.00.2800.1458" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=344165414-01052005><FONT face=Arial color=#0000ff size=2>Cause
different parameters might have different degrees of influence and the scales
are used to dictate those degrees. So a large scale for a paramter will restrict
influence of that parameter. See Page 268 of the SoftwareGuide2.0 at <A
href="http://itk.org/HTML/Documentation.htm">http://itk.org/HTML/Documentation.htm</A></FONT></SPAN></DIV>
<DIV><SPAN class=344165414-01052005><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN
class=344165414-01052005><FONT><!--StartFragment --></FONT></SPAN><SPAN
class=344165414-01052005><FONT face=Arial color=#0000ff
size=2>Thanks</FONT></SPAN></DIV>
<DIV><SPAN class=344165414-01052005><FONT face=Arial color=#0000ff
size=2>kk</FONT></SPAN></DIV>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
<DIV class=OutlookMessageHeader dir=ltr align=left><FONT face=Tahoma
size=2>-----Original Message-----<BR><B>From:</B>
insight-users-bounces@itk.org [mailto:insight-users-bounces@itk.org]<B>On
Behalf Of </B>ׯÏź£(Xiahai Zhuang)<BR><B>Sent:</B> Sunday, May 01, 2005 5:00
AM<BR><B>To:</B> insight-users@itk.org<BR><B>Subject:</B> [Insight-users]
AdvanceOneStep in
ClassGradientDescentOptimizer(itkGradientDescentOptimizer.cpp)<BR><BR></FONT></DIV>
<DIV>/**</DIV>
<DIV> * Advance one Step following the gradient direction</DIV>
<DIV> */</DIV>
<DIV> typedef Array< double>
ParametersType;</DIV>
<DIV> ParametersType m_currentPosition;</DIV>
<DIV>void</DIV>
<DIV>GradientDescentOptimizer</DIV>
<DIV>::AdvanceOneStep( void )</DIV>
<DIV>{ </DIV>
<DIV> </DIV>
<DIV> itkDebugMacro("AdvanceOneStep");</DIV>
<DIV>.....</DIV>
<DIV> </DIV>
<DIV> ScalesType scales = this->
GetScales();</DIV>
<DIV>...</DIV>
<DIV> </DIV>
<DIV> DerivativeType transformedGradient( spaceDimension ); </DIV>
<DIV> </DIV>
<DIV> for(unsigned int j = 0; j <
spaceDimension; j++)</DIV>
<DIV> {</DIV>
<DIV> transformedGradient[j] = m_Gradient[j] / scales[j]; //<FONT
style="BACKGROUND-COLOR: #ffff00"
color=#ff0000>?????????????????????? why here takes a (/scales[j])</FONT></DIV>
<DIV><FONT color=#ff0000> <FONT
color=#000000> }</FONT>
//as in method m_CostFunction->
GetValueAndDerivative(this-> GetCurrentPosition(), m_Value,
m_Gradient )m_Gradient derivative</FONT></DIV>
<DIV><FONT
color=#ff0000>
// m_Gradient is the derivative of MutualInformation with respect to transform
parameters,</FONT></DIV>
<DIV><FONT
color=#ff0000>
// why
transformedGradient[j] = m_Gradient[j] / scales[j]; </FONT></DIV>
<DIV> ParametersType newPosition( spaceDimension );</DIV>
<DIV> for(unsigned int j = 0; j <
spaceDimension; j++)</DIV>
<DIV> {</DIV>
<DIV> newPosition[j] = currentPosition[j] + </DIV>
<DIV> direction * m_LearningRate * transformedGradient[j];</DIV>
<DIV> }</DIV>
<DIV> </DIV>
<DIV> this-> SetCurrentPosition( newPosition );</DIV>
<DIV> </DIV>
<DIV> this-> InvokeEvent( IterationEvent() );</DIV>
<DIV> </DIV>
<DIV>}</DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV>¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡ÖÂ</DIV>
<DIV>Àñ£¡</DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV>¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡×¯Ïź£(Xiahai Zhuang)</DIV>
<DIV>¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡arhye@163.com</DIV>
<DIV>¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡2005-05-01</DIV>
<DIV> </DIV></BLOCKQUOTE></BODY></HTML>