cleverly.effect_curves.ScoreAssessment#
- class cleverly.effect_curves.ScoreAssessment(column: str, scale: str, estimates: dict[str, ParameterEstimate], status: str, status_reason: str, span: dict[str, float], compare: str | None = None, compared: ScoreAssessment | None = None, backend: str = 'pandas')[source]#
The risk difference and calibration of a fixed external score, with intervals.
With
compare=, it also holds the second score’s parameters and the paired risk difference of the two, all from one targeted fit.- Parameters:
- column
str The score column.
- scale{“difference”, “log_ratio”}
The scale the score predicts.
- estimates
dictofstrtoParameterEstimate risk_difference,calibration[(intercept)]andcalibration[<column>], and withcompare=the paired rowrisk_difference[<column> - <compare>], the risk ofcolumnminus that ofcompare: negative whencolumnpredicts better.- status{“supported”, “experimental”}
The worst support label of the estimates, those of
comparedincluded.- status_reason
str The reasons for an
experimentalstatus, joined by"; "; empty otherwise.- span
dictofstrtofloat The fluctuation’s span record:
columns,rank,out_of_span,score_normandreduced, the number of thinnest directions a log-ratio fit dropped to settle (0 on the full span).- compare
strorNone The second score column, or
None.- compared
ScoreAssessmentorNone The three parameters of
compare, from the same fluctuation, orNone.- backend
str The dataframe backend of the study’s data.
- column
Methods#
- ScoreAssessment.rows() list[tuple[str, str, ParameterEstimate]][source]#
Every estimate with the score it describes, in report order.
- ScoreAssessment.summary(*, detail: Literal['short', 'full'] = 'short') Any[source]#
A printable report of the check.
- Parameters:
- detail{“short”, “full”}
"full"adds the p-value of each estimate and the fluctuation’s span record.
- Returns:
SummaryThe report.
- ScoreAssessment.to_frame() Any[source]#
One row per parameter, in the study’s backend.
- Returns:
dataframeA
scorecolumn (the column,compare, or"<column> - <compare>") and each estimate’s fields (ParameterEstimate.to_dict()), in the order ofrows().supportandsupport_reasoncarry each row’s status.
Attributes#
- ScoreAssessment.compared: ScoreAssessment | None = None#
- ScoreAssessment.estimates: dict[str, ParameterEstimate]#