You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Notice that the same value of p (or q) can yield different results, depending on which norm one is talking about.
Optionally, add the following convenience wrappers:
nuclear_norm(x): Computes the nuclear norm.
frobenius_norm(x): Computes the Frobenius norm.
spectral_norm(x): Computes the spectral norm.
Rationale:
Currently, norm and matrix_norm conflate different norms into a single function. This is apparently a design mistake inherited from MATLAB. Such a design (1) creates unnecessary confusion and (2) prevents access to alternative values of p and q for each kind of norm. It would be nice if the standard rectified this situation.
Also, for vectors, the ord=0 "0-norm", which counts the number of nonzero elements, is a misnomer: It is not actually the limit of the p-norm as $p \to 0$. To count the number of nonzero elements, count_nonzero should be used instead.
The text was updated successfully, but these errors were encountered:
Proposal:
Deprecate the following functions:
norm
vector_norm
matrix_norm
Replace them with the following separate functions:
p_norm(x, p)
: Computes the p-norm:induced_norm(x, p, q)
: Computes the induced (p,q)-norm:entrywise_norm(x, p, q)
: Computes the entrywise (p,q)-norm:schatten_norm(x, p)
: Computes the Schatten p-norm:Notice that the same value of
p
(orq
) can yield different results, depending on which norm one is talking about.Optionally, add the following convenience wrappers:
nuclear_norm(x)
: Computes the nuclear norm.frobenius_norm(x)
: Computes the Frobenius norm.spectral_norm(x)
: Computes the spectral norm.Rationale:
Currently,
norm
andmatrix_norm
conflate different norms into a single function. This is apparently a design mistake inherited from MATLAB. Such a design (1) creates unnecessary confusion and (2) prevents access to alternative values ofp
andq
for each kind of norm. It would be nice if the standard rectified this situation.Also, for vectors, the$p \to 0$ . To count the number of nonzero elements,
ord=0
"0-norm", which counts the number of nonzero elements, is a misnomer: It is not actually the limit of the p-norm ascount_nonzero
should be used instead.The text was updated successfully, but these errors were encountered: