Help with Calculating Hyperplanes in R^n

  • Context: Undergrad 
  • Thread starter Thread starter kouma
  • Start date Start date
Click For Summary

Discussion Overview

The discussion revolves around calculating hyperplanes in R^n, specifically focusing on how to derive a random hyperplane that divides a search space of data points into two half-spaces. Participants explore various methods and equations related to hyperplanes, addressing both theoretical and practical aspects of the topic.

Discussion Character

  • Exploratory
  • Technical explanation
  • Mathematical reasoning

Main Points Raised

  • One participant seeks assistance in calculating a random hyperplane to divide data points in R^n.
  • Another suggests selecting a coordinate and a fixed value to divide the data points based on that coordinate.
  • A participant proposes using the lowest and highest points in each dimension to randomly pick a point for splitting the search space.
  • Questions arise regarding the properties desired for the half-spaces, such as whether they should contain equal numbers of points or be randomly defined.
  • A participant explains the implicit equation of a hyperplane and how to determine which side of the hyperplane a point lies on using a chosen point and a perpendicular vector.
  • Further inquiries are made about deriving the vector for the hyperplane equation in a specific example with given points.
  • Concerns are raised about the applicability of the hyperplane equation in dimensions higher than three, leading to clarification that it generalizes to any n-dimensional space.

Areas of Agreement / Disagreement

Participants generally agree on the methods to derive a hyperplane and its properties, but there are varying opinions on the specifics of how to select points and vectors for the hyperplane. The discussion remains open regarding the best approach to achieve the desired properties of the half-spaces.

Contextual Notes

Participants express uncertainty about the implications of the hyperplane equation in higher dimensions and the conditions under which it applies. There is also a lack of consensus on the optimal method for selecting points and vectors for the hyperplane.

kouma
Messages
9
Reaction score
0
Hello Math friends,

I need some help in hyperplanes.

Basically, I need to calculate a random hyperplane that divides my search space, which consists of data points in R^n, into two hyperspaces. I know that a hyperplane is n-1 dimensionality, but how do I calculate it.

Thanks in advance!
 
Mathematics news on Phys.org
The easiest way would be to select a coordinate and choose a fixed value. Divide your data points according to whether that coordinate is > or < the fixed value.
 
That is what I was thinking also, I could simply take lowest and highest points from my data for each dimension, and randomly pick a point in-between that range, effectively splitting the search space into two half-spaces. But, I was wondering since I am asked to use a hyperplane to do this separation, is there an equation I can use to derive a random hyperplane.
 
What properties you want the two half-spaces to have? For example, you want that half of the points are in one side and the other half in the other side? Or maybe you want the hyperplane to be as close as possible, on average, to the points? Or you just want it completely random?
 
Completely random :)
 
...and after you have the hyperplane, the only thing you want to wnow is if each point is in one side or the other?
 
Exactly, do you know the equation/formula to derive a hyperplane from an R^n euclidean space?
 
An hyperplane is a surface that passes through a point [tex]x_0\in\mathbb{R}^n[/tex], and that is perpendicular to a certain vector [tex]u\in\mathbb{R}^n[/tex]. The implicit equation is

[tex]u\cdot(x-x_0)=0[/tex]

Where the dot is the usual euclidean scalar product. So you just have to choose [tex]x_0[/tex] and u randommly. After you have done this, to know if a certain point x lies in one side or the other of the plane, simply calculate [tex]u\cdot(x-x_0)[/tex]. If this is positive, then x is in the side u points to, if it's negative, it's in the opposite side, and if it's zero it's on the plane.
 
This is a great explanation, exactly what I wanted. I am going to deploy it and see how it works.

Is there a name to this equation that you posted?

Thank you so much for the help.
 
  • #10
kouma said:
Is there a name to this equation that you posted?

It is called: "implict equation of the hyperplane passing through x_o and perpendicular to u"!

:biggrin:
 
  • #11
Hello Petr,

Assume we have a R^3 euclidean space with the following points a = (1, 2, 3), b = (3, 4, 5), and c = (3, 5, 6). if I pick Xo = (2, 2, 2), how do I derive the vector u so that I can use the implicit hyperplane equation you mentioned.

Thanks!
 
  • #12
kouma said:
Hello Petr,

Assume we have a R^3 euclidean space with the following points a = (1, 2, 3), b = (3, 4, 5), and c = (3, 5, 6). if I pick Xo = (2, 2, 2), how do I derive the vector u so that I can use the implicit hyperplane equation you mentioned.

Thanks!

You can take whatever U you like (you said you wanted a completely random plane, right?)
For example, you may choose U = (1, 3, 4). Then the equation of the plane is

U . (X - Xo) = 1 . (x - 2) + 3. (y - 2) + 4 . (z - 2) = 0

in other words

x + 3y + 4z = 16

That's it. Very simple!
 
  • #13
Thanks again Petr for the great and simple explanation.

Now, I did some searching around and I read in some lecture that the implicit equation of a plane doesn't generalize to higher dimensions (higher than 3D), is this true? because my euclidean space will almost always be higher than 3D. If so, how can I generalize it to high dimensions.

Please advise, thanks.
 
Last edited:
  • #14
It applies to any n, as long as you want a n-1 dimensional affine space (linear space with origin translated), which is what we usually mean by "hyperplane". Don't worry, and go ahead with your calculations.
 

Similar threads

  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 10 ·
Replies
10
Views
3K
Replies
1
Views
2K
  • · Replies 2 ·
Replies
2
Views
4K
  • · Replies 7 ·
Replies
7
Views
3K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 2 ·
Replies
2
Views
1K
  • · Replies 2 ·
Replies
2
Views
2K