r-barnes / faster-unmixer

A faster implementation of the sediment inverse/unmixing scheme proposed in Lipp et al (2021).
5 stars 1 forks source link

Need to be DPP #11

Closed r-barnes closed 1 year ago

r-barnes commented 1 year ago

This isn't DPP

def cp_log_ratio_norm(a, b):
    return cp.maximum(a / b, b * cp.inv_pos(a))

specifically, a / b is not DPP.

@AlexLipp

r-barnes commented 1 year ago

From this doc I see:

As another example, the quotient expr / p is not DPP-compliant when p is a parameter, but this can be rewritten as expr * p_tilde, where p_tilde is a parameter that represents 1/p.

I'll try to incorporate this wisdom.

r-barnes commented 1 year ago

This is fixed in #21