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

Improve numerical accuracy by normalising area values #37

Closed AlexLipp closed 1 year ago

AlexLipp commented 1 year ago

Previously the solver was reporting Status = optimal_inaccurate for some networks with large upstream areas (stored as numbers of pixels). To solve this inaccuracy I have introduced a function normalise_areas that divides the upstream area of each node in the network by the mean area of nodes in the network. It introduces a new attribute to sample_network graph rltv_area that is used in subsequent calculations. This means that all the area values are closer to 1 which limits floating point inaccuracies. As they are all divided through by a constant value it does not affect the results. However, now, the solver reports Status = optimal for the same networks suggesting accuracy is improved/resolved. This is similar to how the concentration values are normalised by mean value to improve accuracy.