Filter Near-Zero Matrix Elements: Reasonable?

  • Context: Graduate 
  • Thread starter Thread starter Mr Peanut
  • Start date Start date
  • Tags Tags
    Elements Matrix Zero
Click For Summary
SUMMARY

The discussion centers on the method for filtering near-zero matrix elements in a matrix A(m,n) using the Frobenius Norm (fNorm) and machine epsilon (eps). The proposed condition for setting elements to zero is if the absolute value of Aij is less than fNorm multiplied by eps and a power p. However, this approach is deemed unreasonable without understanding the source of floating point errors, particularly in matrices where small off-diagonal terms may hold significance, such as in the example matrix with large magnitude elements. For further reading, advanced references can be found in LAPACK's documentation.

PREREQUISITES
  • Understanding of Frobenius Norm (fNorm)
  • Knowledge of machine epsilon (eps) in numerical analysis
  • Familiarity with floating point error concepts
  • Basic matrix theory and operations
NEXT STEPS
  • Research LAPACK documentation for advanced matrix operations
  • Study the implications of floating point errors in numerical computations
  • Explore techniques for handling noise in numerical matrices
  • Learn about matrix conditioning and its effects on numerical stability
USEFUL FOR

Mathematicians, data scientists, and engineers working with numerical methods and matrix computations, particularly those interested in optimizing matrix operations and understanding floating point precision issues.

Mr Peanut
Messages
30
Reaction score
0
Given A(m,n), eps = Machine Epsilon, fNorm = FrobeniusNorm(A), p >= 1

To filter noise near zero created by floating point error:

if (|Aij| < fNorm * eps *p)
Aij =0
end if

Seem reasonable?
 
Physics news on Phys.org
it's not reasonable, unless you know something more about where the "floating point errors" came from.

In some circumstances a matrix like ##\begin{pmatrix}10^{100} & 10^{-100} \\ 0 & 2 \times 10^{100} \end{pmatrix}## may be perfectly "well behaved", and the small off-diagonal term might be important.

A good (advanced) reference is some of the papers in http://www.netlib.org/lapack/lawns/
 

Similar threads

  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 17 ·
Replies
17
Views
7K
  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
Replies
2
Views
2K
  • · Replies 16 ·
Replies
16
Views
4K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 3 ·
Replies
3
Views
2K