生存分析建模
生存分析建模:基于 lifelines 库提供生存分析与 Cox 比例风险建模能力,支持残差诊断、参数化回归模型自定义、时滞转化率分析及比例风险假设检验。 含 15 条反模式约束。
晶体简介
Constraints
Evidence Quality
Medium confidence — review before critical use
53 条不可违反的约束
WHENWhen validating duration inputs in survival analysis
ACTIONReject negative or zero durations with ValueError
CONSEQUENCENegative durations are mathematically invalid in survival analysis, causing incorrect hazard rate calculations and producing meaningless survival curves that misrepresent actual time-to-event distributions
WHENWhen processing event_observed array for survival models
ACTIONCast event_observed to integer type and then to boolean
CONSEQUENCEInvalid event values (non-0/1, non-boolean) will produce undefined behavior in likelihood calculations, potentially causing silent errors in survival function estimation
WHENWhen accepting user-provided DataFrame in fit() method
ACTIONCreate a shallow copy of the input DataFrame before extraction operations
CONSEQUENCEThe original DataFrame will be permanently modified by .pop() operations on duration/event/weights columns, corrupting user data and violating data isolation principles
常见问题
讨论 (0)
暂无讨论,成为第一个发言的人吧!
更新历史
v0.1.0: 首次发布到 Doramagic.ai。基于 tangweigang-jpg/doramagic-skills 的自动化 batch-v1 元数据 + 自动生成 FAQ。