penaltymodel icon indicating copy to clipboard operation
penaltymodel copied to clipboard

Feature/69 balanced penaltymodels

Open m3ller opened this issue 6 years ago • 3 comments

m3ller avatar Aug 21 '19 20:08 m3ller

Hi Melody, the matlab function for getting exact fractions out of approximate ones is call rats() (rational fraction approximation). The fractions python module has a similar function. For example, to get 0.5 from 0.499999: from fractions import Fraction float(Fraction.from_float(0.499999).limit_denominator(10**5)) However I think this would need to tested pretty carefully to make sure it's doing the right thing, and it would be better to get the right answers out of the linear programming in the first place, if possible

aidanproy avatar Sep 09 '19 18:09 aidanproy

Sorry for the late reply! @aidanproy

Verifying PM Gaps No, the gap of the constructed penaltymodel gap is not verified. As you've noted, typically, these penaltymodels are constructed by the penaltymodel factories that would find solutions based on that gap, so the check would be redundant in that case.

For the case where a user constructs their own penaltymodel, at the moment, we are not verifying their models. I am on the fence about verifying this because it seems like a very atypical case to me at the moment. Plus, I don't want this verification to happen for the factory-constructed-penaltymodel cases.

On number of tries You suggestion makes sense. I will go about implementing that

m3ller avatar Oct 25 '19 21:10 m3ller

Sorry for the late reply! @aidanproy

Verifying PM Gaps No, the gap of the constructed penaltymodel gap is not verified. As you've noted, typically, these penaltymodels are constructed by the penaltymodel factories that would find solutions based on that gap, so the check would be redundant in that case.

For the case where a user constructs their own penaltymodel, at the moment, we are not verifying their models. I am on the fence about verifying this because it seems like a very atypical case to me at the moment. Plus, I don't want this verification to happen for the factory-constructed-penaltymodel cases.

That makes sense. It might be useful if there was a "verify_penaltymodel" function exposed in the interface somewhere, even if we don't use it directly. That way if the user happened to build their own, it would be easy for them to check it themselves.

aidanproy avatar Oct 25 '19 21:10 aidanproy

Closing this PR as stale.

arcondello avatar Jan 25 '23 17:01 arcondello