this post was submitted on 04 Dec 2023
1 points (100.0% liked)

Machine Learning

1 readers
1 users here now

Community Rules:

founded 11 months ago
MODERATORS
 

Can someone help me understand how to rotate a vector A by some angle from vector B, both of size 512?

I have a feature vector that is compared to a basis vector which are the weights being updated, to do that an angle is calculated between the two vector’s and compared to ground truth. I would like reconstruct the feature vector by moving the basis vector by some angle, I’m not sure if rotation in higher dimensional space makes sense or if it’s better to try to learn that reconstruction

top 6 comments
sorted by: hot top controversial new old
[–] masonwilde@alien.top 1 points 9 months ago

https://en.wikipedia.org/wiki/Rotation_matrix would be a great place to start to get a good idea of how you can use a rotation matrix to rotate a vector in 2 or 3 dimensions.

https://stackoverflow.com/questions/22099490/calculate-vector-after-rotating-it-towards-another-by-angle-%CE%B8-in-3d-space This post seems to be roughly what you're looking for.

[–] fediverser@alien.top 1 points 9 months ago

This post is an automated archive from a submission made on /r/MachineLearning, powered by Fediverser software running on alien.top. Responses to this submission will not be seen by the original author until they claim ownership of their alien.top account. Please consider reaching out to them let them know about this post and help them migrate to Lemmy.

Lemmy users: you are still very much encouraged to participate in the discussion. There are still many other subscribers on !machinelearning@academy.garden that can benefit from your contribution and join in the conversation.

Reddit users: you can also join the fediverse right away by getting by visiting https://portal.alien.top. If you are looking for a Reddit alternative made for and by an independent community, check out Fediverser.

[–] slashdave@alien.top 1 points 9 months ago

To specify a rotation, you need both the axis of rotation, and the angle. Just the angle alone is ill-defined.

[–] Zahlii@alien.top 1 points 9 months ago

Even in 3D space, the number of vectors in a given angle to another vector are infinite, so which would you pick in an n dimensional space? In general calculating the angle between two vectors is a loss-introducing function (you take two sets of n numbers and condense it down to one). You can narrow it down to a set of N-1 linearly independent vectors that form a base of the given set of vectors in a given angle. Somebody with more linear algebra knowledge feel free to correct me.

[–] Smallpaul@alien.top 1 points 9 months ago

/r/learnmachinelearning

[–] PM_ME_YOUR_BAYES@alien.top 1 points 9 months ago

That's basic linear algebra