From: XIN LI <xli16@jh...>  20070430 21:17:13
Attachments:
Message as HTML

Hello,I am using vxl1.8.0. I would like to get the jacobian of a matrix. Could you please tell me which class I should use to get the jacobian matrix?Thanks!Xin 
From: XIN LI <xli16@jh...>  20070430 21:17:13
Attachments:
Message as HTML

Hello,I am using vxl1.8.0. I would like to get the jacobian of a matrix. Could you please tell me which class I should use to get the jacobian matrix?Thanks!Xin 
From: Ian Scott <ian.scott@st...>  20070501 08:15:32

Li, This probably isn't what you want to hear but  are you sure you understand what you are asking for? The Jacobian is traditionally defined on a vector function Y=F(X), where Y in a m element vector and X is an n element vector. The Jacobian is the matrix of first derivatives of Y, w.r.t. to each element in X, dY_i J_ij = ____ dX_J (or possibly the transpose  I can't remember) You can talk about an analogous Jacobian of a matrix, but usually after defining a flattening of the matrix into a vector, and then defining the variables against which you want to calculate the derivative. The are plenty of other meanings of "the Jacobian of a matrix", e.g. assuming the matrix is a Hessian of F, its square is a rough approximation to the Jacobian. The code to perform these calculations is available in VXL, but not as a simple class, since the implementation depends on what exactly you mean by "Jacobian of a matrix" Ian. XIN LI wrote: > Hello, > > I am using vxl1.8.0. I would like to get the jacobian of a matrix. > Could you please tell me which class I should use to get the jacobian > matrix? > > Thanks! > > Xin > 
From: Peter Vanroose <peter_vanroose@ya...>  20070501 09:47:10

Ian Scott wrote: > There are plenty of meanings of "the Jacobian of a matrix" The Jacobian of a (coordinate) transformation is welldefined. And a linear transformation can be represented by a transformation matrix. So most probably that's what is meant by "the Jacobian of a matrix"? (See, e.g., http://math.etsu.edu/MultiCalc/Chap3/Chap35/index.htm) The Jacobian is then itself a transformation matrix representing the (linear) transformation between derivatives (or tangent vectors) in the two coordinate frames.  Peter. __________________________________________________________ Hitta din nästa resa på Yahoo! Shopping. Jämför pris på flygbiljetter och hotellrum här: http://shopping.yahoo.se/b/a/c_169901_resor_biljetter.html 
From: Peter Vanroose <peter_vanroose@ya...>  20070501 10:28:29

A logical place to implement the Jacobian of a transformation matrix would be in the class vcsl_matrix. I personally don't think core/vnl would be a good place for this since "vnl_matrix" is not necessarily a transformation matrix, and Jacobians clearly have transformation semantics. Implementations for the Jacobian of several transformations are already in contrib/rpl/rgrl/; see especially the functions proj_jac_wrt_loc() and jacobian_wrt_loc(). Comments? Suggestions? Alternatives?  Peter. __________________________________________________________ Hitta din nästa resa på Yahoo! Shopping. Jämför pris på flygbiljetter och hotellrum här: http://shopping.yahoo.se/b/a/c_169901_resor_biljetter.html 
From: Ian Scott <ian.scott@st...>  20070501 15:58:32

This is a simple forwarddifferences Jacobian estimator. I've modified it a little to reduce the required context, so it hasn't been directly tested. You can get better estimates using central or higherorder differences. vnl_matrix<double> forward_differences( my_functor_t& f, // the function vnl_vector<double> x_0, // the central point const vnl_vector<double> &scale) // the measurement scale. { vnl_vector<double> r_0 = f(x_0); unsigned nr = r_0.size(); unsigned nx = x_0.size(); vnl_matrix<double> jacobian(nr, nx); for (unsigned i=0; i<nx; ++i) { vnl_vector<double> x=x_0; x(i) += scale(i); rf_inst.set_x(x); vnl_vector<double> r=rf_inst.calc_residual(); vnl_vector<double> dr = r  r_0; dr /= scale(i); jacobian.set_column(i, dr); } return jacobian; } XIN LI wrote: > Hello, > > Sorry. I should say that I would like to get the jacobian matrix of a vector value function. Just as the traditional definition of Jacobian. > > Could you please tell me how to implement this funcion using VXL library? > > Thank you very much! > > Xin > > > >  Original Message  > From: Ian Scott <ian.m.scott@...> > Date: Tuesday, May 1, 2007 4:15 am > Subject: Re: [Vxlusers] question about jacobian > To: XIN LI <xli16@...> > Cc: VXL users <vxlusers@...> > > >> Li, >> >> This probably isn't what you want to hear but  are you sure you >> understand what you are asking for? >> >> The Jacobian is traditionally defined on a vector function Y=F(X), >> where >> Y in a m element vector and X is an n element vector. >> >> The Jacobian is the matrix of first derivatives of Y, w.r.t. to each >> >> element in X, >> >> dY_i >> J_ij = ____ >> dX_J >> >> (or possibly the transpose  I can't remember) >> >> You can talk about an analogous Jacobian of a matrix, but usually >> after >> defining a flattening of the matrix into a vector, and then defining >> the >> variables against which you want to calculate the derivative. >> >> The are plenty of other meanings of "the Jacobian of a matrix", e.g. >> >> assuming the matrix is a Hessian of F, its square is a rough >> approximation to the Jacobian. >> >> The code to perform these calculations is available in VXL, but not >> as a >> simple class, since the implementation depends on what exactly you >> mean >> by "Jacobian of a matrix" >> >> Ian. >> >> XIN LI wrote: >> > Hello, >> > >> > I am using vxl1.8.0. I would like to get the jacobian of a matrix. >> >> > Could you please tell me which class I should use to get the >> jacobian >> > matrix? >> > >> > Thanks! >> > >> > Xin >> > 