Results and quality#

Fit results expose individual estimates, aggregate summaries, diagnostic metrics, and configurable quality thresholds.

FitResults#

class bindcurve.FitResults[source]#

Bases: object

Collection of individual fits and parameter summaries.

property summaries: tuple[ParameterSummary | ConcentrationSummary, ...]#

Derive across-experiment summaries from immutable fit results.

successful()[source]#

Return successful fits.

Return type:

list[FitResult]

failed()[source]#

Return failed fits.

Return type:

list[FitResult]

fit_summary()[source]#

Represent individual fits as a DataFrame.

Return type:

DataFrame

fixed_parameters()[source]#

Return fixed assay and response parameters separately from estimates.

Return type:

DataFrame

parameter_values(compound_id)[source]#

Return one transparent across-experiment parameter set.

Varying native parameters use their arithmetic means, varying concentration parameters use their geometric centers, and globally fixed parameters retain their common value.

Parameters:

compound_id (str)

Return type:

dict[str, float]

parameters()[source]#

Represent parameter summaries as a long-form DataFrame.

Return type:

DataFrame

summary()[source]#

Represent compound-level summaries as one row per compound.

Return type:

DataFrame

report(*, parameter='auto', compounds=None, representation='linear', uncertainty='sd', rounding='sigfig', places_mean=2, places_uncertainty=1, unit=None, include_n_exp=False)[source]#

Return manuscript-ready formatted concentration summaries.

Parameters:
  • parameter (str)

  • compounds (str | Iterable[str] | None)

  • representation (Literal['linear', 'log', 'both'])

  • uncertainty (Literal['sd', 'sem', 'ci95'])

  • rounding (Literal['sigfig', 'decimals'])

  • places_mean (int)

  • places_uncertainty (int)

  • unit (str | None)

  • include_n_exp (bool)

Return type:

DataFrame

quality_report(*, parameter='auto', compounds=None, thresholds=None)[source]#

Return compound-level fit and summary QC metrics.

Parameters:
Return type:

DataFrame

quality_dashboard(*, parameter='auto', compounds=None, thresholds=None, figsize=None)[source]#

Return a graphical dashboard summarizing results-level QC.

Parameters:
Return type:

matplotlib.figure.Figure

__init__(model, fit_results)#
Parameters:
Return type:

None

FitResult#

class bindcurve.FitResult[source]#

Bases: object

Immutable result for one fitted curve.

property model_name: str#

Return the name of the exact model instance used for this fit.

classmethod failed(*, model, compound_id, experiment_id, stage, error)[source]#

Create a failed result while preserving diagnostic context.

Parameters:
Return type:

FitResult

parameter(name)[source]#

Return a fitted parameter by name.

Parameters:

name (str)

Return type:

ParameterEstimate

__init__(model, compound_id, experiment_id=None, success=True, parameters=<factory>, metrics=None, covariance=None, variable_names=(), optimizer_message=None, failure_stage=None, error_type=None, error_message=None)#
Parameters:
Return type:

None

FitMetrics#

class bindcurve.FitMetrics[source]#

Bases: object

Numerical diagnostics for one fit.

__init__(n_data, n_varying_parameters, rss, reduced_rss, chi_square=None, reduced_chi_square=None, aic=None, bic=None, r_squared=None)#
Parameters:
Return type:

None

ParameterEstimate#

class bindcurve.ParameterEstimate[source]#

Bases: object

Estimate for one fitted parameter in public physical coordinates.

__init__(name, value, stderr=None, vary=True, min=-inf, max=inf)#
Parameters:
Return type:

None

ParameterSummary#

class bindcurve.ParameterSummary[source]#

Bases: object

Summary of one native additive parameter across independent fits.

__init__(compound_id, parameter, N_exp, mean, sd, sem, ci95_lower, ci95_upper)#
Parameters:
Return type:

None

ConcentrationSummary#

class bindcurve.ConcentrationSummary[source]#

Bases: object

Summary of one positive concentration-like quantity across fits.

property center: float#

Return the linear-scale center derived from the log10 mean.

linear_interval(uncertainty)[source]#

Return a derived linear-scale interval.

Parameters:

uncertainty (Literal['sd', 'sem', 'ci95'])

Return type:

tuple[float | None, float | None]

log_interval(uncertainty)[source]#

Return a log10-scale interval or additive spread.

Parameters:

uncertainty (Literal['sd', 'sem', 'ci95'])

Return type:

tuple[float | None, float | None]

__init__(compound_id, parameter, log_parameter, N_exp, reportable, log10_mean, log10_sd, log10_sem, log10_ci95_lower, log10_ci95_upper)#
Parameters:
  • compound_id (str)

  • parameter (str)

  • log_parameter (str)

  • N_exp (int)

  • reportable (bool)

  • log10_mean (float)

  • log10_sd (float | None)

  • log10_sem (float | None)

  • log10_ci95_lower (float | None)

  • log10_ci95_upper (float | None)

Return type:

None

DataQualityThresholds#

class bindcurve.DataQualityThresholds[source]#

Bases: object

Heuristic thresholds for data-level dose-response QC.

__init__(min_experiments_green=3, max_intra_noise_median_frac_range_orange=0.05, max_intra_noise_median_frac_range_red=0.1, max_intra_noise_p90_frac_range_orange=0.1, max_intra_noise_p90_frac_range_red=0.2)#
Parameters:
  • min_experiments_green (int)

  • max_intra_noise_median_frac_range_orange (float)

  • max_intra_noise_median_frac_range_red (float)

  • max_intra_noise_p90_frac_range_orange (float)

  • max_intra_noise_p90_frac_range_red (float)

Return type:

None

ResultQualityThresholds#

class bindcurve.ResultQualityThresholds[source]#

Bases: object

Heuristic thresholds for fit- and summary-level QC.

__init__(min_experiments_green=3, max_inter_ci95_fold_orange=3.0, max_inter_ci95_fold_red=10.0, bound_tolerance_rel=1e-06, bound_tolerance_abs=1e-12)#
Parameters:
  • min_experiments_green (int)

  • max_inter_ci95_fold_orange (float)

  • max_inter_ci95_fold_red (float)

  • bound_tolerance_rel (float)

  • bound_tolerance_abs (float)

Return type:

None