I have data that shows the strength of an effect for 4 conditions over multiple features. (For each Features the Effect are always the same sign) I want to find a way to order the features by the strength of the effect with a metric. In 2D I would make an orthogonal projection to the (1,1) line and use the distance of the projected point to the origin as a metric.
Is it possible to do the same thing in 4D?
I am not a very good mathematician, and I am really unsure about what I have done. I was hoping to use the Pythagoras theorem and the dot product but I am not sure if what I done is correct. So could you tell me if my solution is correct? and if it is not correct how to achieve my goal?
Here the 3 dimension representation of the problem
We have a 4 D space with axes orthogonal and origins O as (0,0,0,0)
We have a point $P(P_x, P_y, P_z, P_w)$ that represents a feature. I want to make an orthogonal projection over the line w(1x,1y,1z,1w). $R$ the point of the orthogonal projection of P over w. The distance $\lVert \vec{OR} \rVert$ is the score I look for. If Pythagoras is applicable then: $ \lVert \vec{OR} \rVert = \sqrt[2]{\lVert \vec{OP} \rVert^{2} - \lVert \vec{RP} \rVert^{2} }$
with $ \lVert \vec{RP} \rVert = \sin{\theta} * \lVert \vec{OP} \rVert $
and to get theta we use the dot product between $\vec{OP}$ and any point of w. let pick w1 the point (1,1,1,1).
$$ \theta = \arccos{ \frac{ \vec{Ow1} . \vec{OP}} {\lVert \vec{Ow1} \rVert * \lVert \vec{OP} \rVert }}$$
So in the end we obtain $$ \lVert \vec{OR} \rVert = \sqrt[2]{\lVert \vec{OP} \rVert^{2} - (\sin{\arccos{ \frac{ \vec{Ow1} . \vec{OP}} {\lVert \vec{Ow1} \rVert * \lVert \vec{OP} \rVert }}} * \lVert \vec{OP} \rVert) ^{2}} $$
I don't know if it matter but I plan to use euclidean distance.
