Request minimum rank in LowRankApprox.jl?

I’m using the id method (interpolative decomposition or ID) from the LowRankApprox.jl package. In the algorithm I’m trying to program (a variant of the “tensor cross interpolation”, reviewed in depth in this article which uses a kind of two-sided ID), it would be very helpful to be able to request a minimum rank k.

This way, the output matrices C and Z would be such that C would be guaranteed to contain at least k columns of the original matrix.

Currently, I’m just setting the rtol parameter and because of how my algorithm works, sometimes I am only getting C to have single column of the original matrix since it’s part of a kind of alternating optimization outer algorithm and the matrices I’m computing the ID of have approximate low rank early on in the algorithm, which is an artifact of my initial parameter choice. I could try to choose the parameters differently but it might be technical to do whereas just pushing up the rank of the matrices returned from the ID might be a sort of general, automatic solution.

Thanks to LowRankApprox developer @dlfivefifty or anyone else who might help.

I wasn’t the developer just became the maintainer

If you look at the commit history you’ll find the author of the code. Otherwise you could try asking Mikael Slevinsky who knows something about ID

At a quick glance through the code, it seems like the termination check is here, and maybe you could just change this to something like

if jn-1 > minrank && abs(A[jn-1,jn-1]) <= ptol
    @inbounds for i = max(minrank+1, j):jn-1
        abs(A[i,i]) <= ptol && return i - 1
    end
end

Thanks for the helpful information & tips. I did try modifying the code myself earlier and it gave the desired result, but then also caused some occasional crashes that I didn’t investigate fully. Now I’ve since gone with a custom implementation of a different, but related matrix factorization.