Mistake: the biggest weight in a factor vector drives the component
“Neuron 12 has the biggest weight in this factor, so it drives the component.”
a, b, c = np.array([1., 2.]), np.array([3., 4.]), np.array([5.])
t1 = np.einsum("i,j,k->ijk", a, b, c)
t2 = np.einsum("i,j,k->ijk", 2 * a, b / 2, c)
assert np.allclose(t1, t2) # the tensor did not move
lam = np.linalg.norm(a) * np.linalg.norm(b) * np.linalg.norm(c)
Double one vector and halve another and the rank-1 tensor does not move, so a factor vector’s magnitude is arithmetic, not data. Only two things are readable: the unit-norm profile — the shape of the peaks and troughs — and one weight holding all the size, the product of the three norms. The notebook calls it lam; tensorly returns it as weights.
Normalise before you compare two components, or before you name a peak.