0
$\begingroup$

I'm a newbie at data science and I want to ask how can I predict a set of coordinates from a set of input coordinates? That is (x1, y1) -> (x2, y2).

To give a bit of context, I am developing an eye tracker and I trying to map the coordinates of my eye to the coordinates of my gaze. My current implementation uses 2 linear regression models, 1 to predict x values and 1 to predict y values, but I am wondering if it is possible to directly predict both x and y values with 1 model.

Would appreciate any help! Thanks!

$\endgroup$

1 Answer 1

2
$\begingroup$

Using 2 different models for X and Y is not a good idea, since you are missing the correlation between the two. You are predicting new X coordinates based on old X coordinates and new Y coordinates based on old Y coordinates. What you want to do is predict new (x,y) based on old (x,y). So your intuition is correct that you should use one model and it is possible. What I would recommend is using a Kalman filter - you can read more about it here and an example implementation is found here.

$\endgroup$
2
  • 1
    $\begingroup$ Hi @Nemo_the_scientist, correct me if I'm wrong, but a Kalman filter estimates the current state based on the previous, for example, estimating the coordinates and/or velocity of a car based on the previous measured coordinates/velocity. In this case, I want to measure the gaze coordinates based on the eye coordinates. If I were to use a Kalman Filter, wouldn't I be using previously measured gaze coordinates to estimate the gaze coordinates? How would I then map the eye coordinates to the gaze coordinates? $\endgroup$ Jan 4, 2023 at 14:27
  • $\begingroup$ Yes, I believe you are right. In this case, you can use a multi-output regression algorithm, instead of the two models. I think that this tutorial might be of help. $\endgroup$ Jan 5, 2023 at 7:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.