When solving an overdetermined linear system, is it possible to weight the influence of each equation?












0












$begingroup$


Currently, I am calculating the pseudo-inverse to solve the system, which is simple and fast for my purpose (with a computer, obviously).
However, each equation represents an individual from a population.
For reasons outside the scope of this site, I need to give more importance to some individuals than others.



E.g., consider a total of $N$ individuals.
$0.1N$ would be special and have weight $2$.
The only way I can think of to accomplish that is to duplicate the $0.1N$ corresponding equations.
Since I am no math expert, I don't know if it is effective or with no effect at all.
If equation duplication is effective, ok, that's a solution, but with a minor problem: it does not allow to use non-integer weights.



obs.: I don't know for sure, but the answer for non-overdetermined linear systems might also apply.










share|cite|improve this question











$endgroup$












  • $begingroup$
    What is your goal and what do you mean by "weight"? You can, of course minimise another quantifier for the error other than sum of errors squared (the usual approach for an underdetermined system)...
    $endgroup$
    – AlexR
    Mar 12 '14 at 16:04










  • $begingroup$
    @AlexR question edited...
    $endgroup$
    – viyps
    Mar 12 '14 at 16:36
















0












$begingroup$


Currently, I am calculating the pseudo-inverse to solve the system, which is simple and fast for my purpose (with a computer, obviously).
However, each equation represents an individual from a population.
For reasons outside the scope of this site, I need to give more importance to some individuals than others.



E.g., consider a total of $N$ individuals.
$0.1N$ would be special and have weight $2$.
The only way I can think of to accomplish that is to duplicate the $0.1N$ corresponding equations.
Since I am no math expert, I don't know if it is effective or with no effect at all.
If equation duplication is effective, ok, that's a solution, but with a minor problem: it does not allow to use non-integer weights.



obs.: I don't know for sure, but the answer for non-overdetermined linear systems might also apply.










share|cite|improve this question











$endgroup$












  • $begingroup$
    What is your goal and what do you mean by "weight"? You can, of course minimise another quantifier for the error other than sum of errors squared (the usual approach for an underdetermined system)...
    $endgroup$
    – AlexR
    Mar 12 '14 at 16:04










  • $begingroup$
    @AlexR question edited...
    $endgroup$
    – viyps
    Mar 12 '14 at 16:36














0












0








0





$begingroup$


Currently, I am calculating the pseudo-inverse to solve the system, which is simple and fast for my purpose (with a computer, obviously).
However, each equation represents an individual from a population.
For reasons outside the scope of this site, I need to give more importance to some individuals than others.



E.g., consider a total of $N$ individuals.
$0.1N$ would be special and have weight $2$.
The only way I can think of to accomplish that is to duplicate the $0.1N$ corresponding equations.
Since I am no math expert, I don't know if it is effective or with no effect at all.
If equation duplication is effective, ok, that's a solution, but with a minor problem: it does not allow to use non-integer weights.



obs.: I don't know for sure, but the answer for non-overdetermined linear systems might also apply.










share|cite|improve this question











$endgroup$




Currently, I am calculating the pseudo-inverse to solve the system, which is simple and fast for my purpose (with a computer, obviously).
However, each equation represents an individual from a population.
For reasons outside the scope of this site, I need to give more importance to some individuals than others.



E.g., consider a total of $N$ individuals.
$0.1N$ would be special and have weight $2$.
The only way I can think of to accomplish that is to duplicate the $0.1N$ corresponding equations.
Since I am no math expert, I don't know if it is effective or with no effect at all.
If equation duplication is effective, ok, that's a solution, but with a minor problem: it does not allow to use non-integer weights.



obs.: I don't know for sure, but the answer for non-overdetermined linear systems might also apply.







linear-algebra






share|cite|improve this question















share|cite|improve this question













share|cite|improve this question




share|cite|improve this question








edited Mar 12 '14 at 16:35







viyps

















asked Mar 12 '14 at 15:55









viypsviyps

889




889












  • $begingroup$
    What is your goal and what do you mean by "weight"? You can, of course minimise another quantifier for the error other than sum of errors squared (the usual approach for an underdetermined system)...
    $endgroup$
    – AlexR
    Mar 12 '14 at 16:04










  • $begingroup$
    @AlexR question edited...
    $endgroup$
    – viyps
    Mar 12 '14 at 16:36


















  • $begingroup$
    What is your goal and what do you mean by "weight"? You can, of course minimise another quantifier for the error other than sum of errors squared (the usual approach for an underdetermined system)...
    $endgroup$
    – AlexR
    Mar 12 '14 at 16:04










  • $begingroup$
    @AlexR question edited...
    $endgroup$
    – viyps
    Mar 12 '14 at 16:36
















$begingroup$
What is your goal and what do you mean by "weight"? You can, of course minimise another quantifier for the error other than sum of errors squared (the usual approach for an underdetermined system)...
$endgroup$
– AlexR
Mar 12 '14 at 16:04




$begingroup$
What is your goal and what do you mean by "weight"? You can, of course minimise another quantifier for the error other than sum of errors squared (the usual approach for an underdetermined system)...
$endgroup$
– AlexR
Mar 12 '14 at 16:04












$begingroup$
@AlexR question edited...
$endgroup$
– viyps
Mar 12 '14 at 16:36




$begingroup$
@AlexR question edited...
$endgroup$
– viyps
Mar 12 '14 at 16:36










2 Answers
2






active

oldest

votes


















3












$begingroup$

If you have an overdetermined system of linear equations



$$Ax=b$$



you can weigh the error with a diagonal weight matrix $W$



$$e=W(Ax-b)$$



This matrix assigns different weights to each equation.
Now you can solve the problem by minimizing



$e^Te=(Ax-b)^TW^TW(Ax-b)$



which gives you a system of linear equations for $x$:



$$A^TW^TWAx=A^TW^TWb$$



This system can be solved for $x$ assuming matrix $A$ has full rank.






share|cite|improve this answer











$endgroup$













  • $begingroup$
    Perfect answer. Do you know any specific bibliographic reference for this?
    $endgroup$
    – viyps
    Mar 12 '14 at 17:18










  • $begingroup$
    Check out "weighted least squares": en.wikipedia.org/wiki/Least_squares#Weighted_least_squares
    $endgroup$
    – Matt L.
    Mar 12 '14 at 19:31



















1












$begingroup$

You can use a linear or non-linear fitting package. Normally these have a way to specify the measurement error of each point. Points with lower measurement error are weighted more heavily. A discussion is in chapter 15 of Numerical Recipes as well as most numerical analysis texts.






share|cite|improve this answer









$endgroup$













    Your Answer





    StackExchange.ifUsing("editor", function () {
    return StackExchange.using("mathjaxEditing", function () {
    StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
    StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
    });
    });
    }, "mathjax-editing");

    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "69"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    noCode: true, onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f709602%2fwhen-solving-an-overdetermined-linear-system-is-it-possible-to-weight-the-influ%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    3












    $begingroup$

    If you have an overdetermined system of linear equations



    $$Ax=b$$



    you can weigh the error with a diagonal weight matrix $W$



    $$e=W(Ax-b)$$



    This matrix assigns different weights to each equation.
    Now you can solve the problem by minimizing



    $e^Te=(Ax-b)^TW^TW(Ax-b)$



    which gives you a system of linear equations for $x$:



    $$A^TW^TWAx=A^TW^TWb$$



    This system can be solved for $x$ assuming matrix $A$ has full rank.






    share|cite|improve this answer











    $endgroup$













    • $begingroup$
      Perfect answer. Do you know any specific bibliographic reference for this?
      $endgroup$
      – viyps
      Mar 12 '14 at 17:18










    • $begingroup$
      Check out "weighted least squares": en.wikipedia.org/wiki/Least_squares#Weighted_least_squares
      $endgroup$
      – Matt L.
      Mar 12 '14 at 19:31
















    3












    $begingroup$

    If you have an overdetermined system of linear equations



    $$Ax=b$$



    you can weigh the error with a diagonal weight matrix $W$



    $$e=W(Ax-b)$$



    This matrix assigns different weights to each equation.
    Now you can solve the problem by minimizing



    $e^Te=(Ax-b)^TW^TW(Ax-b)$



    which gives you a system of linear equations for $x$:



    $$A^TW^TWAx=A^TW^TWb$$



    This system can be solved for $x$ assuming matrix $A$ has full rank.






    share|cite|improve this answer











    $endgroup$













    • $begingroup$
      Perfect answer. Do you know any specific bibliographic reference for this?
      $endgroup$
      – viyps
      Mar 12 '14 at 17:18










    • $begingroup$
      Check out "weighted least squares": en.wikipedia.org/wiki/Least_squares#Weighted_least_squares
      $endgroup$
      – Matt L.
      Mar 12 '14 at 19:31














    3












    3








    3





    $begingroup$

    If you have an overdetermined system of linear equations



    $$Ax=b$$



    you can weigh the error with a diagonal weight matrix $W$



    $$e=W(Ax-b)$$



    This matrix assigns different weights to each equation.
    Now you can solve the problem by minimizing



    $e^Te=(Ax-b)^TW^TW(Ax-b)$



    which gives you a system of linear equations for $x$:



    $$A^TW^TWAx=A^TW^TWb$$



    This system can be solved for $x$ assuming matrix $A$ has full rank.






    share|cite|improve this answer











    $endgroup$



    If you have an overdetermined system of linear equations



    $$Ax=b$$



    you can weigh the error with a diagonal weight matrix $W$



    $$e=W(Ax-b)$$



    This matrix assigns different weights to each equation.
    Now you can solve the problem by minimizing



    $e^Te=(Ax-b)^TW^TW(Ax-b)$



    which gives you a system of linear equations for $x$:



    $$A^TW^TWAx=A^TW^TWb$$



    This system can be solved for $x$ assuming matrix $A$ has full rank.







    share|cite|improve this answer














    share|cite|improve this answer



    share|cite|improve this answer








    edited Dec 8 '18 at 12:35

























    answered Mar 12 '14 at 16:59









    Matt L.Matt L.

    8,899822




    8,899822












    • $begingroup$
      Perfect answer. Do you know any specific bibliographic reference for this?
      $endgroup$
      – viyps
      Mar 12 '14 at 17:18










    • $begingroup$
      Check out "weighted least squares": en.wikipedia.org/wiki/Least_squares#Weighted_least_squares
      $endgroup$
      – Matt L.
      Mar 12 '14 at 19:31


















    • $begingroup$
      Perfect answer. Do you know any specific bibliographic reference for this?
      $endgroup$
      – viyps
      Mar 12 '14 at 17:18










    • $begingroup$
      Check out "weighted least squares": en.wikipedia.org/wiki/Least_squares#Weighted_least_squares
      $endgroup$
      – Matt L.
      Mar 12 '14 at 19:31
















    $begingroup$
    Perfect answer. Do you know any specific bibliographic reference for this?
    $endgroup$
    – viyps
    Mar 12 '14 at 17:18




    $begingroup$
    Perfect answer. Do you know any specific bibliographic reference for this?
    $endgroup$
    – viyps
    Mar 12 '14 at 17:18












    $begingroup$
    Check out "weighted least squares": en.wikipedia.org/wiki/Least_squares#Weighted_least_squares
    $endgroup$
    – Matt L.
    Mar 12 '14 at 19:31




    $begingroup$
    Check out "weighted least squares": en.wikipedia.org/wiki/Least_squares#Weighted_least_squares
    $endgroup$
    – Matt L.
    Mar 12 '14 at 19:31











    1












    $begingroup$

    You can use a linear or non-linear fitting package. Normally these have a way to specify the measurement error of each point. Points with lower measurement error are weighted more heavily. A discussion is in chapter 15 of Numerical Recipes as well as most numerical analysis texts.






    share|cite|improve this answer









    $endgroup$


















      1












      $begingroup$

      You can use a linear or non-linear fitting package. Normally these have a way to specify the measurement error of each point. Points with lower measurement error are weighted more heavily. A discussion is in chapter 15 of Numerical Recipes as well as most numerical analysis texts.






      share|cite|improve this answer









      $endgroup$
















        1












        1








        1





        $begingroup$

        You can use a linear or non-linear fitting package. Normally these have a way to specify the measurement error of each point. Points with lower measurement error are weighted more heavily. A discussion is in chapter 15 of Numerical Recipes as well as most numerical analysis texts.






        share|cite|improve this answer









        $endgroup$



        You can use a linear or non-linear fitting package. Normally these have a way to specify the measurement error of each point. Points with lower measurement error are weighted more heavily. A discussion is in chapter 15 of Numerical Recipes as well as most numerical analysis texts.







        share|cite|improve this answer












        share|cite|improve this answer



        share|cite|improve this answer










        answered Mar 12 '14 at 16:52









        Ross MillikanRoss Millikan

        294k23198371




        294k23198371






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Mathematics Stack Exchange!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            Use MathJax to format equations. MathJax reference.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f709602%2fwhen-solving-an-overdetermined-linear-system-is-it-possible-to-weight-the-influ%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            To store a contact into the json file from server.js file using a class in NodeJS

            Redirect URL with Chrome Remote Debugging Android Devices

            Dieringhausen