Closed timmyfaraday closed 3 years ago
ok, I think I'll do the following: 1) always check for individual criterion only 2) deprecate "mixed" 3) "rwlav", "wls", etc. stay but call a preprocessing function that just associates that criterion to all individual measurement 4) adapt constraint.jl as per above
PS: I'll do the same for the rescaler, so we can give different rescalers to wls-like criteria and mle-like criteria (might not be advantageous but I'll try to test it a bit)
The rescaler needs to be a global variable, no? Otherwise, this will incorrectly prefer the wrong measurements.
which you might want to do for wls-like vs mle criteria, no? all other cases would be wrong, I agree with that
For the Gaussian Mixture Model, 'dummy' gaussian variables need to be added for those measurements which have a criterion "gmm". The cleanest way to do this is:
gmv = _PMD.var(pm, nw)[:gmv] = Dict(i => JuMP.@variable(pm.model, [c in 1:ncds, n = 1:N], base_name = "$(nw)_gmv_$(i)", ) for i in _PMD.ids(pm, nw, :meas) if _PMD.ref(pm, nw, :meas, i, "crit") == "gmm" )
This only introduces these variables if the local criterion is "gmm", significantly limiting the variable space.
However, given the current implementation of the "crit", this is only included if the global criterion is "mixed", and not in general. This makes the above implementation impossible and would require first evaluating whether the global criterion is "mixed" to then evaluate whether the local criterion is "gmm".
Would it not be cleaner to set the local criterion for all measurements? This would also simplify some code in the constraint.jl. This way the global criterion "mixed" can also be deprecated.