Statisics - linearity and best-fit in 3 dimensions

Click For Summary
SUMMARY

The discussion focuses on analyzing a set of 3D data points (X, Y, Z) to determine linearity and identify a line of best fit for gesture detection. Key methods mentioned include Pearson's correlation coefficient (Pearson's R) for testing linearity and the concept of total least squares regression for fitting a line to the data. The goal is to ascertain whether the data points fall along a line, which is crucial for initiating gesture detection based on linear motion. The conversation emphasizes the need for clarity in defining the problem and the statistical methods employed.

PREREQUISITES
  • Understanding of Pearson's correlation coefficient (Pearson's R)
  • Familiarity with linear regression techniques
  • Knowledge of total least squares regression
  • Basic concepts of 3D coordinate systems and motion tracking
NEXT STEPS
  • Research the application of Pearson's R in 3D data analysis
  • Explore total least squares regression for fitting lines in 3D space
  • Investigate methods for detecting linear motion in gesture recognition
  • Learn about the mathematical foundations of linear regression in multiple dimensions
USEFUL FOR

Data scientists, machine learning engineers, and developers working on gesture detection systems or analyzing 3D motion data will benefit from this discussion.

  • #31
Let's discuss an utterly simple method. Perhaps objections to it will clarify the problem further.

Let the data points be (x_i,y_i,z_i,t_i) for i = 1 to N. If this data represented a line perfectly parallel to the y-axis then the x and z values would remain constant while the y value varied.

If we have data from an imperfect line, we could estimate the line that the data is "trying to" follow in various ways. The simplest seems to be to estimate that the \hat{x} = the average of the x values in the data and \hat{z} = the average of the z values.

We can quantify the "error" that the imperfect data has in various ways. The one that comes to my mind first

\hat{\sigma^2} = (\frac{1}{N}) { \sum_{i=1}^N ( (\hat{x} - x )^2 + (\hat{z}-z)^2)}

Of course the idea is to classify the data as a gesture parallel to the y-axis when \hat{\sigma^2} is "small". What constitutes a small or large error would have to be determined empirically. You'd have to do a different test for each axis, but this is not an elaborate computation.

One weakness of this method is that it doesn't give any more credit to data that is a perfect straight line but slightly out-of-parallel vs data that is scattered. Is this weakness the reason that you are considering sophisticated statistical methods?
 

Similar threads

  • · Replies 11 ·
Replies
11
Views
3K
  • · Replies 2 ·
Replies
2
Views
1K
  • · Replies 10 ·
Replies
10
Views
3K
  • · Replies 1 ·
Replies
1
Views
4K
Replies
14
Views
11K
  • · Replies 3 ·
Replies
3
Views
4K
Replies
1
Views
2K
Replies
4
Views
2K
  • · Replies 1 ·
Replies
1
Views
5K
  • · Replies 1 ·
Replies
1
Views
4K