-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add mechanism to constrain fitting parameters #53
Comments
Yes, I agree. I am hoping @ckikawa can add her relevant data here so I have more test cases for this, and whenever that is done I am going to start working on this. |
@jbloom, here are some test cases from the H3N2 library. I've separated these into cases where replicates are called widely varying tops, usually in the case where virus-barcodes start at 0 fraction infectivity and are unable to consistently infer accurate tops: And other cases where replicates have widely varying slopes, usually in the case where neutralization takes place over most of the entire window of serum dilutions: |
- The curve fitting parameters (top, bottom, slope) can now be constrained to a range in addition to being completely free or fixed. This can help with fitting some curves more sensibly (see [this issue](#53)). Specifically: - ``fixtop`` and ``fixbottom`` parameters to ``HillCurve`` can be 2-tuples of bounds - added ``fixslope`` parameter to ``HillCurve`` and ``CurveFits`` - New ``constrain_params_range`` notebook tests and documents this functionality. - Add ``no_curve_fit_first`` argument to ``HillCurve`` to aid debugging/development.
@ckikawa @anloes, this shows the data Caroline posted with constraints on the fit parameters: I will work on integrating this into |
Sometimes, neutcurve generates a curve for a given replicate with a slope or top that is aberrant with other replicates, potentially due to noisy data. This may be able to be resolved by adding a mechanism to constrain the fitting parameters to a reasonable slope or top, we could add a mechanism to do this to the package.
Attached (and shown in plots included) are several examples of curves where this issue was observed.
240104_curveswithdifferentslopes.csv
The text was updated successfully, but these errors were encountered: