Configuration options for the Dynamic Bayesian Network. Controls discretization thresholds, smoothing, transcription rate mapping, etc.
DBNConfig
01 Syntax
02 Properties
| Name | Overloads | Summary |
|---|---|---|
| SmoothingAlpha | 1 | Smoothing parameter for parameter learning (Dirichlet prior concentration). |
| UseMultinomialSampling | 1 | If true, sample from the probability distribution (stochastic prediction). |
| LowThreshold | 1 | Lower threshold for discretization (values below this = "Low") |
| HighThreshold | 1 | Upper threshold for discretization (values above this = "High") |
| HighTranscriptionRate | 1 | Transcription rate for "High" expression state |
| BasalTranscriptionRate | 1 | Transcription rate for "Medium" expression state (basal) |
| LowTranscriptionRate | 1 | Transcription rate for "Low" expression state |
| Seed | 1 | Random seed for reproducible stochastic sampling |
| OnlineLearningRate | 1 | Learning rate for online parameter updates (exponential moving average) |
| MaxParents | 1 | 单个节点允许的最大父节点数(拓扑构建阶段的兜底保护)。 CPT 的行数为各父节点状态数之积(默认 3 态即 3^P),父节点数不受限时 规模会指数爆炸(实测模块内 hub 基因的父节点数可达 39)。 默认值 8 的另一层意义是模型判别力:激活得分用 noisy-OR 组合, 当父节点数为 P 时,单个父节点从 Medium 变为 Low 只… |
| MaxCPTRows | 1 | 单个节点 CPT 允许"完整展开"的最大行数。 不超过该阈值(默认 10000,即 3 态下 P<=8)时按原逻辑展开全表; 超过时改为按需计算(惰性 CPT,见 ConditionalProbabilityTable.OnDemandProvider): 拓扑先验分布本身就是父状态的纯函数,查询时现场计算的结果与全表展开完全一致, 但内存占用从… |
| MaxCPTCacheRows | 1 | 惰性 CPT 的记忆化缓存上限:单个节点最多缓存多少个"现场计算过"的父配置。 超过后不再写入缓存,每次查询直接计算,保证稀疏缓存不会无限增长 (父节点多时每个 key 字符串可达数百字节,缓存条目数需要设上限)。 |
| MarginalSampleSize | 1 | 计算惰性节点的边缘分布时使用的蒙特卡洛采样数(配置空间过大时无法枚举)。 |
| NodeThresholds | 1 | 每个节点(基因)的离散化阈值:key = 节点 ID,value = (low_threshold, high_threshold)。 默认阈值 DBNConfig.LowThreshold / DBNConfig.HighThreshold(0.33 / 0.66)是按 "已归一化到 [0,1] 的数据"设计的;而时间序列常常是原始 log1p 表… |
| ActivationHighThreshold | 1 | 激活得分判定为"高表达"的下限(默认 0.58)。 得分由 noisy-OR 组合得到,父节点数为 P 时单个父节点由 Medium 变 Low 只会让得分变动约 0.5^P(P=8 时约 0.06)。若沿用较宽的区间(0.34/0.66, 区间宽度 0.32),单基因敲降带来的得分变化远不足以跨越区间, 所有基因都会被钉死在 Medium,虚拟… |
| ActivationLowThreshold | 1 | 激活得分判定为"低表达"的上限(默认 0.42),见 DBNConfig.ActivationHighThreshold。 |
| CascadeStateThreshold | 1 | 级联传播触发下游模块整体状态偏置的阈值(默认 0.005)。 传播量是"模块内基因状态相对基线的平均变化"(状态值 Low=0/Medium=1/High=2)。 单基因敲降通常只影响其直接靶标(实测约占模块基因的 0.3%~0.5%, 对应传播信号量级 0.003~0.005)。原实现固定取 0.1,且用的是恒为正的速率均值, 导致级联要么永远… |
| QuantileLow | 1 | 自适应阈值所使用的低分位数(默认 0.33,即约 1/3 的样本落入 Low)。 |
| QuantileHigh | 1 | 自适应阈值所使用的高分位数(默认 0.66,即约 1/3 的样本落入 High)。 |
03 Members
Smoothing parameter for parameter learning (Dirichlet prior concentration). Larger values give more weight to the topology-based prior. When alpha = 0: pure Maximum Likelihood Estimation (data only). When alpha is large: prior dominates (topology only). Default = 1.0 (Laplace smoothing with topology prior).
If true, sample from the probability distribution (stochastic prediction). If false, take the most likely state (deterministic, argmax). Default = false (deterministic).
Lower threshold for discretization (values below this = "Low")
Upper threshold for discretization (values above this = "High")
Transcription rate for "High" expression state
Transcription rate for "Medium" expression state (basal)
Transcription rate for "Low" expression state
Random seed for reproducible stochastic sampling
Learning rate for online parameter updates (exponential moving average)
单个节点允许的最大父节点数(拓扑构建阶段的兜底保护)。
CPT 的行数为各父节点状态数之积(默认 3 态即 3^P),父节点数不受限时 规模会指数爆炸(实测模块内 hub 基因的父节点数可达 39)。
默认值 8 的另一层意义是模型判别力:激活得分用 noisy-OR 组合, 当父节点数为 P 时,单个父节点从 Medium 变为 Low 只会让 activationScore 从 1-0.5^P 变为 1-0.5^(P-1),P 越大变化越小 (P=39 时差异约 1e-12),单基因敲降将完全无法产生可观测的响应。 取 8 既符合转录调控 fan-in 的一般规模,也让每个父节点保持足够影响权重。
单个节点 CPT 允许"完整展开"的最大行数。
不超过该阈值(默认 10000,即 3 态下 P<=8)时按原逻辑展开全表; 超过时改为按需计算(惰性 CPT,见 ConditionalProbabilityTable.OnDemandProvider): 拓扑先验分布本身就是父状态的纯函数,查询时现场计算的结果与全表展开完全一致, 但内存占用从 O(3^P) 降为 O(实际访问过的配置数)。
惰性 CPT 的记忆化缓存上限:单个节点最多缓存多少个"现场计算过"的父配置。 超过后不再写入缓存,每次查询直接计算,保证稀疏缓存不会无限增长 (父节点多时每个 key 字符串可达数百字节,缓存条目数需要设上限)。
计算惰性节点的边缘分布时使用的蒙特卡洛采样数(配置空间过大时无法枚举)。
每个节点(基因)的离散化阈值:key = 节点 ID,value = (low_threshold, high_threshold)。
默认阈值 DBNConfig.LowThreshold / DBNConfig.HighThreshold(0.33 / 0.66)是按 "已归一化到 [0,1] 的数据"设计的;而时间序列常常是原始 log1p 表达值(量级 0~10+), 此时几乎所有基因都会被判为 High,导致学习到的 CPT 与推理证据都严重偏向 High。
由训练流程按数据的经验分位数填好该字典后,参数学习(LearnParameters)与 推理(PredictNextState)都会经 GetThresholds 命中这里,保证两侧使用同一套阈值。
激活得分判定为"高表达"的下限(默认 0.58)。
得分由 noisy-OR 组合得到,父节点数为 P 时单个父节点由 Medium 变 Low 只会让得分变动约 0.5^P(P=8 时约 0.06)。若沿用较宽的区间(0.34/0.66, 区间宽度 0.32),单基因敲降带来的得分变化远不足以跨越区间, 所有基因都会被钉死在 Medium,虚拟扰动也就观测不到任何响应。 默认取 0.42/0.58(区间宽度 0.16),使单基因扰动能够跨越状态边界。
激活得分判定为"低表达"的上限(默认 0.42),见 DBNConfig.ActivationHighThreshold。
级联传播触发下游模块整体状态偏置的阈值(默认 0.005)。
传播量是"模块内基因状态相对基线的平均变化"(状态值 Low=0/Medium=1/High=2)。 单基因敲降通常只影响其直接靶标(实测约占模块基因的 0.3%~0.5%, 对应传播信号量级 0.003~0.005)。原实现固定取 0.1,且用的是恒为正的速率均值, 导致级联要么永远不触发、要么被单向锁定为 High。 设为 0 可让任何扰动都跨模块传播(放大效应强),调大则只有强扰动才传播。
自适应阈值所使用的低分位数(默认 0.33,即约 1/3 的样本落入 Low)。
自适应阈值所使用的高分位数(默认 0.66,即约 1/3 的样本落入 High)。