It may be a well-known linear algebra question, but I don’t know the concepts to ask it well!
Suppose I am looking at a weight matrix. Is there a way to find whether and which columns are “nearly colinear”? And more generally, whether a group of columns is “nearly linear combinations” within itself?
My thought is to simplify a model’s size and computation, particularly if the layer is followed by a ReLU non-linearity.
Any leads to the right math topic are appreciated. And whether this idea has already been investigated.
Co-linearity can be found by using dot product of the column vectors which gives the cos of the angle between them.First normalize the column vectors and then take dot product. If the result is nearer to 1 then they are almost co-linear.
whether a group of columns is “nearly linear combinations” within itself?
Question is not clear.
Make a separate matrix with all the columns for which you need to test linear dependency. Now find the rank of the matrix. If rank is lower than the number of columns then there is a linear dependency and one or more columns are redundant.