Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8763855
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T15:52:55+00:00 2026-06-13T15:52:55+00:00

Given the input-output function in the matrix form: |y1| = |p1 p2| |x1| |p5|

  • 0

Given the input-output function in the matrix form:

|y1|   =  |p1  p2|   |x1|     |p5| 
|y2|    = |p3  p4| * |x2|  +  |p6|

with p1−p6 parameters.I want to minimize the least square error using Gauss-Newton method. Suppose we have 100 measurements. My question is about calculation and size of residual vector.

|r1|   |y1|  ( |p1  p2|   |x1|   |p5| )
|r2| = |y2| -( |p3  p4| ∗ |x2| + |p6| )

ri= output − f(input,parameters)

err = Sum(ri2)

In order to calculate parameters with minimized-error, we have:

pi+1=pi + Δ

Δ= (JT*J)-1 * JT * ri

I think the size of each is as follows:

input vector(x) : 100×2

output vector(y): 100×2

resuidual (r) : 100×2

Jacobian (J) : 100×6

parameters(pi) : 6×1 (six parameters)

As you can see, the size of Δ would be 6×2 that seems not consistent with p_i+1
Now is my residual vector calculation process correct? if yes how can I compute parameter’s vector? And if not what is the correct answer?

Another thing is the way of calculation J (Jacobian) with respect to parameters matrix.

Thank you so much.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T15:52:56+00:00Added an answer on June 13, 2026 at 3:52 pm

    The Delta vector is the same size as the parameter vector.

    In fact in this case one can solve for the parameters without doing a full least squares. Unfortunately I’ve not been able to find a reference on the web, so I’ve attempted to explain the method:

    We want to find a matrix M and a vector t so that, given N points Y[] and and N points X[], the error S is as small as possible, where

    S = Sum{ i | (Y[i]-M*X[i]-t)'*(Y[i]-M*X[i]-t)}
    

    (‘ is transpose).

    The drill is:

    a/ compute the average Y^ of the Y[] and subtract it from each Y[i], getting y[i]

    b/ compute the average X^ of the X[] and subtract it from each X[i], getting x[i]

    c/ compute the matrices

    A = Sum{ i | y[i]*x[i]'} 
    

    and

    C = Sum{ i | x[i]*x[i]'}
    

    d/ if C is not invertible (which means that all the X[] lie on a line) you’re a bit
    stuck, or at least this method fails; otherwise compute

    M = A*inverse(C)
    

    e/ finally, compute

    t = Y^-M*X^
    

    Why does this work?

    First off, if we think of M as fixed, then it’s easy to see that the t that minimises S is just the average of the Y[i]-M*X[i]; so we may as well use this t when finding M. Substituting t into the formula for S we get

    S = Sum{ i | (y[i]-M*x[i])'*(y[i]-M*x[i])}
    

    Now let Tr() denote the function that maps a matrix to its trace (the sum of the diagonal elements). A trick that is quite often useful is that for a vector v we have

    v'*v = Tr( v'*v) = Tr( v*v')
    

    Applying this to S, and expanding the product, we get

    S = Sum{ i | y[i]'*y[i]} - Tr( A*M') - Tr( M*A') + Tr( M*C*M')
    

    If C is invertible we can complete the square and get (here D = inverse(C))

    S = Sum{ i | y[i]'*y[i]} - Tr( A*D*A') + Tr( (M-A*D)*C*(M-A*D)'}
    

    The first two terms don’t depend on M; the third is never negative and can be
    made zero by choosing M=A*D.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Desired Output I want a function to return a list such that, given a
Given an STL vector, output only the duplicates in sorted order, e.g., INPUT :
So given this input string: =?ISO-8859-1?Q?TEST=2C_This_Is_A_Test_of_Some_Encoding=AE?= And this function: private string DecodeSubject(string input) {
Suppose that my Haskell function is given an input, which is supposed to be
For a given SQL stored proc or function, I'm trying to obtain its input
I'm trying to write a function that checks if the given input holds any
Using eigen2 , and given a matrix A a_0_0, a_0_1, a_0_2, ... a_1_0, a_1_0,
Given a multiple-input MATLAB function out=f(in1, in2) I would like to write a second
Is it possible to read alphanumeric characters only from the given input line ignoring
I need to retrieve a regex pattern matched strings from the given input. Lets

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.