Retained energy
Retained energy — the share of squared amplitude kept by the top k singular values. Spanish: energía retenida.
E(k) = (σ₁² + … + σₖ²) / (σ₁² + … + σₙ²)
‖M − M_k‖²_F / ‖M‖²_F = 1 − E(k)
Energy is squared amplitude — a sum of squares, not a sum of singular values. And the second line is the identity the test checks: the relative squared error is exactly what the energy leaves behind.
For the all-zero tensor, retention is defined as 1 at every rank, since reconstruction is already exact.