I am using spilu (incomplete LU decomposition for sparse matrix) in scipy: https://docs.scipy.org/doc/scipy-0.14.0/reference/generated/scipy.sparse.linalg.spilu.html

However there is an option call "fill_factor" which is quite unclear to me.

If fill_factor=100, does it mean the matrix is full; and fill_factor=50 means the matrix is half-full?

  • $\begingroup$ This is a question you should ask on the scipy forums. $\endgroup$ Mar 16, 2017 at 14:59
  • 1
    $\begingroup$ scipy.sparse.linalg.spilu is an interface to the SuperLU library & your parameter is well explained in the SuperLU manual. incomplete LU will generate some fill-in (i.e. the factors will have more non-zeros than the original matrix). the fill factor is the simply the expected fill-in ratio, which tells the algorithm how much memory to pre-allocate for the new non-zero elements. this may reduce (1) memory fragmentation and (2) the no of calls to malloc/free $\endgroup$
    – GoHokies
    Mar 16, 2017 at 22:13
  • $\begingroup$ @GoHokies Thank you! So how do we know a priori what value to choose for the fill_factor? Any rule of thumb, or only trial and error ? $\endgroup$
    – HappyMan
    Mar 17, 2017 at 13:26
  • $\begingroup$ ideally, you'd use your knowledge about the particular matrix structure, do some trial-and error experiments with smaller matrix sizes, perhaps do some re-ordering of rows/columns to reduce fill-in, etc. have a look at the SuperLU manual... $\endgroup$
    – GoHokies
    Mar 17, 2017 at 16:19