shauli-ravfogel / nullspace_projection

MIT License
87 stars 21 forks source link

Nullspace, sign change #2

Closed shivashankarrs closed 3 years ago

shivashankarrs commented 4 years ago

Thanks for the work and code repo. I have a query here (maybe a minor one), what is the effect of changing sign based on first basis value (w_basis = w_basis * np.sign(w_basis[0][0])).

shauli-ravfogel commented 3 years ago

Hi, and sorry for the late response.

Scipy's orth uses SVD, and there is an inherent sign ambiguity associated with SVD, see here. However, since the rowspace is is the same regardless of the sign of its basis vectors, we can safely remove this line from the code.

shivashankarrs commented 3 years ago

Thanks for the reference :)