Best fit line with known offsets.











up vote
0
down vote

favorite
1












Hello all it's my first post on these forums so if I'm breaking any ettiqute feel free to let me know.



So it's been a few years since I took a linear algebra class in college but I remember using Total Least squares to find a best fit line with the errors in both the x and y variables to give you a line with errors that were perpendicular to the created line.



I'd like program something similar to this with the difference being that not all of my data points actually land on said line. Some of them are intentional perpendicular offsets on both sides of the line that have known distances.



I've searched the internet for a similar problem but I've yet to find anything similar. Maybe I don't know the right terms to search for.



Does this sound like a possible problem? Any nudge in right direction would be helpful.



Thanks in advance.



Calvin










share|cite|improve this question






















  • So did I understand correctly, that you want to do linear regression, but filter out some outliers?
    – Matti P.
    Nov 20 at 7:08










  • You could look into algorithms such as RANSAC or least trimmed squares.
    – Qidi
    Nov 20 at 7:12










  • No not quite. Let me add some context. I am a land surveyor and I have found monuments along a straight line in the center of a roadway. I have also found monuments at the edge of the road that are 25 foot offsets. I'd like to use both the centerline monuments and the right-of-way monuments to best fit a line.
    – andHobbes
    Nov 20 at 7:14






  • 1




    If you know what offsets they (are supposed to) have, why not just move them by that offset, then do regular linear regression?
    – Arthur
    Nov 20 at 7:17










  • I know the amount they need to be moved but not the direction because the offsets are perpendicular to the line I'm attempting to create. My data set is a group of x,y coordinate pairs with an offset component of 0 for on line or -25 for 25 feet left of the line or 25 for 25 feet right of the line.
    – andHobbes
    Nov 20 at 7:24















up vote
0
down vote

favorite
1












Hello all it's my first post on these forums so if I'm breaking any ettiqute feel free to let me know.



So it's been a few years since I took a linear algebra class in college but I remember using Total Least squares to find a best fit line with the errors in both the x and y variables to give you a line with errors that were perpendicular to the created line.



I'd like program something similar to this with the difference being that not all of my data points actually land on said line. Some of them are intentional perpendicular offsets on both sides of the line that have known distances.



I've searched the internet for a similar problem but I've yet to find anything similar. Maybe I don't know the right terms to search for.



Does this sound like a possible problem? Any nudge in right direction would be helpful.



Thanks in advance.



Calvin










share|cite|improve this question






















  • So did I understand correctly, that you want to do linear regression, but filter out some outliers?
    – Matti P.
    Nov 20 at 7:08










  • You could look into algorithms such as RANSAC or least trimmed squares.
    – Qidi
    Nov 20 at 7:12










  • No not quite. Let me add some context. I am a land surveyor and I have found monuments along a straight line in the center of a roadway. I have also found monuments at the edge of the road that are 25 foot offsets. I'd like to use both the centerline monuments and the right-of-way monuments to best fit a line.
    – andHobbes
    Nov 20 at 7:14






  • 1




    If you know what offsets they (are supposed to) have, why not just move them by that offset, then do regular linear regression?
    – Arthur
    Nov 20 at 7:17










  • I know the amount they need to be moved but not the direction because the offsets are perpendicular to the line I'm attempting to create. My data set is a group of x,y coordinate pairs with an offset component of 0 for on line or -25 for 25 feet left of the line or 25 for 25 feet right of the line.
    – andHobbes
    Nov 20 at 7:24













up vote
0
down vote

favorite
1









up vote
0
down vote

favorite
1






1





Hello all it's my first post on these forums so if I'm breaking any ettiqute feel free to let me know.



So it's been a few years since I took a linear algebra class in college but I remember using Total Least squares to find a best fit line with the errors in both the x and y variables to give you a line with errors that were perpendicular to the created line.



I'd like program something similar to this with the difference being that not all of my data points actually land on said line. Some of them are intentional perpendicular offsets on both sides of the line that have known distances.



I've searched the internet for a similar problem but I've yet to find anything similar. Maybe I don't know the right terms to search for.



Does this sound like a possible problem? Any nudge in right direction would be helpful.



Thanks in advance.



Calvin










share|cite|improve this question













Hello all it's my first post on these forums so if I'm breaking any ettiqute feel free to let me know.



So it's been a few years since I took a linear algebra class in college but I remember using Total Least squares to find a best fit line with the errors in both the x and y variables to give you a line with errors that were perpendicular to the created line.



I'd like program something similar to this with the difference being that not all of my data points actually land on said line. Some of them are intentional perpendicular offsets on both sides of the line that have known distances.



I've searched the internet for a similar problem but I've yet to find anything similar. Maybe I don't know the right terms to search for.



Does this sound like a possible problem? Any nudge in right direction would be helpful.



Thanks in advance.



Calvin







linear-algebra least-squares






share|cite|improve this question













share|cite|improve this question











share|cite|improve this question




share|cite|improve this question










asked Nov 20 at 7:01









andHobbes

11




11












  • So did I understand correctly, that you want to do linear regression, but filter out some outliers?
    – Matti P.
    Nov 20 at 7:08










  • You could look into algorithms such as RANSAC or least trimmed squares.
    – Qidi
    Nov 20 at 7:12










  • No not quite. Let me add some context. I am a land surveyor and I have found monuments along a straight line in the center of a roadway. I have also found monuments at the edge of the road that are 25 foot offsets. I'd like to use both the centerline monuments and the right-of-way monuments to best fit a line.
    – andHobbes
    Nov 20 at 7:14






  • 1




    If you know what offsets they (are supposed to) have, why not just move them by that offset, then do regular linear regression?
    – Arthur
    Nov 20 at 7:17










  • I know the amount they need to be moved but not the direction because the offsets are perpendicular to the line I'm attempting to create. My data set is a group of x,y coordinate pairs with an offset component of 0 for on line or -25 for 25 feet left of the line or 25 for 25 feet right of the line.
    – andHobbes
    Nov 20 at 7:24


















  • So did I understand correctly, that you want to do linear regression, but filter out some outliers?
    – Matti P.
    Nov 20 at 7:08










  • You could look into algorithms such as RANSAC or least trimmed squares.
    – Qidi
    Nov 20 at 7:12










  • No not quite. Let me add some context. I am a land surveyor and I have found monuments along a straight line in the center of a roadway. I have also found monuments at the edge of the road that are 25 foot offsets. I'd like to use both the centerline monuments and the right-of-way monuments to best fit a line.
    – andHobbes
    Nov 20 at 7:14






  • 1




    If you know what offsets they (are supposed to) have, why not just move them by that offset, then do regular linear regression?
    – Arthur
    Nov 20 at 7:17










  • I know the amount they need to be moved but not the direction because the offsets are perpendicular to the line I'm attempting to create. My data set is a group of x,y coordinate pairs with an offset component of 0 for on line or -25 for 25 feet left of the line or 25 for 25 feet right of the line.
    – andHobbes
    Nov 20 at 7:24
















So did I understand correctly, that you want to do linear regression, but filter out some outliers?
– Matti P.
Nov 20 at 7:08




So did I understand correctly, that you want to do linear regression, but filter out some outliers?
– Matti P.
Nov 20 at 7:08












You could look into algorithms such as RANSAC or least trimmed squares.
– Qidi
Nov 20 at 7:12




You could look into algorithms such as RANSAC or least trimmed squares.
– Qidi
Nov 20 at 7:12












No not quite. Let me add some context. I am a land surveyor and I have found monuments along a straight line in the center of a roadway. I have also found monuments at the edge of the road that are 25 foot offsets. I'd like to use both the centerline monuments and the right-of-way monuments to best fit a line.
– andHobbes
Nov 20 at 7:14




No not quite. Let me add some context. I am a land surveyor and I have found monuments along a straight line in the center of a roadway. I have also found monuments at the edge of the road that are 25 foot offsets. I'd like to use both the centerline monuments and the right-of-way monuments to best fit a line.
– andHobbes
Nov 20 at 7:14




1




1




If you know what offsets they (are supposed to) have, why not just move them by that offset, then do regular linear regression?
– Arthur
Nov 20 at 7:17




If you know what offsets they (are supposed to) have, why not just move them by that offset, then do regular linear regression?
– Arthur
Nov 20 at 7:17












I know the amount they need to be moved but not the direction because the offsets are perpendicular to the line I'm attempting to create. My data set is a group of x,y coordinate pairs with an offset component of 0 for on line or -25 for 25 feet left of the line or 25 for 25 feet right of the line.
– andHobbes
Nov 20 at 7:24




I know the amount they need to be moved but not the direction because the offsets are perpendicular to the line I'm attempting to create. My data set is a group of x,y coordinate pairs with an offset component of 0 for on line or -25 for 25 feet left of the line or 25 for 25 feet right of the line.
– andHobbes
Nov 20 at 7:24















active

oldest

votes











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',
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%2f3006037%2fbest-fit-line-with-known-offsets%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown






























active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes
















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.





Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


Please pay close attention to the following guidance:


  • 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.


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%2f3006037%2fbest-fit-line-with-known-offsets%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

Probability when a professor distributes a quiz and homework assignment to a class of n students.

Aardman Animations

Are they similar matrix