Enhanced Simulation Notebook for ALADYNOULLI¶

This notebook provides an improved simulation framework with:

  • Better visualizations
  • Comprehensive parameter recovery analysis
  • Training progress tracking
  • Detailed trajectory comparisons
In [1]:
import sys
import os

# Get the parent directory of current directory
parent_dir = os.path.dirname(os.path.dirname(os.getcwd()))
sys.path.append(parent_dir)

sys.path.append('/Users/sarahurbut/aladynoulli2/pyScripts/')
# Now you can import from pyScripts
from oldmarch.cluster_g_logit_init_acceptpsi import *

%load_ext autoreload
In [2]:
%autoreload 2
import numpy as np
import seaborn as sns
import torch
import torch.nn as nn
from scipy.special import expit, softmax
from scipy.stats import multivariate_normal
import matplotlib.pyplot as plt
from sklearn.metrics import adjusted_rand_score, normalized_mutual_info_score

# Set style
try:
    plt.style.use('seaborn-v0_8-darkgrid')
except:
    plt.style.use('seaborn-darkgrid')
sns.set_palette("husl")
In [3]:
def compute_smoothed_prevalence(Y, window_size=5):
    """Compute smoothed prevalence over time from binary disease indicators."""
    if isinstance(Y, torch.Tensor):
        Y = Y.numpy()
    
    N, D, T = Y.shape
    prevalence_t = np.zeros((D, T))
    
    for d in range(D):
        for t in range(T):
            start_idx = max(0, t - window_size // 2)
            end_idx = min(T, t + window_size // 2 + 1)
            prevalence_t[d, t] = Y[:, d, start_idx:end_idx].mean()
    
    epsilon = 1e-6
    prevalence_t = np.clip(prevalence_t, epsilon, 1.0 - epsilon)
    
    return prevalence_t

Data Generation¶

In [4]:
def generate_enhanced_simulation(N=10000, D=20, T=50, K=5, P=5, seed=42):
    """Generate synthetic data with clear structure for testing ALADYNOULLI"""
    np.random.seed(seed)
    torch.manual_seed(seed)
    
    print(f"Generating simulation with:")
    print(f"  N={N} individuals, D={D} diseases, T={T} timepoints")
    print(f"  K={K} signatures, P={P} genetic features")
    
    data = generate_clustered_survival_data(N=N, D=D, T=T, K=K, P=P)
    
    print(f"\nGenerated data shapes:")
    print(f"  Y: {data['Y'].shape}")
    print(f"  G: {data['G'].shape}")
    print(f"  event_times: {data['event_times'].shape}")
    print(f"  clusters: {data['clusters'].shape}")
    
    return data

# Generate data
data = generate_enhanced_simulation(N=10000, D=20, T=50, K=5, P=5, seed=42)
Generating simulation with:
  N=10000 individuals, D=20 diseases, T=50 timepoints
  K=5 signatures, P=5 genetic features

Generated data shapes:
  Y: (10000, 20, 50)
  G: (10000, 5)
  event_times: (10000, 20)
  clusters: (20,)
In [ ]:

No description has been provided for this image

Model Fitting¶

In [ ]:
# Initialize model with true clusters
print("\n" + "="*70)
print("FITTING MODEL")
print("="*70)

# Compute prevalence for initialization
prevalence_t = compute_smoothed_prevalence(data['Y'])

# Initialize model
model = AladynSurvivalFixedKernelsAvgLoss_clust_logitInit_psitest(
    N=data['Y'].shape[0],
    D=data['Y'].shape[1],
    T=data['Y'].shape[2],
    K=data['K'],
    P=data['G'].shape[1],
    init_sd_scaler=1e-1,
    G=data['G'],
    Y=data['Y'],
    genetic_scale=1,
    W=0.0001,
    R=0,
    prevalence_t=prevalence_t,
    signature_references=None,
    healthy_reference=False,
    disease_names=None
)

# Initialize with true clusters and psi
model.clusters = data['clusters']
model.initialize_params(true_psi=data['psi'])

print(f"\nModel initialized:")
print(f"  Clusters: {model.clusters}")
print(f"  K={model.K}, D={model.D}, T={model.T}, P={model.P}")
======================================================================
FITTING MODEL
======================================================================

Cluster Sizes:
Cluster 0: 3 diseases
Cluster 1: 8 diseases
Cluster 2: 4 diseases
Cluster 3: 3 diseases
Cluster 4: 2 diseases

Calculating gamma for k=0:
Number of diseases in cluster: 3
Base value (first 5): tensor([ -7.1997, -10.5076, -10.5076, -10.5076,  -7.1997])
Base value centered (first 5): tensor([ 0.6275, -2.6804, -2.6804, -2.6804,  0.6275])
Base value centered mean: 3.0059814548621944e-07
Gamma init for k=0 (first 5): tensor([ 0.2781,  0.2558, -0.2568, -0.2966,  0.1783])
/Users/sarahurbut/aladynoulli2/pyScripts_forPublish/clust_huge_amp_vectorized.py:83: UserWarning: To copy construct from a tensor, it is recommended to use sourceTensor.clone().detach() or sourceTensor.clone().detach().requires_grad_(True), rather than torch.tensor(sourceTensor).
  self.G = torch.tensor(G, dtype=torch.float32)
/Users/sarahurbut/aladynoulli2/pyScripts_forPublish/clust_huge_amp_vectorized.py:86: UserWarning: To copy construct from a tensor, it is recommended to use sourceTensor.clone().detach() or sourceTensor.clone().detach().requires_grad_(True), rather than torch.tensor(sourceTensor).
  self.G = torch.tensor(G_scaled, dtype=torch.float32)
/Users/sarahurbut/aladynoulli2/pyScripts_forPublish/clust_huge_amp_vectorized.py:88: UserWarning: To copy construct from a tensor, it is recommended to use sourceTensor.clone().detach() or sourceTensor.clone().detach().requires_grad_(True), rather than torch.tensor(sourceTensor).
  self.Y = torch.tensor(Y, dtype=torch.float32)
Calculating gamma for k=1:
Number of diseases in cluster: 8
Base value (first 5): tensor([-10.0941, -10.0941, -10.0941, -10.0941, -10.0941])
Base value centered (first 5): tensor([-0.0388, -0.0388, -0.0388, -0.0388, -0.0388])
Base value centered mean: 4.2476654016354587e-07
Gamma init for k=1 (first 5): tensor([ 0.0050, -0.0058,  0.0114,  0.0317, -0.0129])

Calculating gamma for k=2:
Number of diseases in cluster: 4
Base value (first 5): tensor([ -3.8918, -11.3346,  -3.8918,  -6.3727,  -8.8537])
Base value centered (first 5): tensor([ 3.0761, -4.3667,  3.0761,  0.5952, -1.8857])
Base value centered mean: 2.918243353633443e-07
Gamma init for k=2 (first 5): tensor([-1.7323,  0.0849,  0.6698,  0.0547, -0.2495])

Calculating gamma for k=3:
Number of diseases in cluster: 3
Base value (first 5): tensor([-13.8155,  -7.1997, -13.8155, -10.5076, -13.8155])
Base value centered (first 5): tensor([-1.6943,  4.9215, -1.6943,  1.6136, -1.6943])
Base value centered mean: -1.7627716033530305e-06
Gamma init for k=3 (first 5): tensor([ 0.5503, -0.3367, -0.1328, -0.1651, -0.1581])

Calculating gamma for k=4:
Number of diseases in cluster: 2
Base value (first 5): tensor([-13.8155, -13.8155,  -8.8537, -13.8155, -13.8155])
Base value centered (first 5): tensor([-1.0266, -1.0266,  3.9352, -1.0266, -1.0266])
Base value centered mean: -9.34600848268019e-07
Gamma init for k=4 (first 5): tensor([-0.3141, -0.3490,  0.2380, -0.1672,  0.4931])
Initializing with 5 disease states only
Initialization complete!

Calculating gamma for k=0:
Number of diseases in cluster: 4.0
Base value (first 5): tensor([-13.8155,  -8.8537, -13.8155, -11.3346, -13.8155])
Base value centered (first 5): tensor([-1.2710,  3.6909, -1.2710,  1.2099, -1.2710])
Base value centered mean: -3.94248957036325e-07
Gamma init for k=0 (first 5): tensor([ 0.4125, -0.2524, -0.0999, -0.1241, -0.1186])

Calculating gamma for k=1:
Number of diseases in cluster: 4.0
Base value (first 5): tensor([ -8.8537, -11.3346, -11.3346, -11.3346,  -8.8537])
Base value centered (first 5): tensor([ 0.4602, -2.0207, -2.0207, -2.0207,  0.4602])
Base value centered mean: 1.745605459291255e-06
Gamma init for k=1 (first 5): tensor([ 0.2134,  0.1943, -0.1943, -0.2261,  0.1326])

Calculating gamma for k=2:
Number of diseases in cluster: 4.0
Base value (first 5): tensor([ -6.3727, -11.3346,  -6.3727,  -8.8537, -11.3346])
Base value centered (first 5): tensor([ 2.7838, -2.1780,  2.7838,  0.3029, -2.1780])
Base value centered mean: 2.479553273815327e-08
Gamma init for k=2 (first 5): tensor([-1.6011,  0.1384,  0.5971,  0.0474, -0.3158])

Calculating gamma for k=3:
Number of diseases in cluster: 4.0
Base value (first 5): tensor([ -8.8537, -11.3346,  -6.3727,  -8.8537,  -8.8537])
Base value centered (first 5): tensor([-0.2764, -2.7573,  2.2045, -0.2764, -0.2764])
Base value centered mean: 9.256839916815807e-07
Gamma init for k=3 (first 5): tensor([-0.3319, -0.2173,  0.2051, -0.0843,  0.3042])

Calculating gamma for k=4:
Number of diseases in cluster: 4.0
Base value (first 5): tensor([-8.8537, -8.8537, -8.8537, -8.8537, -8.8537])
Base value centered (first 5): tensor([-0.0117, -0.0117, -0.0117, -0.0117, -0.0117])
Base value centered mean: 1.6778946019258e-06
Gamma init for k=4 (first 5): tensor([ 0.0489, -0.0248,  0.0114,  0.0752, -0.0161])
Initializing with 5 disease states only
Initialization complete!

Model initialized successfully!

Training with Progress Tracking¶

In [ ]:
# Train the model
print("\n" + "="*70)
print("TRAINING MODEL")
print("="*70)

# Fit model
history = model.fit(
    event_times=data['event_times'],
    num_epochs=100,
    learning_rate=1e-3,
    lambda_reg=1e-2
)

print("\nTraining complete!")
======================================================================
TRAINING MODEL
======================================================================
/Users/sarahurbut/aladynoulli2/pyScripts_forPublish/clust_huge_amp_vectorized.py:238: UserWarning: To copy construct from a tensor, it is recommended to use sourceTensor.clone().detach() or sourceTensor.clone().detach().requires_grad_(True), rather than torch.tensor(sourceTensor).
  event_times_tensor = torch.tensor(event_times, dtype=torch.long)
Epoch 0
Loss: 36.8911

Monitoring signature responses:

Disease 19 (signature 4, LR=63.82):
  Theta for diagnosed: 0.204 ± 0.063
  Theta for others: 0.165
  Proportion difference: 0.039

Disease 2 (signature 0, LR=61.08):
  Theta for diagnosed: 0.282 ± 0.126
  Theta for others: 0.185
  Proportion difference: 0.097

Disease 9 (signature 2, LR=57.08):
  Theta for diagnosed: 0.376 ± 0.264
  Theta for others: 0.092
  Proportion difference: 0.284

Disease 11 (signature 2, LR=56.65):
  Theta for diagnosed: 0.507 ± 0.277
  Theta for others: 0.276
  Proportion difference: 0.231

Disease 4 (signature 1, LR=56.31):
  Theta for diagnosed: 0.274 ± 0.104
  Theta for others: 0.187
  Proportion difference: 0.087

Epoch 1
Loss: 174.2320

Monitoring signature responses:

Disease 19 (signature 4, LR=63.82):
  Theta for diagnosed: 0.204 ± 0.060
  Theta for others: 0.165
  Proportion difference: 0.039

Disease 2 (signature 0, LR=61.01):
  Theta for diagnosed: 0.282 ± 0.124
  Theta for others: 0.185
  Proportion difference: 0.097

Disease 9 (signature 2, LR=57.52):
  Theta for diagnosed: 0.377 ± 0.263
  Theta for others: 0.092
  Proportion difference: 0.284

Disease 11 (signature 2, LR=56.62):
  Theta for diagnosed: 0.507 ± 0.276
  Theta for others: 0.276
  Proportion difference: 0.231

Disease 16 (signature 4, LR=56.31):
  Theta for diagnosed: 0.166 ± 0.065
  Theta for others: 0.056
  Proportion difference: 0.110

Epoch 2
Loss: 49.3241

Monitoring signature responses:

Disease 19 (signature 4, LR=63.81):
  Theta for diagnosed: 0.204 ± 0.060
  Theta for others: 0.165
  Proportion difference: 0.039

Disease 2 (signature 0, LR=60.93):
  Theta for diagnosed: 0.281 ± 0.124
  Theta for others: 0.185
  Proportion difference: 0.096

Disease 9 (signature 2, LR=57.90):
  Theta for diagnosed: 0.377 ± 0.263
  Theta for others: 0.092
  Proportion difference: 0.284

Disease 16 (signature 4, LR=56.72):
  Theta for diagnosed: 0.166 ± 0.065
  Theta for others: 0.056
  Proportion difference: 0.110

Disease 11 (signature 2, LR=56.60):
  Theta for diagnosed: 0.507 ± 0.277
  Theta for others: 0.276
  Proportion difference: 0.230

Epoch 3
Loss: 68.4091

Monitoring signature responses:

Disease 19 (signature 4, LR=63.81):
  Theta for diagnosed: 0.204 ± 0.061
  Theta for others: 0.165
  Proportion difference: 0.039

Disease 2 (signature 0, LR=60.94):
  Theta for diagnosed: 0.281 ± 0.125
  Theta for others: 0.185
  Proportion difference: 0.096

Disease 9 (signature 2, LR=58.28):
  Theta for diagnosed: 0.377 ± 0.263
  Theta for others: 0.093
  Proportion difference: 0.284

Disease 16 (signature 4, LR=57.11):
  Theta for diagnosed: 0.167 ± 0.066
  Theta for others: 0.056
  Proportion difference: 0.110

Disease 11 (signature 2, LR=56.59):
  Theta for diagnosed: 0.506 ± 0.277
  Theta for others: 0.276
  Proportion difference: 0.230

Epoch 4
Loss: 109.9122

Monitoring signature responses:

Disease 19 (signature 4, LR=63.82):
  Theta for diagnosed: 0.204 ± 0.061
  Theta for others: 0.165
  Proportion difference: 0.039

Disease 2 (signature 0, LR=60.99):
  Theta for diagnosed: 0.281 ± 0.125
  Theta for others: 0.185
  Proportion difference: 0.096

Disease 9 (signature 2, LR=58.67):
  Theta for diagnosed: 0.377 ± 0.263
  Theta for others: 0.092
  Proportion difference: 0.284

Disease 16 (signature 4, LR=57.48):
  Theta for diagnosed: 0.167 ± 0.065
  Theta for others: 0.056
  Proportion difference: 0.110

Disease 11 (signature 2, LR=56.59):
  Theta for diagnosed: 0.506 ± 0.276
  Theta for others: 0.276
  Proportion difference: 0.230

Epoch 5
Loss: 90.2475

Monitoring signature responses:

Disease 19 (signature 4, LR=63.83):
  Theta for diagnosed: 0.204 ± 0.060
  Theta for others: 0.165
  Proportion difference: 0.039

Disease 2 (signature 0, LR=61.07):
  Theta for diagnosed: 0.281 ± 0.124
  Theta for others: 0.185
  Proportion difference: 0.097

Disease 9 (signature 2, LR=59.06):
  Theta for diagnosed: 0.377 ± 0.263
  Theta for others: 0.092
  Proportion difference: 0.284

Disease 16 (signature 4, LR=57.84):
  Theta for diagnosed: 0.167 ± 0.065
  Theta for others: 0.056
  Proportion difference: 0.110

Disease 15 (signature 3, LR=56.90):
  Theta for diagnosed: 0.170 ± 0.081
  Theta for others: 0.135
  Proportion difference: 0.035

Epoch 6
Loss: 53.6617

Monitoring signature responses:

Disease 19 (signature 4, LR=63.85):
  Theta for diagnosed: 0.204 ± 0.060
  Theta for others: 0.165
  Proportion difference: 0.039

Disease 2 (signature 0, LR=61.13):
  Theta for diagnosed: 0.282 ± 0.124
  Theta for others: 0.185
  Proportion difference: 0.097

Disease 9 (signature 2, LR=59.43):
  Theta for diagnosed: 0.377 ± 0.263
  Theta for others: 0.092
  Proportion difference: 0.284

Disease 16 (signature 4, LR=58.20):
  Theta for diagnosed: 0.167 ± 0.065
  Theta for others: 0.056
  Proportion difference: 0.110

Disease 15 (signature 3, LR=57.29):
  Theta for diagnosed: 0.170 ± 0.081
  Theta for others: 0.135
  Proportion difference: 0.035

Epoch 7
Loss: 40.3793

Monitoring signature responses:

Disease 19 (signature 4, LR=63.86):
  Theta for diagnosed: 0.204 ± 0.060
  Theta for others: 0.165
  Proportion difference: 0.039

Disease 2 (signature 0, LR=61.17):
  Theta for diagnosed: 0.282 ± 0.124
  Theta for others: 0.185
  Proportion difference: 0.097

Disease 9 (signature 2, LR=59.80):
  Theta for diagnosed: 0.376 ± 0.263
  Theta for others: 0.092
  Proportion difference: 0.284

Disease 16 (signature 4, LR=58.56):
  Theta for diagnosed: 0.167 ± 0.065
  Theta for others: 0.056
  Proportion difference: 0.111

Disease 15 (signature 3, LR=57.67):
  Theta for diagnosed: 0.170 ± 0.081
  Theta for others: 0.135
  Proportion difference: 0.036

Epoch 8
Loss: 53.5571

Monitoring signature responses:

Disease 19 (signature 4, LR=63.86):
  Theta for diagnosed: 0.205 ± 0.061
  Theta for others: 0.165
  Proportion difference: 0.040

Disease 2 (signature 0, LR=61.19):
  Theta for diagnosed: 0.282 ± 0.124
  Theta for others: 0.185
  Proportion difference: 0.097

Disease 9 (signature 2, LR=60.16):
  Theta for diagnosed: 0.376 ± 0.263
  Theta for others: 0.092
  Proportion difference: 0.284

Disease 16 (signature 4, LR=58.92):
  Theta for diagnosed: 0.167 ± 0.065
  Theta for others: 0.056
  Proportion difference: 0.111

Disease 15 (signature 3, LR=58.07):
  Theta for diagnosed: 0.170 ± 0.081
  Theta for others: 0.135
  Proportion difference: 0.036

Epoch 9
Loss: 68.0538

Monitoring signature responses:

Disease 19 (signature 4, LR=63.87):
  Theta for diagnosed: 0.205 ± 0.061
  Theta for others: 0.165
  Proportion difference: 0.040

Disease 2 (signature 0, LR=61.18):
  Theta for diagnosed: 0.282 ± 0.124
  Theta for others: 0.185
  Proportion difference: 0.097

Disease 9 (signature 2, LR=60.50):
  Theta for diagnosed: 0.376 ± 0.263
  Theta for others: 0.092
  Proportion difference: 0.284

Disease 16 (signature 4, LR=59.29):
  Theta for diagnosed: 0.167 ± 0.065
  Theta for others: 0.056
  Proportion difference: 0.111

Disease 15 (signature 3, LR=58.46):
  Theta for diagnosed: 0.171 ± 0.081
  Theta for others: 0.135
  Proportion difference: 0.036

Epoch 10
Loss: 65.2098

Monitoring signature responses:

Disease 19 (signature 4, LR=63.87):
  Theta for diagnosed: 0.205 ± 0.060
  Theta for others: 0.165
  Proportion difference: 0.040

Disease 2 (signature 0, LR=61.17):
  Theta for diagnosed: 0.282 ± 0.124
  Theta for others: 0.185
  Proportion difference: 0.097

Disease 9 (signature 2, LR=60.83):
  Theta for diagnosed: 0.376 ± 0.263
  Theta for others: 0.092
  Proportion difference: 0.284

Disease 16 (signature 4, LR=59.66):
  Theta for diagnosed: 0.167 ± 0.065
  Theta for others: 0.056
  Proportion difference: 0.111

Disease 15 (signature 3, LR=58.86):
  Theta for diagnosed: 0.171 ± 0.081
  Theta for others: 0.135
  Proportion difference: 0.036

Epoch 11
Loss: 50.2462

Monitoring signature responses:

Disease 19 (signature 4, LR=63.87):
  Theta for diagnosed: 0.205 ± 0.060
  Theta for others: 0.165
  Proportion difference: 0.040

Disease 2 (signature 0, LR=61.16):
  Theta for diagnosed: 0.281 ± 0.124
  Theta for others: 0.185
  Proportion difference: 0.097

Disease 9 (signature 2, LR=61.14):
  Theta for diagnosed: 0.376 ± 0.263
  Theta for others: 0.092
  Proportion difference: 0.284

Disease 16 (signature 4, LR=60.03):
  Theta for diagnosed: 0.167 ± 0.065
  Theta for others: 0.056
  Proportion difference: 0.111

Disease 15 (signature 3, LR=59.25):
  Theta for diagnosed: 0.171 ± 0.081
  Theta for others: 0.135
  Proportion difference: 0.036

Epoch 12
Loss: 38.3002

Monitoring signature responses:

Disease 19 (signature 4, LR=63.87):
  Theta for diagnosed: 0.205 ± 0.060
  Theta for others: 0.165
  Proportion difference: 0.040

Disease 9 (signature 2, LR=61.44):
  Theta for diagnosed: 0.376 ± 0.263
  Theta for others: 0.092
  Proportion difference: 0.284

Disease 2 (signature 0, LR=61.16):
  Theta for diagnosed: 0.281 ± 0.124
  Theta for others: 0.185
  Proportion difference: 0.097

Disease 16 (signature 4, LR=60.38):
  Theta for diagnosed: 0.167 ± 0.065
  Theta for others: 0.056
  Proportion difference: 0.111

Disease 15 (signature 3, LR=59.63):
  Theta for diagnosed: 0.171 ± 0.081
  Theta for others: 0.135
  Proportion difference: 0.036

Epoch 13
Loss: 37.9797

Monitoring signature responses:

Disease 19 (signature 4, LR=63.87):
  Theta for diagnosed: 0.205 ± 0.060
  Theta for others: 0.165
  Proportion difference: 0.040

Disease 9 (signature 2, LR=61.72):
  Theta for diagnosed: 0.376 ± 0.263
  Theta for others: 0.092
  Proportion difference: 0.284

Disease 2 (signature 0, LR=61.16):
  Theta for diagnosed: 0.281 ± 0.124
  Theta for others: 0.185
  Proportion difference: 0.097

Disease 16 (signature 4, LR=60.72):
  Theta for diagnosed: 0.167 ± 0.065
  Theta for others: 0.056
  Proportion difference: 0.111

Disease 15 (signature 3, LR=60.00):
  Theta for diagnosed: 0.171 ± 0.081
  Theta for others: 0.135
  Proportion difference: 0.036

Epoch 14
Loss: 45.5525

Monitoring signature responses:

Disease 19 (signature 4, LR=63.87):
  Theta for diagnosed: 0.205 ± 0.060
  Theta for others: 0.165
  Proportion difference: 0.040

Disease 9 (signature 2, LR=61.98):
  Theta for diagnosed: 0.376 ± 0.263
  Theta for others: 0.092
  Proportion difference: 0.284

Disease 2 (signature 0, LR=61.17):
  Theta for diagnosed: 0.281 ± 0.124
  Theta for others: 0.185
  Proportion difference: 0.097

Disease 16 (signature 4, LR=61.04):
  Theta for diagnosed: 0.167 ± 0.065
  Theta for others: 0.056
  Proportion difference: 0.111

Disease 15 (signature 3, LR=60.36):
  Theta for diagnosed: 0.171 ± 0.081
  Theta for others: 0.135
  Proportion difference: 0.036

Epoch 15
Loss: 50.8391

Monitoring signature responses:

Disease 19 (signature 4, LR=63.88):
  Theta for diagnosed: 0.205 ± 0.060
  Theta for others: 0.165
  Proportion difference: 0.040

Disease 9 (signature 2, LR=62.22):
  Theta for diagnosed: 0.376 ± 0.262
  Theta for others: 0.092
  Proportion difference: 0.284

Disease 16 (signature 4, LR=61.36):
  Theta for diagnosed: 0.167 ± 0.065
  Theta for others: 0.056
  Proportion difference: 0.111

Disease 2 (signature 0, LR=61.17):
  Theta for diagnosed: 0.281 ± 0.124
  Theta for others: 0.185
  Proportion difference: 0.097

Disease 15 (signature 3, LR=60.71):
  Theta for diagnosed: 0.171 ± 0.081
  Theta for others: 0.135
  Proportion difference: 0.036

Epoch 16
Loss: 48.2365

Monitoring signature responses:

Disease 19 (signature 4, LR=63.88):
  Theta for diagnosed: 0.205 ± 0.060
  Theta for others: 0.165
  Proportion difference: 0.040

Disease 9 (signature 2, LR=62.44):
  Theta for diagnosed: 0.376 ± 0.262
  Theta for others: 0.092
  Proportion difference: 0.284

Disease 16 (signature 4, LR=61.66):
  Theta for diagnosed: 0.167 ± 0.065
  Theta for others: 0.056
  Proportion difference: 0.111

Disease 2 (signature 0, LR=61.18):
  Theta for diagnosed: 0.281 ± 0.124
  Theta for others: 0.184
  Proportion difference: 0.097

Disease 15 (signature 3, LR=61.05):
  Theta for diagnosed: 0.171 ± 0.081
  Theta for others: 0.135
  Proportion difference: 0.036

Epoch 17
Loss: 40.8137

Monitoring signature responses:

Disease 19 (signature 4, LR=63.88):
  Theta for diagnosed: 0.205 ± 0.060
  Theta for others: 0.165
  Proportion difference: 0.040

Disease 9 (signature 2, LR=62.64):
  Theta for diagnosed: 0.376 ± 0.262
  Theta for others: 0.092
  Proportion difference: 0.284

Disease 16 (signature 4, LR=61.95):
  Theta for diagnosed: 0.167 ± 0.065
  Theta for others: 0.056
  Proportion difference: 0.111

Disease 15 (signature 3, LR=61.38):
  Theta for diagnosed: 0.171 ± 0.081
  Theta for others: 0.135
  Proportion difference: 0.036

Disease 2 (signature 0, LR=61.17):
  Theta for diagnosed: 0.281 ± 0.124
  Theta for others: 0.184
  Proportion difference: 0.097

Epoch 18
Loss: 35.3246

Monitoring signature responses:

Disease 19 (signature 4, LR=63.88):
  Theta for diagnosed: 0.206 ± 0.060
  Theta for others: 0.165
  Proportion difference: 0.040

Disease 9 (signature 2, LR=62.81):
  Theta for diagnosed: 0.376 ± 0.262
  Theta for others: 0.092
  Proportion difference: 0.284

Disease 16 (signature 4, LR=62.23):
  Theta for diagnosed: 0.167 ± 0.065
  Theta for others: 0.056
  Proportion difference: 0.111

Disease 15 (signature 3, LR=61.69):
  Theta for diagnosed: 0.171 ± 0.081
  Theta for others: 0.135
  Proportion difference: 0.036

Disease 2 (signature 0, LR=61.15):
  Theta for diagnosed: 0.281 ± 0.124
  Theta for others: 0.184
  Proportion difference: 0.097

Epoch 19
Loss: 35.4420

Monitoring signature responses:

Disease 19 (signature 4, LR=63.87):
  Theta for diagnosed: 0.206 ± 0.060
  Theta for others: 0.165
  Proportion difference: 0.040

Disease 9 (signature 2, LR=62.96):
  Theta for diagnosed: 0.376 ± 0.262
  Theta for others: 0.092
  Proportion difference: 0.284

Disease 16 (signature 4, LR=62.50):
  Theta for diagnosed: 0.167 ± 0.065
  Theta for others: 0.056
  Proportion difference: 0.111

Disease 15 (signature 3, LR=61.99):
  Theta for diagnosed: 0.171 ± 0.081
  Theta for others: 0.135
  Proportion difference: 0.036

Disease 2 (signature 0, LR=61.13):
  Theta for diagnosed: 0.281 ± 0.124
  Theta for others: 0.184
  Proportion difference: 0.097

Epoch 20
Loss: 39.1136

Monitoring signature responses:

Disease 19 (signature 4, LR=63.86):
  Theta for diagnosed: 0.206 ± 0.061
  Theta for others: 0.165
  Proportion difference: 0.040

Disease 9 (signature 2, LR=63.09):
  Theta for diagnosed: 0.376 ± 0.262
  Theta for others: 0.092
  Proportion difference: 0.284

Disease 16 (signature 4, LR=62.77):
  Theta for diagnosed: 0.167 ± 0.065
  Theta for others: 0.056
  Proportion difference: 0.111

Disease 15 (signature 3, LR=62.27):
  Theta for diagnosed: 0.171 ± 0.081
  Theta for others: 0.134
  Proportion difference: 0.036

Disease 2 (signature 0, LR=61.10):
  Theta for diagnosed: 0.281 ± 0.124
  Theta for others: 0.184
  Proportion difference: 0.097

Epoch 21
Loss: 41.4913

Monitoring signature responses:

Disease 19 (signature 4, LR=63.85):
  Theta for diagnosed: 0.206 ± 0.061
  Theta for others: 0.166
  Proportion difference: 0.040

Disease 9 (signature 2, LR=63.20):
  Theta for diagnosed: 0.375 ± 0.262
  Theta for others: 0.092
  Proportion difference: 0.284

Disease 16 (signature 4, LR=63.02):
  Theta for diagnosed: 0.167 ± 0.065
  Theta for others: 0.056
  Proportion difference: 0.111

Disease 15 (signature 3, LR=62.55):
  Theta for diagnosed: 0.171 ± 0.081
  Theta for others: 0.134
  Proportion difference: 0.036

Disease 2 (signature 0, LR=61.06):
  Theta for diagnosed: 0.281 ± 0.124
  Theta for others: 0.184
  Proportion difference: 0.097

Epoch 22
Loss: 40.0129

Monitoring signature responses:

Disease 19 (signature 4, LR=63.84):
  Theta for diagnosed: 0.206 ± 0.061
  Theta for others: 0.166
  Proportion difference: 0.041

Disease 9 (signature 2, LR=63.29):
  Theta for diagnosed: 0.375 ± 0.262
  Theta for others: 0.092
  Proportion difference: 0.284

Disease 16 (signature 4, LR=63.27):
  Theta for diagnosed: 0.167 ± 0.065
  Theta for others: 0.056
  Proportion difference: 0.111

Disease 15 (signature 3, LR=62.82):
  Theta for diagnosed: 0.171 ± 0.081
  Theta for others: 0.134
  Proportion difference: 0.037

Disease 2 (signature 0, LR=61.01):
  Theta for diagnosed: 0.281 ± 0.124
  Theta for others: 0.184
  Proportion difference: 0.097

Epoch 23
Loss: 36.3076

Monitoring signature responses:

Disease 19 (signature 4, LR=63.83):
  Theta for diagnosed: 0.206 ± 0.061
  Theta for others: 0.166
  Proportion difference: 0.041

Disease 16 (signature 4, LR=63.50):
  Theta for diagnosed: 0.167 ± 0.065
  Theta for others: 0.056
  Proportion difference: 0.111

Disease 9 (signature 2, LR=63.37):
  Theta for diagnosed: 0.375 ± 0.262
  Theta for others: 0.092
  Proportion difference: 0.284

Disease 15 (signature 3, LR=63.07):
  Theta for diagnosed: 0.171 ± 0.081
  Theta for others: 0.134
  Proportion difference: 0.037

Disease 2 (signature 0, LR=60.97):
  Theta for diagnosed: 0.281 ± 0.124
  Theta for others: 0.184
  Proportion difference: 0.097

Epoch 24
Loss: 33.7810

Monitoring signature responses:

Disease 19 (signature 4, LR=63.82):
  Theta for diagnosed: 0.206 ± 0.061
  Theta for others: 0.166
  Proportion difference: 0.041

Disease 16 (signature 4, LR=63.71):
  Theta for diagnosed: 0.167 ± 0.065
  Theta for others: 0.056
  Proportion difference: 0.111

Disease 9 (signature 2, LR=63.43):
  Theta for diagnosed: 0.375 ± 0.262
  Theta for others: 0.092
  Proportion difference: 0.284

Disease 15 (signature 3, LR=63.31):
  Theta for diagnosed: 0.171 ± 0.081
  Theta for others: 0.134
  Proportion difference: 0.037

Disease 2 (signature 0, LR=60.91):
  Theta for diagnosed: 0.281 ± 0.124
  Theta for others: 0.184
  Proportion difference: 0.097

Epoch 25
Loss: 34.1027

Monitoring signature responses:

Disease 16 (signature 4, LR=63.91):
  Theta for diagnosed: 0.167 ± 0.065
  Theta for others: 0.056
  Proportion difference: 0.111

Disease 19 (signature 4, LR=63.81):
  Theta for diagnosed: 0.206 ± 0.061
  Theta for others: 0.166
  Proportion difference: 0.041

Disease 15 (signature 3, LR=63.54):
  Theta for diagnosed: 0.171 ± 0.081
  Theta for others: 0.134
  Proportion difference: 0.037

Disease 9 (signature 2, LR=63.48):
  Theta for diagnosed: 0.375 ± 0.262
  Theta for others: 0.092
  Proportion difference: 0.283

Disease 2 (signature 0, LR=60.86):
  Theta for diagnosed: 0.281 ± 0.124
  Theta for others: 0.184
  Proportion difference: 0.097

Epoch 26
Loss: 35.9472

Monitoring signature responses:

Disease 16 (signature 4, LR=64.10):
  Theta for diagnosed: 0.167 ± 0.065
  Theta for others: 0.056
  Proportion difference: 0.111

Disease 19 (signature 4, LR=63.80):
  Theta for diagnosed: 0.207 ± 0.061
  Theta for others: 0.166
  Proportion difference: 0.041

Disease 15 (signature 3, LR=63.75):
  Theta for diagnosed: 0.171 ± 0.081
  Theta for others: 0.134
  Proportion difference: 0.037

Disease 9 (signature 2, LR=63.51):
  Theta for diagnosed: 0.375 ± 0.262
  Theta for others: 0.092
  Proportion difference: 0.283

Disease 2 (signature 0, LR=60.80):
  Theta for diagnosed: 0.281 ± 0.123
  Theta for others: 0.184
  Proportion difference: 0.097

Epoch 27
Loss: 36.8005

Monitoring signature responses:

Disease 16 (signature 4, LR=64.28):
  Theta for diagnosed: 0.167 ± 0.065
  Theta for others: 0.056
  Proportion difference: 0.111

Disease 15 (signature 3, LR=63.95):
  Theta for diagnosed: 0.171 ± 0.081
  Theta for others: 0.134
  Proportion difference: 0.037

Disease 19 (signature 4, LR=63.79):
  Theta for diagnosed: 0.207 ± 0.061
  Theta for others: 0.166
  Proportion difference: 0.041

Disease 9 (signature 2, LR=63.52):
  Theta for diagnosed: 0.375 ± 0.261
  Theta for others: 0.092
  Proportion difference: 0.283

Disease 2 (signature 0, LR=60.74):
  Theta for diagnosed: 0.281 ± 0.123
  Theta for others: 0.184
  Proportion difference: 0.097

Epoch 28
Loss: 35.6394

Monitoring signature responses:

Disease 16 (signature 4, LR=64.45):
  Theta for diagnosed: 0.167 ± 0.065
  Theta for others: 0.056
  Proportion difference: 0.111

Disease 15 (signature 3, LR=64.13):
  Theta for diagnosed: 0.171 ± 0.081
  Theta for others: 0.134
  Proportion difference: 0.037

Disease 19 (signature 4, LR=63.78):
  Theta for diagnosed: 0.207 ± 0.061
  Theta for others: 0.166
  Proportion difference: 0.041

Disease 9 (signature 2, LR=63.52):
  Theta for diagnosed: 0.375 ± 0.261
  Theta for others: 0.091
  Proportion difference: 0.283

Disease 2 (signature 0, LR=60.67):
  Theta for diagnosed: 0.282 ± 0.123
  Theta for others: 0.184
  Proportion difference: 0.098

Epoch 29
Loss: 33.6519

Monitoring signature responses:

Disease 16 (signature 4, LR=64.60):
  Theta for diagnosed: 0.167 ± 0.065
  Theta for others: 0.056
  Proportion difference: 0.111

Disease 15 (signature 3, LR=64.30):
  Theta for diagnosed: 0.171 ± 0.081
  Theta for others: 0.134
  Proportion difference: 0.037

Disease 19 (signature 4, LR=63.77):
  Theta for diagnosed: 0.207 ± 0.061
  Theta for others: 0.166
  Proportion difference: 0.041

Disease 9 (signature 2, LR=63.51):
  Theta for diagnosed: 0.375 ± 0.261
  Theta for others: 0.091
  Proportion difference: 0.283

Disease 2 (signature 0, LR=60.60):
  Theta for diagnosed: 0.282 ± 0.123
  Theta for others: 0.184
  Proportion difference: 0.098

Epoch 30
Loss: 32.6495

Monitoring signature responses:

Disease 16 (signature 4, LR=64.75):
  Theta for diagnosed: 0.168 ± 0.065
  Theta for others: 0.056
  Proportion difference: 0.111

Disease 15 (signature 3, LR=64.45):
  Theta for diagnosed: 0.171 ± 0.081
  Theta for others: 0.134
  Proportion difference: 0.037

Disease 19 (signature 4, LR=63.76):
  Theta for diagnosed: 0.207 ± 0.061
  Theta for others: 0.166
  Proportion difference: 0.041

Disease 9 (signature 2, LR=63.48):
  Theta for diagnosed: 0.375 ± 0.261
  Theta for others: 0.091
  Proportion difference: 0.283

Disease 12 (signature 3, LR=60.56):
  Theta for diagnosed: 0.168 ± 0.080
  Theta for others: 0.132
  Proportion difference: 0.035

Epoch 31
Loss: 33.1584

Monitoring signature responses:

Disease 16 (signature 4, LR=64.90):
  Theta for diagnosed: 0.168 ± 0.065
  Theta for others: 0.056
  Proportion difference: 0.111

Disease 15 (signature 3, LR=64.60):
  Theta for diagnosed: 0.171 ± 0.081
  Theta for others: 0.134
  Proportion difference: 0.037

Disease 19 (signature 4, LR=63.74):
  Theta for diagnosed: 0.207 ± 0.061
  Theta for others: 0.166
  Proportion difference: 0.042

Disease 9 (signature 2, LR=63.45):
  Theta for diagnosed: 0.374 ± 0.261
  Theta for others: 0.091
  Proportion difference: 0.283

Disease 12 (signature 3, LR=60.71):
  Theta for diagnosed: 0.168 ± 0.080
  Theta for others: 0.132
  Proportion difference: 0.036

Epoch 32
Loss: 34.1069

Monitoring signature responses:

Disease 16 (signature 4, LR=65.03):
  Theta for diagnosed: 0.168 ± 0.065
  Theta for others: 0.056
  Proportion difference: 0.111

Disease 15 (signature 3, LR=64.74):
  Theta for diagnosed: 0.171 ± 0.081
  Theta for others: 0.134
  Proportion difference: 0.038

Disease 19 (signature 4, LR=63.72):
  Theta for diagnosed: 0.208 ± 0.061
  Theta for others: 0.166
  Proportion difference: 0.042

Disease 9 (signature 2, LR=63.40):
  Theta for diagnosed: 0.374 ± 0.261
  Theta for others: 0.091
  Proportion difference: 0.283

Disease 12 (signature 3, LR=60.85):
  Theta for diagnosed: 0.168 ± 0.080
  Theta for others: 0.132
  Proportion difference: 0.036

Epoch 33
Loss: 34.1887

Monitoring signature responses:

Disease 16 (signature 4, LR=65.16):
  Theta for diagnosed: 0.168 ± 0.065
  Theta for others: 0.056
  Proportion difference: 0.111

Disease 15 (signature 3, LR=64.86):
  Theta for diagnosed: 0.171 ± 0.081
  Theta for others: 0.134
  Proportion difference: 0.038

Disease 19 (signature 4, LR=63.69):
  Theta for diagnosed: 0.208 ± 0.061
  Theta for others: 0.166
  Proportion difference: 0.042

Disease 9 (signature 2, LR=63.35):
  Theta for diagnosed: 0.374 ± 0.261
  Theta for others: 0.091
  Proportion difference: 0.283

Disease 12 (signature 3, LR=60.99):
  Theta for diagnosed: 0.168 ± 0.080
  Theta for others: 0.132
  Proportion difference: 0.036

Epoch 34
Loss: 33.2491

Monitoring signature responses:

Disease 16 (signature 4, LR=65.28):
  Theta for diagnosed: 0.168 ± 0.065
  Theta for others: 0.056
  Proportion difference: 0.111

Disease 15 (signature 3, LR=64.98):
  Theta for diagnosed: 0.171 ± 0.081
  Theta for others: 0.134
  Proportion difference: 0.038

Disease 19 (signature 4, LR=63.67):
  Theta for diagnosed: 0.208 ± 0.061
  Theta for others: 0.166
  Proportion difference: 0.042

Disease 9 (signature 2, LR=63.28):
  Theta for diagnosed: 0.374 ± 0.261
  Theta for others: 0.091
  Proportion difference: 0.283

Disease 12 (signature 3, LR=61.12):
  Theta for diagnosed: 0.168 ± 0.080
  Theta for others: 0.132
  Proportion difference: 0.036

Epoch 35
Loss: 32.2364

Monitoring signature responses:

Disease 16 (signature 4, LR=65.40):
  Theta for diagnosed: 0.168 ± 0.065
  Theta for others: 0.056
  Proportion difference: 0.111

Disease 15 (signature 3, LR=65.09):
  Theta for diagnosed: 0.171 ± 0.081
  Theta for others: 0.134
  Proportion difference: 0.038

Disease 19 (signature 4, LR=63.65):
  Theta for diagnosed: 0.208 ± 0.062
  Theta for others: 0.166
  Proportion difference: 0.042

Disease 9 (signature 2, LR=63.21):
  Theta for diagnosed: 0.374 ± 0.261
  Theta for others: 0.091
  Proportion difference: 0.283

Disease 12 (signature 3, LR=61.24):
  Theta for diagnosed: 0.168 ± 0.080
  Theta for others: 0.132
  Proportion difference: 0.036

Epoch 36
Loss: 32.0171

Monitoring signature responses:

Disease 16 (signature 4, LR=65.51):
  Theta for diagnosed: 0.168 ± 0.065
  Theta for others: 0.056
  Proportion difference: 0.111

Disease 15 (signature 3, LR=65.19):
  Theta for diagnosed: 0.172 ± 0.081
  Theta for others: 0.133
  Proportion difference: 0.038

Disease 19 (signature 4, LR=63.62):
  Theta for diagnosed: 0.208 ± 0.062
  Theta for others: 0.166
  Proportion difference: 0.042

Disease 9 (signature 2, LR=63.14):
  Theta for diagnosed: 0.374 ± 0.261
  Theta for others: 0.091
  Proportion difference: 0.283

Disease 12 (signature 3, LR=61.36):
  Theta for diagnosed: 0.168 ± 0.080
  Theta for others: 0.132
  Proportion difference: 0.036

Epoch 37
Loss: 32.4777

Monitoring signature responses:

Disease 16 (signature 4, LR=65.61):
  Theta for diagnosed: 0.168 ± 0.065
  Theta for others: 0.056
  Proportion difference: 0.112

Disease 15 (signature 3, LR=65.28):
  Theta for diagnosed: 0.172 ± 0.081
  Theta for others: 0.133
  Proportion difference: 0.038

Disease 19 (signature 4, LR=63.60):
  Theta for diagnosed: 0.208 ± 0.062
  Theta for others: 0.166
  Proportion difference: 0.042

Disease 9 (signature 2, LR=63.06):
  Theta for diagnosed: 0.374 ± 0.261
  Theta for others: 0.091
  Proportion difference: 0.283

Disease 12 (signature 3, LR=61.47):
  Theta for diagnosed: 0.168 ± 0.080
  Theta for others: 0.132
  Proportion difference: 0.036

Epoch 38
Loss: 32.8135

Monitoring signature responses:

Disease 16 (signature 4, LR=65.71):
  Theta for diagnosed: 0.168 ± 0.065
  Theta for others: 0.056
  Proportion difference: 0.112

Disease 15 (signature 3, LR=65.37):
  Theta for diagnosed: 0.172 ± 0.081
  Theta for others: 0.133
  Proportion difference: 0.038

Disease 19 (signature 4, LR=63.58):
  Theta for diagnosed: 0.209 ± 0.062
  Theta for others: 0.166
  Proportion difference: 0.042

Disease 9 (signature 2, LR=62.98):
  Theta for diagnosed: 0.374 ± 0.261
  Theta for others: 0.091
  Proportion difference: 0.283

Disease 12 (signature 3, LR=61.58):
  Theta for diagnosed: 0.168 ± 0.080
  Theta for others: 0.132
  Proportion difference: 0.036

Epoch 39
Loss: 32.5168

Monitoring signature responses:

Disease 16 (signature 4, LR=65.81):
  Theta for diagnosed: 0.168 ± 0.066
  Theta for others: 0.056
  Proportion difference: 0.112

Disease 15 (signature 3, LR=65.45):
  Theta for diagnosed: 0.172 ± 0.081
  Theta for others: 0.133
  Proportion difference: 0.038

Disease 19 (signature 4, LR=63.56):
  Theta for diagnosed: 0.209 ± 0.062
  Theta for others: 0.166
  Proportion difference: 0.043

Disease 9 (signature 2, LR=62.89):
  Theta for diagnosed: 0.374 ± 0.261
  Theta for others: 0.091
  Proportion difference: 0.283

Disease 12 (signature 3, LR=61.69):
  Theta for diagnosed: 0.168 ± 0.080
  Theta for others: 0.131
  Proportion difference: 0.037

Epoch 40
Loss: 31.8747

Monitoring signature responses:

Disease 16 (signature 4, LR=65.90):
  Theta for diagnosed: 0.168 ± 0.066
  Theta for others: 0.056
  Proportion difference: 0.112

Disease 15 (signature 3, LR=65.52):
  Theta for diagnosed: 0.172 ± 0.081
  Theta for others: 0.133
  Proportion difference: 0.039

Disease 19 (signature 4, LR=63.53):
  Theta for diagnosed: 0.209 ± 0.062
  Theta for others: 0.166
  Proportion difference: 0.043

Disease 9 (signature 2, LR=62.81):
  Theta for diagnosed: 0.374 ± 0.260
  Theta for others: 0.091
  Proportion difference: 0.283

Disease 12 (signature 3, LR=61.79):
  Theta for diagnosed: 0.168 ± 0.080
  Theta for others: 0.131
  Proportion difference: 0.037

Epoch 41
Loss: 31.5104

Monitoring signature responses:

Disease 16 (signature 4, LR=65.99):
  Theta for diagnosed: 0.168 ± 0.066
  Theta for others: 0.056
  Proportion difference: 0.112

Disease 15 (signature 3, LR=65.59):
  Theta for diagnosed: 0.172 ± 0.081
  Theta for others: 0.133
  Proportion difference: 0.039

Disease 19 (signature 4, LR=63.50):
  Theta for diagnosed: 0.209 ± 0.062
  Theta for others: 0.166
  Proportion difference: 0.043

Disease 9 (signature 2, LR=62.72):
  Theta for diagnosed: 0.373 ± 0.260
  Theta for others: 0.091
  Proportion difference: 0.283

Disease 12 (signature 3, LR=61.88):
  Theta for diagnosed: 0.168 ± 0.080
  Theta for others: 0.131
  Proportion difference: 0.037

Epoch 42
Loss: 31.6325

Monitoring signature responses:

Disease 16 (signature 4, LR=66.08):
  Theta for diagnosed: 0.168 ± 0.066
  Theta for others: 0.056
  Proportion difference: 0.112

Disease 15 (signature 3, LR=65.66):
  Theta for diagnosed: 0.172 ± 0.081
  Theta for others: 0.133
  Proportion difference: 0.039

Disease 19 (signature 4, LR=63.48):
  Theta for diagnosed: 0.209 ± 0.062
  Theta for others: 0.166
  Proportion difference: 0.043

Disease 9 (signature 2, LR=62.63):
  Theta for diagnosed: 0.373 ± 0.260
  Theta for others: 0.091
  Proportion difference: 0.283

Disease 12 (signature 3, LR=61.97):
  Theta for diagnosed: 0.168 ± 0.080
  Theta for others: 0.131
  Proportion difference: 0.037

Epoch 43
Loss: 31.8734

Monitoring signature responses:

Disease 16 (signature 4, LR=66.17):
  Theta for diagnosed: 0.168 ± 0.066
  Theta for others: 0.056
  Proportion difference: 0.112

Disease 15 (signature 3, LR=65.72):
  Theta for diagnosed: 0.172 ± 0.081
  Theta for others: 0.133
  Proportion difference: 0.039

Disease 19 (signature 4, LR=63.45):
  Theta for diagnosed: 0.210 ± 0.063
  Theta for others: 0.166
  Proportion difference: 0.043

Disease 9 (signature 2, LR=62.55):
  Theta for diagnosed: 0.373 ± 0.260
  Theta for others: 0.090
  Proportion difference: 0.283

Disease 12 (signature 3, LR=62.06):
  Theta for diagnosed: 0.168 ± 0.080
  Theta for others: 0.131
  Proportion difference: 0.037

Epoch 44
Loss: 31.8070

Monitoring signature responses:

Disease 16 (signature 4, LR=66.26):
  Theta for diagnosed: 0.168 ± 0.066
  Theta for others: 0.056
  Proportion difference: 0.112

Disease 15 (signature 3, LR=65.79):
  Theta for diagnosed: 0.172 ± 0.082
  Theta for others: 0.133
  Proportion difference: 0.039

Disease 19 (signature 4, LR=63.42):
  Theta for diagnosed: 0.210 ± 0.063
  Theta for others: 0.166
  Proportion difference: 0.043

Disease 9 (signature 2, LR=62.46):
  Theta for diagnosed: 0.373 ± 0.260
  Theta for others: 0.090
  Proportion difference: 0.283

Disease 12 (signature 3, LR=62.15):
  Theta for diagnosed: 0.168 ± 0.080
  Theta for others: 0.131
  Proportion difference: 0.038

Epoch 45
Loss: 31.4459

Monitoring signature responses:

Disease 16 (signature 4, LR=66.35):
  Theta for diagnosed: 0.168 ± 0.066
  Theta for others: 0.056
  Proportion difference: 0.112

Disease 15 (signature 3, LR=65.84):
  Theta for diagnosed: 0.172 ± 0.082
  Theta for others: 0.133
  Proportion difference: 0.039

Disease 19 (signature 4, LR=63.39):
  Theta for diagnosed: 0.210 ± 0.063
  Theta for others: 0.166
  Proportion difference: 0.044

Disease 9 (signature 2, LR=62.38):
  Theta for diagnosed: 0.373 ± 0.260
  Theta for others: 0.090
  Proportion difference: 0.283

Disease 12 (signature 3, LR=62.24):
  Theta for diagnosed: 0.168 ± 0.080
  Theta for others: 0.131
  Proportion difference: 0.038

Epoch 46
Loss: 31.1479

Monitoring signature responses:

Disease 16 (signature 4, LR=66.44):
  Theta for diagnosed: 0.168 ± 0.066
  Theta for others: 0.056
  Proportion difference: 0.112

Disease 15 (signature 3, LR=65.90):
  Theta for diagnosed: 0.172 ± 0.082
  Theta for others: 0.132
  Proportion difference: 0.039

Disease 19 (signature 4, LR=63.36):
  Theta for diagnosed: 0.210 ± 0.063
  Theta for others: 0.167
  Proportion difference: 0.044

Disease 12 (signature 3, LR=62.32):
  Theta for diagnosed: 0.168 ± 0.080
  Theta for others: 0.130
  Proportion difference: 0.038

Disease 9 (signature 2, LR=62.30):
  Theta for diagnosed: 0.373 ± 0.260
  Theta for others: 0.090
  Proportion difference: 0.283

Epoch 47
Loss: 31.1377

Monitoring signature responses:

Disease 16 (signature 4, LR=66.53):
  Theta for diagnosed: 0.168 ± 0.066
  Theta for others: 0.056
  Proportion difference: 0.112

Disease 15 (signature 3, LR=65.96):
  Theta for diagnosed: 0.172 ± 0.082
  Theta for others: 0.132
  Proportion difference: 0.040

Disease 19 (signature 4, LR=63.32):
  Theta for diagnosed: 0.210 ± 0.063
  Theta for others: 0.167
  Proportion difference: 0.044

Disease 12 (signature 3, LR=62.41):
  Theta for diagnosed: 0.168 ± 0.080
  Theta for others: 0.130
  Proportion difference: 0.038

Disease 9 (signature 2, LR=62.22):
  Theta for diagnosed: 0.373 ± 0.260
  Theta for others: 0.090
  Proportion difference: 0.283

Epoch 48
Loss: 31.2659

Monitoring signature responses:

Disease 16 (signature 4, LR=66.62):
  Theta for diagnosed: 0.168 ± 0.066
  Theta for others: 0.056
  Proportion difference: 0.112

Disease 15 (signature 3, LR=66.01):
  Theta for diagnosed: 0.172 ± 0.082
  Theta for others: 0.132
  Proportion difference: 0.040

Disease 19 (signature 4, LR=63.29):
  Theta for diagnosed: 0.211 ± 0.063
  Theta for others: 0.167
  Proportion difference: 0.044

Disease 12 (signature 3, LR=62.49):
  Theta for diagnosed: 0.168 ± 0.080
  Theta for others: 0.130
  Proportion difference: 0.038

Disease 9 (signature 2, LR=62.14):
  Theta for diagnosed: 0.373 ± 0.260
  Theta for others: 0.090
  Proportion difference: 0.283

Epoch 49
Loss: 31.2511

Monitoring signature responses:

Disease 16 (signature 4, LR=66.71):
  Theta for diagnosed: 0.168 ± 0.066
  Theta for others: 0.056
  Proportion difference: 0.112

Disease 15 (signature 3, LR=66.07):
  Theta for diagnosed: 0.172 ± 0.082
  Theta for others: 0.132
  Proportion difference: 0.040

Disease 19 (signature 4, LR=63.26):
  Theta for diagnosed: 0.211 ± 0.064
  Theta for others: 0.167
  Proportion difference: 0.044

Disease 12 (signature 3, LR=62.57):
  Theta for diagnosed: 0.168 ± 0.080
  Theta for others: 0.130
  Proportion difference: 0.038

Disease 9 (signature 2, LR=62.07):
  Theta for diagnosed: 0.373 ± 0.260
  Theta for others: 0.090
  Proportion difference: 0.283

Epoch 50
Loss: 31.0400

Monitoring signature responses:

Disease 16 (signature 4, LR=66.81):
  Theta for diagnosed: 0.168 ± 0.066
  Theta for others: 0.056
  Proportion difference: 0.112

Disease 15 (signature 3, LR=66.13):
  Theta for diagnosed: 0.172 ± 0.082
  Theta for others: 0.132
  Proportion difference: 0.040

Disease 19 (signature 4, LR=63.23):
  Theta for diagnosed: 0.211 ± 0.064
  Theta for others: 0.167
  Proportion difference: 0.044

Disease 12 (signature 3, LR=62.66):
  Theta for diagnosed: 0.168 ± 0.080
  Theta for others: 0.130
  Proportion difference: 0.039

Disease 9 (signature 2, LR=62.00):
  Theta for diagnosed: 0.372 ± 0.260
  Theta for others: 0.090
  Proportion difference: 0.283

Epoch 51
Loss: 30.8307

Monitoring signature responses:

Disease 16 (signature 4, LR=66.90):
  Theta for diagnosed: 0.168 ± 0.066
  Theta for others: 0.056
  Proportion difference: 0.112

Disease 15 (signature 3, LR=66.18):
  Theta for diagnosed: 0.172 ± 0.082
  Theta for others: 0.132
  Proportion difference: 0.040

Disease 19 (signature 4, LR=63.19):
  Theta for diagnosed: 0.211 ± 0.064
  Theta for others: 0.167
  Proportion difference: 0.045

Disease 12 (signature 3, LR=62.74):
  Theta for diagnosed: 0.168 ± 0.081
  Theta for others: 0.130
  Proportion difference: 0.039

Disease 9 (signature 2, LR=61.93):
  Theta for diagnosed: 0.372 ± 0.260
  Theta for others: 0.090
  Proportion difference: 0.282

Epoch 52
Loss: 30.7870

Monitoring signature responses:

Disease 16 (signature 4, LR=67.00):
  Theta for diagnosed: 0.169 ± 0.067
  Theta for others: 0.056
  Proportion difference: 0.112

Disease 15 (signature 3, LR=66.24):
  Theta for diagnosed: 0.172 ± 0.082
  Theta for others: 0.132
  Proportion difference: 0.040

Disease 19 (signature 4, LR=63.16):
  Theta for diagnosed: 0.211 ± 0.064
  Theta for others: 0.167
  Proportion difference: 0.045

Disease 12 (signature 3, LR=62.83):
  Theta for diagnosed: 0.168 ± 0.081
  Theta for others: 0.129
  Proportion difference: 0.039

Disease 9 (signature 2, LR=61.87):
  Theta for diagnosed: 0.372 ± 0.260
  Theta for others: 0.090
  Proportion difference: 0.282

Epoch 53
Loss: 30.8430

Monitoring signature responses:

Disease 16 (signature 4, LR=67.10):
  Theta for diagnosed: 0.169 ± 0.067
  Theta for others: 0.056
  Proportion difference: 0.112

Disease 15 (signature 3, LR=66.30):
  Theta for diagnosed: 0.172 ± 0.082
  Theta for others: 0.132
  Proportion difference: 0.041

Disease 19 (signature 4, LR=63.12):
  Theta for diagnosed: 0.212 ± 0.064
  Theta for others: 0.167
  Proportion difference: 0.045

Disease 12 (signature 3, LR=62.92):
  Theta for diagnosed: 0.168 ± 0.081
  Theta for others: 0.129
  Proportion difference: 0.039

Disease 9 (signature 2, LR=61.81):
  Theta for diagnosed: 0.372 ± 0.259
  Theta for others: 0.090
  Proportion difference: 0.282

Epoch 54
Loss: 30.8255

Monitoring signature responses:

Disease 16 (signature 4, LR=67.21):
  Theta for diagnosed: 0.169 ± 0.067
  Theta for others: 0.056
  Proportion difference: 0.112

Disease 15 (signature 3, LR=66.36):
  Theta for diagnosed: 0.172 ± 0.082
  Theta for others: 0.131
  Proportion difference: 0.041

Disease 19 (signature 4, LR=63.09):
  Theta for diagnosed: 0.212 ± 0.065
  Theta for others: 0.167
  Proportion difference: 0.045

Disease 12 (signature 3, LR=63.01):
  Theta for diagnosed: 0.168 ± 0.081
  Theta for others: 0.129
  Proportion difference: 0.039

Disease 9 (signature 2, LR=61.76):
  Theta for diagnosed: 0.372 ± 0.259
  Theta for others: 0.090
  Proportion difference: 0.282

Epoch 55
Loss: 30.6884

Monitoring signature responses:

Disease 16 (signature 4, LR=67.32):
  Theta for diagnosed: 0.169 ± 0.067
  Theta for others: 0.056
  Proportion difference: 0.112

Disease 15 (signature 3, LR=66.43):
  Theta for diagnosed: 0.172 ± 0.082
  Theta for others: 0.131
  Proportion difference: 0.041

Disease 12 (signature 3, LR=63.10):
  Theta for diagnosed: 0.168 ± 0.081
  Theta for others: 0.129
  Proportion difference: 0.039

Disease 19 (signature 4, LR=63.05):
  Theta for diagnosed: 0.212 ± 0.065
  Theta for others: 0.167
  Proportion difference: 0.045

Disease 9 (signature 2, LR=61.71):
  Theta for diagnosed: 0.372 ± 0.259
  Theta for others: 0.090
  Proportion difference: 0.282

Epoch 56
Loss: 30.5477

Monitoring signature responses:

Disease 16 (signature 4, LR=67.43):
  Theta for diagnosed: 0.169 ± 0.067
  Theta for others: 0.056
  Proportion difference: 0.113

Disease 15 (signature 3, LR=66.49):
  Theta for diagnosed: 0.172 ± 0.082
  Theta for others: 0.131
  Proportion difference: 0.041

Disease 12 (signature 3, LR=63.19):
  Theta for diagnosed: 0.169 ± 0.081
  Theta for others: 0.129
  Proportion difference: 0.040

Disease 19 (signature 4, LR=63.02):
  Theta for diagnosed: 0.212 ± 0.065
  Theta for others: 0.167
  Proportion difference: 0.045

Disease 9 (signature 2, LR=61.67):
  Theta for diagnosed: 0.372 ± 0.259
  Theta for others: 0.089
  Proportion difference: 0.282

Epoch 57
Loss: 30.5050

Monitoring signature responses:

Disease 16 (signature 4, LR=67.55):
  Theta for diagnosed: 0.169 ± 0.067
  Theta for others: 0.056
  Proportion difference: 0.113

Disease 15 (signature 3, LR=66.56):
  Theta for diagnosed: 0.172 ± 0.082
  Theta for others: 0.131
  Proportion difference: 0.041

Disease 12 (signature 3, LR=63.29):
  Theta for diagnosed: 0.169 ± 0.081
  Theta for others: 0.129
  Proportion difference: 0.040

Disease 19 (signature 4, LR=62.98):
  Theta for diagnosed: 0.213 ± 0.065
  Theta for others: 0.167
  Proportion difference: 0.046

Disease 9 (signature 2, LR=61.63):
  Theta for diagnosed: 0.372 ± 0.259
  Theta for others: 0.089
  Proportion difference: 0.282

Epoch 58
Loss: 30.5205

Monitoring signature responses:

Disease 16 (signature 4, LR=67.66):
  Theta for diagnosed: 0.169 ± 0.067
  Theta for others: 0.056
  Proportion difference: 0.113

Disease 15 (signature 3, LR=66.64):
  Theta for diagnosed: 0.172 ± 0.082
  Theta for others: 0.131
  Proportion difference: 0.041

Disease 12 (signature 3, LR=63.39):
  Theta for diagnosed: 0.169 ± 0.081
  Theta for others: 0.129
  Proportion difference: 0.040

Disease 19 (signature 4, LR=62.94):
  Theta for diagnosed: 0.213 ± 0.065
  Theta for others: 0.167
  Proportion difference: 0.046

Disease 9 (signature 2, LR=61.60):
  Theta for diagnosed: 0.372 ± 0.259
  Theta for others: 0.089
  Proportion difference: 0.282

Epoch 59
Loss: 30.4890

Monitoring signature responses:

Disease 16 (signature 4, LR=67.79):
  Theta for diagnosed: 0.169 ± 0.067
  Theta for others: 0.056
  Proportion difference: 0.113

Disease 15 (signature 3, LR=66.71):
  Theta for diagnosed: 0.172 ± 0.083
  Theta for others: 0.131
  Proportion difference: 0.042

Disease 12 (signature 3, LR=63.49):
  Theta for diagnosed: 0.169 ± 0.081
  Theta for others: 0.128
  Proportion difference: 0.040

Disease 19 (signature 4, LR=62.90):
  Theta for diagnosed: 0.213 ± 0.066
  Theta for others: 0.167
  Proportion difference: 0.046

Disease 17 (signature 4, LR=61.60):
  Theta for diagnosed: 0.169 ± 0.067
  Theta for others: 0.121
  Proportion difference: 0.048

Epoch 60
Loss: 30.3885

Monitoring signature responses:

Disease 16 (signature 4, LR=67.91):
  Theta for diagnosed: 0.169 ± 0.067
  Theta for others: 0.056
  Proportion difference: 0.113

Disease 15 (signature 3, LR=66.79):
  Theta for diagnosed: 0.173 ± 0.083
  Theta for others: 0.131
  Proportion difference: 0.042

Disease 12 (signature 3, LR=63.59):
  Theta for diagnosed: 0.169 ± 0.081
  Theta for others: 0.128
  Proportion difference: 0.040

Disease 19 (signature 4, LR=62.86):
  Theta for diagnosed: 0.213 ± 0.066
  Theta for others: 0.167
  Proportion difference: 0.046

Disease 17 (signature 4, LR=61.76):
  Theta for diagnosed: 0.169 ± 0.067
  Theta for others: 0.121
  Proportion difference: 0.048

Epoch 61
Loss: 30.2934

Monitoring signature responses:

Disease 16 (signature 4, LR=68.04):
  Theta for diagnosed: 0.169 ± 0.067
  Theta for others: 0.056
  Proportion difference: 0.113

Disease 15 (signature 3, LR=66.87):
  Theta for diagnosed: 0.173 ± 0.083
  Theta for others: 0.131
  Proportion difference: 0.042

Disease 12 (signature 3, LR=63.70):
  Theta for diagnosed: 0.169 ± 0.081
  Theta for others: 0.128
  Proportion difference: 0.041

Disease 19 (signature 4, LR=62.82):
  Theta for diagnosed: 0.214 ± 0.066
  Theta for others: 0.167
  Proportion difference: 0.046

Disease 17 (signature 4, LR=61.91):
  Theta for diagnosed: 0.169 ± 0.068
  Theta for others: 0.121
  Proportion difference: 0.048

Epoch 62
Loss: 30.2591

Monitoring signature responses:

Disease 16 (signature 4, LR=68.18):
  Theta for diagnosed: 0.169 ± 0.068
  Theta for others: 0.056
  Proportion difference: 0.113

Disease 15 (signature 3, LR=66.95):
  Theta for diagnosed: 0.173 ± 0.083
  Theta for others: 0.130
  Proportion difference: 0.042

Disease 12 (signature 3, LR=63.81):
  Theta for diagnosed: 0.169 ± 0.081
  Theta for others: 0.128
  Proportion difference: 0.041

Disease 19 (signature 4, LR=62.79):
  Theta for diagnosed: 0.214 ± 0.067
  Theta for others: 0.167
  Proportion difference: 0.047

Disease 17 (signature 4, LR=62.07):
  Theta for diagnosed: 0.170 ± 0.068
  Theta for others: 0.121
  Proportion difference: 0.049

Epoch 63
Loss: 30.2515

Monitoring signature responses:

Disease 16 (signature 4, LR=68.32):
  Theta for diagnosed: 0.169 ± 0.068
  Theta for others: 0.056
  Proportion difference: 0.113

Disease 15 (signature 3, LR=67.04):
  Theta for diagnosed: 0.173 ± 0.083
  Theta for others: 0.130
  Proportion difference: 0.042

Disease 12 (signature 3, LR=63.92):
  Theta for diagnosed: 0.169 ± 0.082
  Theta for others: 0.128
  Proportion difference: 0.041

Disease 19 (signature 4, LR=62.75):
  Theta for diagnosed: 0.214 ± 0.067
  Theta for others: 0.167
  Proportion difference: 0.047

Disease 17 (signature 4, LR=62.23):
  Theta for diagnosed: 0.170 ± 0.068
  Theta for others: 0.121
  Proportion difference: 0.049

Epoch 64
Loss: 30.2087

Monitoring signature responses:

Disease 16 (signature 4, LR=68.46):
  Theta for diagnosed: 0.169 ± 0.068
  Theta for others: 0.056
  Proportion difference: 0.113

Disease 15 (signature 3, LR=67.13):
  Theta for diagnosed: 0.173 ± 0.083
  Theta for others: 0.130
  Proportion difference: 0.042

Disease 12 (signature 3, LR=64.04):
  Theta for diagnosed: 0.169 ± 0.082
  Theta for others: 0.128
  Proportion difference: 0.041

Disease 19 (signature 4, LR=62.71):
  Theta for diagnosed: 0.214 ± 0.067
  Theta for others: 0.167
  Proportion difference: 0.047

Disease 17 (signature 4, LR=62.39):
  Theta for diagnosed: 0.170 ± 0.068
  Theta for others: 0.121
  Proportion difference: 0.049

Epoch 65
Loss: 30.1294

Monitoring signature responses:

Disease 16 (signature 4, LR=68.61):
  Theta for diagnosed: 0.169 ± 0.068
  Theta for others: 0.056
  Proportion difference: 0.113

Disease 15 (signature 3, LR=67.23):
  Theta for diagnosed: 0.173 ± 0.083
  Theta for others: 0.130
  Proportion difference: 0.043

Disease 12 (signature 3, LR=64.16):
  Theta for diagnosed: 0.169 ± 0.082
  Theta for others: 0.127
  Proportion difference: 0.041

Disease 19 (signature 4, LR=62.66):
  Theta for diagnosed: 0.214 ± 0.067
  Theta for others: 0.167
  Proportion difference: 0.047

Disease 17 (signature 4, LR=62.55):
  Theta for diagnosed: 0.170 ± 0.068
  Theta for others: 0.121
  Proportion difference: 0.049

Epoch 66
Loss: 30.0635

Monitoring signature responses:

Disease 16 (signature 4, LR=68.76):
  Theta for diagnosed: 0.169 ± 0.068
  Theta for others: 0.056
  Proportion difference: 0.113

Disease 15 (signature 3, LR=67.32):
  Theta for diagnosed: 0.173 ± 0.083
  Theta for others: 0.130
  Proportion difference: 0.043

Disease 12 (signature 3, LR=64.28):
  Theta for diagnosed: 0.169 ± 0.082
  Theta for others: 0.127
  Proportion difference: 0.042

Disease 17 (signature 4, LR=62.71):
  Theta for diagnosed: 0.170 ± 0.068
  Theta for others: 0.120
  Proportion difference: 0.049

Disease 19 (signature 4, LR=62.62):
  Theta for diagnosed: 0.215 ± 0.068
  Theta for others: 0.167
  Proportion difference: 0.047

Epoch 67
Loss: 30.0345

Monitoring signature responses:

Disease 16 (signature 4, LR=68.91):
  Theta for diagnosed: 0.169 ± 0.068
  Theta for others: 0.056
  Proportion difference: 0.113

Disease 15 (signature 3, LR=67.42):
  Theta for diagnosed: 0.173 ± 0.083
  Theta for others: 0.130
  Proportion difference: 0.043

Disease 12 (signature 3, LR=64.41):
  Theta for diagnosed: 0.169 ± 0.082
  Theta for others: 0.127
  Proportion difference: 0.042

Disease 17 (signature 4, LR=62.88):
  Theta for diagnosed: 0.170 ± 0.068
  Theta for others: 0.120
  Proportion difference: 0.049

Disease 19 (signature 4, LR=62.58):
  Theta for diagnosed: 0.215 ± 0.068
  Theta for others: 0.167
  Proportion difference: 0.047

Epoch 68
Loss: 30.0119

Monitoring signature responses:

Disease 16 (signature 4, LR=69.07):
  Theta for diagnosed: 0.169 ± 0.068
  Theta for others: 0.056
  Proportion difference: 0.113

Disease 15 (signature 3, LR=67.53):
  Theta for diagnosed: 0.173 ± 0.083
  Theta for others: 0.130
  Proportion difference: 0.043

Disease 12 (signature 3, LR=64.54):
  Theta for diagnosed: 0.169 ± 0.082
  Theta for others: 0.127
  Proportion difference: 0.042

Disease 17 (signature 4, LR=63.04):
  Theta for diagnosed: 0.170 ± 0.069
  Theta for others: 0.120
  Proportion difference: 0.050

Disease 19 (signature 4, LR=62.54):
  Theta for diagnosed: 0.215 ± 0.068
  Theta for others: 0.168
  Proportion difference: 0.048

Epoch 69
Loss: 29.9632

Monitoring signature responses:

Disease 16 (signature 4, LR=69.23):
  Theta for diagnosed: 0.169 ± 0.069
  Theta for others: 0.056
  Proportion difference: 0.113

Disease 15 (signature 3, LR=67.64):
  Theta for diagnosed: 0.173 ± 0.084
  Theta for others: 0.130
  Proportion difference: 0.043

Disease 12 (signature 3, LR=64.67):
  Theta for diagnosed: 0.169 ± 0.082
  Theta for others: 0.127
  Proportion difference: 0.042

Disease 17 (signature 4, LR=63.21):
  Theta for diagnosed: 0.170 ± 0.069
  Theta for others: 0.120
  Proportion difference: 0.050

Disease 19 (signature 4, LR=62.50):
  Theta for diagnosed: 0.215 ± 0.068
  Theta for others: 0.168
  Proportion difference: 0.048

Epoch 70
Loss: 29.8992

Monitoring signature responses:

Disease 16 (signature 4, LR=69.39):
  Theta for diagnosed: 0.169 ± 0.069
  Theta for others: 0.056
  Proportion difference: 0.113

Disease 15 (signature 3, LR=67.75):
  Theta for diagnosed: 0.173 ± 0.084
  Theta for others: 0.129
  Proportion difference: 0.044

Disease 12 (signature 3, LR=64.80):
  Theta for diagnosed: 0.169 ± 0.082
  Theta for others: 0.127
  Proportion difference: 0.042

Disease 17 (signature 4, LR=63.38):
  Theta for diagnosed: 0.170 ± 0.069
  Theta for others: 0.120
  Proportion difference: 0.050

Disease 19 (signature 4, LR=62.46):
  Theta for diagnosed: 0.216 ± 0.069
  Theta for others: 0.168
  Proportion difference: 0.048

Epoch 71
Loss: 29.8513

Monitoring signature responses:

Disease 16 (signature 4, LR=69.56):
  Theta for diagnosed: 0.170 ± 0.069
  Theta for others: 0.056
  Proportion difference: 0.113

Disease 15 (signature 3, LR=67.86):
  Theta for diagnosed: 0.173 ± 0.084
  Theta for others: 0.129
  Proportion difference: 0.044

Disease 12 (signature 3, LR=64.94):
  Theta for diagnosed: 0.169 ± 0.082
  Theta for others: 0.126
  Proportion difference: 0.043

Disease 17 (signature 4, LR=63.55):
  Theta for diagnosed: 0.170 ± 0.069
  Theta for others: 0.120
  Proportion difference: 0.050

Disease 19 (signature 4, LR=62.41):
  Theta for diagnosed: 0.216 ± 0.069
  Theta for others: 0.168
  Proportion difference: 0.048

Epoch 72
Loss: 29.8229

Monitoring signature responses:

Disease 16 (signature 4, LR=69.74):
  Theta for diagnosed: 0.170 ± 0.069
  Theta for others: 0.056
  Proportion difference: 0.114

Disease 15 (signature 3, LR=67.98):
  Theta for diagnosed: 0.173 ± 0.084
  Theta for others: 0.129
  Proportion difference: 0.044

Disease 12 (signature 3, LR=65.08):
  Theta for diagnosed: 0.169 ± 0.082
  Theta for others: 0.126
  Proportion difference: 0.043

Disease 17 (signature 4, LR=63.72):
  Theta for diagnosed: 0.170 ± 0.069
  Theta for others: 0.120
  Proportion difference: 0.050

Disease 19 (signature 4, LR=62.37):
  Theta for diagnosed: 0.216 ± 0.069
  Theta for others: 0.168
  Proportion difference: 0.049

Epoch 73
Loss: 29.7901

Monitoring signature responses:

Disease 16 (signature 4, LR=69.91):
  Theta for diagnosed: 0.170 ± 0.069
  Theta for others: 0.056
  Proportion difference: 0.114

Disease 15 (signature 3, LR=68.09):
  Theta for diagnosed: 0.173 ± 0.084
  Theta for others: 0.129
  Proportion difference: 0.044

Disease 12 (signature 3, LR=65.22):
  Theta for diagnosed: 0.169 ± 0.083
  Theta for others: 0.126
  Proportion difference: 0.043

Disease 17 (signature 4, LR=63.89):
  Theta for diagnosed: 0.170 ± 0.069
  Theta for others: 0.120
  Proportion difference: 0.051

Disease 19 (signature 4, LR=62.33):
  Theta for diagnosed: 0.216 ± 0.070
  Theta for others: 0.168
  Proportion difference: 0.049

Epoch 74
Loss: 29.7403

Monitoring signature responses:

Disease 16 (signature 4, LR=70.09):
  Theta for diagnosed: 0.170 ± 0.069
  Theta for others: 0.056
  Proportion difference: 0.114

Disease 15 (signature 3, LR=68.22):
  Theta for diagnosed: 0.173 ± 0.084
  Theta for others: 0.129
  Proportion difference: 0.044

Disease 12 (signature 3, LR=65.36):
  Theta for diagnosed: 0.169 ± 0.083
  Theta for others: 0.126
  Proportion difference: 0.043

Disease 17 (signature 4, LR=64.06):
  Theta for diagnosed: 0.170 ± 0.069
  Theta for others: 0.119
  Proportion difference: 0.051

Disease 19 (signature 4, LR=62.28):
  Theta for diagnosed: 0.217 ± 0.070
  Theta for others: 0.168
  Proportion difference: 0.049

Epoch 75
Loss: 29.6886

Monitoring signature responses:

Disease 16 (signature 4, LR=70.27):
  Theta for diagnosed: 0.170 ± 0.069
  Theta for others: 0.056
  Proportion difference: 0.114

Disease 15 (signature 3, LR=68.34):
  Theta for diagnosed: 0.173 ± 0.084
  Theta for others: 0.129
  Proportion difference: 0.044

Disease 12 (signature 3, LR=65.51):
  Theta for diagnosed: 0.169 ± 0.083
  Theta for others: 0.126
  Proportion difference: 0.043

Disease 17 (signature 4, LR=64.24):
  Theta for diagnosed: 0.170 ± 0.070
  Theta for others: 0.119
  Proportion difference: 0.051

Disease 19 (signature 4, LR=62.24):
  Theta for diagnosed: 0.217 ± 0.070
  Theta for others: 0.168
  Proportion difference: 0.049

Epoch 76
Loss: 29.6506

Monitoring signature responses:

Disease 16 (signature 4, LR=70.46):
  Theta for diagnosed: 0.170 ± 0.070
  Theta for others: 0.056
  Proportion difference: 0.114

Disease 15 (signature 3, LR=68.47):
  Theta for diagnosed: 0.173 ± 0.084
  Theta for others: 0.129
  Proportion difference: 0.045

Disease 12 (signature 3, LR=65.66):
  Theta for diagnosed: 0.169 ± 0.083
  Theta for others: 0.126
  Proportion difference: 0.044

Disease 17 (signature 4, LR=64.41):
  Theta for diagnosed: 0.170 ± 0.070
  Theta for others: 0.119
  Proportion difference: 0.051

Disease 19 (signature 4, LR=62.19):
  Theta for diagnosed: 0.217 ± 0.071
  Theta for others: 0.168
  Proportion difference: 0.049

Epoch 77
Loss: 29.6196

Monitoring signature responses:

Disease 16 (signature 4, LR=70.65):
  Theta for diagnosed: 0.170 ± 0.070
  Theta for others: 0.056
  Proportion difference: 0.114

Disease 15 (signature 3, LR=68.60):
  Theta for diagnosed: 0.173 ± 0.084
  Theta for others: 0.128
  Proportion difference: 0.045

Disease 12 (signature 3, LR=65.81):
  Theta for diagnosed: 0.169 ± 0.083
  Theta for others: 0.125
  Proportion difference: 0.044

Disease 17 (signature 4, LR=64.59):
  Theta for diagnosed: 0.170 ± 0.070
  Theta for others: 0.119
  Proportion difference: 0.051

Disease 19 (signature 4, LR=62.15):
  Theta for diagnosed: 0.218 ± 0.071
  Theta for others: 0.168
  Proportion difference: 0.050

Epoch 78
Loss: 29.5805

Monitoring signature responses:

Disease 16 (signature 4, LR=70.84):
  Theta for diagnosed: 0.170 ± 0.070
  Theta for others: 0.056
  Proportion difference: 0.114

Disease 15 (signature 3, LR=68.73):
  Theta for diagnosed: 0.173 ± 0.085
  Theta for others: 0.128
  Proportion difference: 0.045

Disease 12 (signature 3, LR=65.97):
  Theta for diagnosed: 0.169 ± 0.083
  Theta for others: 0.125
  Proportion difference: 0.044

Disease 17 (signature 4, LR=64.77):
  Theta for diagnosed: 0.170 ± 0.070
  Theta for others: 0.119
  Proportion difference: 0.052

Disease 19 (signature 4, LR=62.10):
  Theta for diagnosed: 0.218 ± 0.071
  Theta for others: 0.168
  Proportion difference: 0.050

Epoch 79
Loss: 29.5335

Monitoring signature responses:

Disease 16 (signature 4, LR=71.03):
  Theta for diagnosed: 0.170 ± 0.070
  Theta for others: 0.056
  Proportion difference: 0.114

Disease 15 (signature 3, LR=68.86):
  Theta for diagnosed: 0.173 ± 0.085
  Theta for others: 0.128
  Proportion difference: 0.045

Disease 12 (signature 3, LR=66.12):
  Theta for diagnosed: 0.169 ± 0.083
  Theta for others: 0.125
  Proportion difference: 0.044

Disease 17 (signature 4, LR=64.95):
  Theta for diagnosed: 0.171 ± 0.070
  Theta for others: 0.119
  Proportion difference: 0.052

Disease 7 (signature 1, LR=62.28):
  Theta for diagnosed: 0.190 ± 0.113
  Theta for others: nan
  Proportion difference: nan

Epoch 80
Loss: 29.4910

Monitoring signature responses:

Disease 16 (signature 4, LR=71.23):
  Theta for diagnosed: 0.170 ± 0.070
  Theta for others: 0.056
  Proportion difference: 0.114

Disease 15 (signature 3, LR=68.99):
  Theta for diagnosed: 0.173 ± 0.085
  Theta for others: 0.128
  Proportion difference: 0.045

Disease 12 (signature 3, LR=66.28):
  Theta for diagnosed: 0.169 ± 0.083
  Theta for others: 0.125
  Proportion difference: 0.044

Disease 17 (signature 4, LR=65.13):
  Theta for diagnosed: 0.171 ± 0.070
  Theta for others: 0.119
  Proportion difference: 0.052

Disease 7 (signature 1, LR=62.48):
  Theta for diagnosed: 0.190 ± 0.114
  Theta for others: nan
  Proportion difference: nan

Epoch 81
Loss: 29.4569

Monitoring signature responses:

Disease 16 (signature 4, LR=71.43):
  Theta for diagnosed: 0.170 ± 0.070
  Theta for others: 0.056
  Proportion difference: 0.114

Disease 15 (signature 3, LR=69.13):
  Theta for diagnosed: 0.173 ± 0.085
  Theta for others: 0.128
  Proportion difference: 0.046

Disease 12 (signature 3, LR=66.44):
  Theta for diagnosed: 0.169 ± 0.084
  Theta for others: 0.125
  Proportion difference: 0.045

Disease 17 (signature 4, LR=65.30):
  Theta for diagnosed: 0.171 ± 0.071
  Theta for others: 0.118
  Proportion difference: 0.052

Disease 7 (signature 1, LR=62.68):
  Theta for diagnosed: 0.191 ± 0.114
  Theta for others: nan
  Proportion difference: nan

Epoch 82
Loss: 29.4221

Monitoring signature responses:

Disease 16 (signature 4, LR=71.63):
  Theta for diagnosed: 0.170 ± 0.071
  Theta for others: 0.056
  Proportion difference: 0.114

Disease 15 (signature 3, LR=69.27):
  Theta for diagnosed: 0.174 ± 0.085
  Theta for others: 0.128
  Proportion difference: 0.046

Disease 12 (signature 3, LR=66.61):
  Theta for diagnosed: 0.169 ± 0.084
  Theta for others: 0.125
  Proportion difference: 0.045

Disease 17 (signature 4, LR=65.48):
  Theta for diagnosed: 0.171 ± 0.071
  Theta for others: 0.118
  Proportion difference: 0.052

Disease 7 (signature 1, LR=62.89):
  Theta for diagnosed: 0.191 ± 0.114
  Theta for others: nan
  Proportion difference: nan

Epoch 83
Loss: 29.3808

Monitoring signature responses:

Disease 16 (signature 4, LR=71.83):
  Theta for diagnosed: 0.170 ± 0.071
  Theta for others: 0.056
  Proportion difference: 0.114

Disease 15 (signature 3, LR=69.41):
  Theta for diagnosed: 0.174 ± 0.085
  Theta for others: 0.128
  Proportion difference: 0.046

Disease 12 (signature 3, LR=66.77):
  Theta for diagnosed: 0.169 ± 0.084
  Theta for others: 0.124
  Proportion difference: 0.045

Disease 17 (signature 4, LR=65.67):
  Theta for diagnosed: 0.171 ± 0.071
  Theta for others: 0.118
  Proportion difference: 0.053

Disease 7 (signature 1, LR=63.09):
  Theta for diagnosed: 0.191 ± 0.114
  Theta for others: nan
  Proportion difference: nan

Epoch 84
Loss: 29.3385

Monitoring signature responses:

Disease 16 (signature 4, LR=72.04):
  Theta for diagnosed: 0.170 ± 0.071
  Theta for others: 0.056
  Proportion difference: 0.114

Disease 15 (signature 3, LR=69.55):
  Theta for diagnosed: 0.174 ± 0.085
  Theta for others: 0.127
  Proportion difference: 0.046

Disease 12 (signature 3, LR=66.94):
  Theta for diagnosed: 0.169 ± 0.084
  Theta for others: 0.124
  Proportion difference: 0.045

Disease 17 (signature 4, LR=65.85):
  Theta for diagnosed: 0.171 ± 0.071
  Theta for others: 0.118
  Proportion difference: 0.053

Disease 7 (signature 1, LR=63.30):
  Theta for diagnosed: 0.191 ± 0.114
  Theta for others: nan
  Proportion difference: nan

Epoch 85
Loss: 29.3017

Monitoring signature responses:

Disease 16 (signature 4, LR=72.25):
  Theta for diagnosed: 0.170 ± 0.071
  Theta for others: 0.056
  Proportion difference: 0.114

Disease 15 (signature 3, LR=69.69):
  Theta for diagnosed: 0.174 ± 0.086
  Theta for others: 0.127
  Proportion difference: 0.046

Disease 12 (signature 3, LR=67.11):
  Theta for diagnosed: 0.169 ± 0.084
  Theta for others: 0.124
  Proportion difference: 0.045

Disease 17 (signature 4, LR=66.03):
  Theta for diagnosed: 0.171 ± 0.071
  Theta for others: 0.118
  Proportion difference: 0.053

Disease 7 (signature 1, LR=63.51):
  Theta for diagnosed: 0.191 ± 0.114
  Theta for others: nan
  Proportion difference: nan

Epoch 86
Loss: 29.2676

Monitoring signature responses:

Disease 16 (signature 4, LR=72.46):
  Theta for diagnosed: 0.170 ± 0.071
  Theta for others: 0.056
  Proportion difference: 0.114

Disease 15 (signature 3, LR=69.84):
  Theta for diagnosed: 0.174 ± 0.086
  Theta for others: 0.127
  Proportion difference: 0.047

Disease 12 (signature 3, LR=67.28):
  Theta for diagnosed: 0.169 ± 0.084
  Theta for others: 0.124
  Proportion difference: 0.046

Disease 17 (signature 4, LR=66.21):
  Theta for diagnosed: 0.171 ± 0.072
  Theta for others: 0.118
  Proportion difference: 0.053

Disease 7 (signature 1, LR=63.72):
  Theta for diagnosed: 0.191 ± 0.115
  Theta for others: nan
  Proportion difference: nan

Epoch 87
Loss: 29.2301

Monitoring signature responses:

Disease 16 (signature 4, LR=72.67):
  Theta for diagnosed: 0.170 ± 0.072
  Theta for others: 0.056
  Proportion difference: 0.115

Disease 15 (signature 3, LR=69.98):
  Theta for diagnosed: 0.174 ± 0.086
  Theta for others: 0.127
  Proportion difference: 0.047

Disease 12 (signature 3, LR=67.45):
  Theta for diagnosed: 0.169 ± 0.084
  Theta for others: 0.124
  Proportion difference: 0.046

Disease 17 (signature 4, LR=66.39):
  Theta for diagnosed: 0.171 ± 0.072
  Theta for others: 0.118
  Proportion difference: 0.053

Disease 7 (signature 1, LR=63.93):
  Theta for diagnosed: 0.191 ± 0.115
  Theta for others: nan
  Proportion difference: nan

Epoch 88
Loss: 29.1899

Monitoring signature responses:

Disease 16 (signature 4, LR=72.88):
  Theta for diagnosed: 0.170 ± 0.072
  Theta for others: 0.056
  Proportion difference: 0.115

Disease 15 (signature 3, LR=70.13):
  Theta for diagnosed: 0.174 ± 0.086
  Theta for others: 0.127
  Proportion difference: 0.047

Disease 12 (signature 3, LR=67.62):
  Theta for diagnosed: 0.169 ± 0.085
  Theta for others: 0.124
  Proportion difference: 0.046

Disease 17 (signature 4, LR=66.58):
  Theta for diagnosed: 0.171 ± 0.072
  Theta for others: 0.117
  Proportion difference: 0.054

Disease 7 (signature 1, LR=64.15):
  Theta for diagnosed: 0.191 ± 0.115
  Theta for others: nan
  Proportion difference: nan

Epoch 89
Loss: 29.1521

Monitoring signature responses:

Disease 16 (signature 4, LR=73.10):
  Theta for diagnosed: 0.171 ± 0.072
  Theta for others: 0.056
  Proportion difference: 0.115

Disease 15 (signature 3, LR=70.27):
  Theta for diagnosed: 0.174 ± 0.086
  Theta for others: 0.127
  Proportion difference: 0.047

Disease 12 (signature 3, LR=67.80):
  Theta for diagnosed: 0.169 ± 0.085
  Theta for others: 0.123
  Proportion difference: 0.046

Disease 17 (signature 4, LR=66.76):
  Theta for diagnosed: 0.171 ± 0.072
  Theta for others: 0.117
  Proportion difference: 0.054

Disease 7 (signature 1, LR=64.36):
  Theta for diagnosed: 0.191 ± 0.115
  Theta for others: nan
  Proportion difference: nan

Epoch 90
Loss: 29.1174

Monitoring signature responses:

Disease 16 (signature 4, LR=73.31):
  Theta for diagnosed: 0.171 ± 0.072
  Theta for others: 0.056
  Proportion difference: 0.115

Disease 15 (signature 3, LR=70.42):
  Theta for diagnosed: 0.174 ± 0.086
  Theta for others: 0.127
  Proportion difference: 0.047

Disease 12 (signature 3, LR=67.97):
  Theta for diagnosed: 0.170 ± 0.085
  Theta for others: 0.123
  Proportion difference: 0.046

Disease 17 (signature 4, LR=66.94):
  Theta for diagnosed: 0.171 ± 0.072
  Theta for others: 0.117
  Proportion difference: 0.054

Disease 7 (signature 1, LR=64.58):
  Theta for diagnosed: 0.191 ± 0.115
  Theta for others: nan
  Proportion difference: nan

Epoch 91
Loss: 29.0819

Monitoring signature responses:

Disease 16 (signature 4, LR=73.53):
  Theta for diagnosed: 0.171 ± 0.072
  Theta for others: 0.056
  Proportion difference: 0.115

Disease 15 (signature 3, LR=70.57):
  Theta for diagnosed: 0.174 ± 0.087
  Theta for others: 0.126
  Proportion difference: 0.048

Disease 12 (signature 3, LR=68.15):
  Theta for diagnosed: 0.170 ± 0.085
  Theta for others: 0.123
  Proportion difference: 0.047

Disease 17 (signature 4, LR=67.12):
  Theta for diagnosed: 0.171 ± 0.073
  Theta for others: 0.117
  Proportion difference: 0.054

Disease 7 (signature 1, LR=64.79):
  Theta for diagnosed: 0.191 ± 0.115
  Theta for others: nan
  Proportion difference: nan

Epoch 92
Loss: 29.0439

Monitoring signature responses:

Disease 16 (signature 4, LR=73.75):
  Theta for diagnosed: 0.171 ± 0.073
  Theta for others: 0.056
  Proportion difference: 0.115

Disease 15 (signature 3, LR=70.72):
  Theta for diagnosed: 0.174 ± 0.087
  Theta for others: 0.126
  Proportion difference: 0.048

Disease 12 (signature 3, LR=68.33):
  Theta for diagnosed: 0.170 ± 0.085
  Theta for others: 0.123
  Proportion difference: 0.047

Disease 17 (signature 4, LR=67.31):
  Theta for diagnosed: 0.171 ± 0.073
  Theta for others: 0.117
  Proportion difference: 0.054

Disease 7 (signature 1, LR=65.01):
  Theta for diagnosed: 0.191 ± 0.116
  Theta for others: nan
  Proportion difference: nan

Epoch 93
Loss: 29.0064

Monitoring signature responses:

Disease 16 (signature 4, LR=73.97):
  Theta for diagnosed: 0.171 ± 0.073
  Theta for others: 0.056
  Proportion difference: 0.115

Disease 15 (signature 3, LR=70.86):
  Theta for diagnosed: 0.174 ± 0.087
  Theta for others: 0.126
  Proportion difference: 0.048

Disease 12 (signature 3, LR=68.51):
  Theta for diagnosed: 0.170 ± 0.085
  Theta for others: 0.123
  Proportion difference: 0.047

Disease 17 (signature 4, LR=67.49):
  Theta for diagnosed: 0.171 ± 0.073
  Theta for others: 0.117
  Proportion difference: 0.055

Disease 7 (signature 1, LR=65.23):
  Theta for diagnosed: 0.191 ± 0.116
  Theta for others: nan
  Proportion difference: nan

Epoch 94
Loss: 28.9713

Monitoring signature responses:

Disease 16 (signature 4, LR=74.20):
  Theta for diagnosed: 0.171 ± 0.073
  Theta for others: 0.056
  Proportion difference: 0.115

Disease 15 (signature 3, LR=71.01):
  Theta for diagnosed: 0.174 ± 0.087
  Theta for others: 0.126
  Proportion difference: 0.048

Disease 12 (signature 3, LR=68.69):
  Theta for diagnosed: 0.170 ± 0.086
  Theta for others: 0.123
  Proportion difference: 0.047

Disease 17 (signature 4, LR=67.67):
  Theta for diagnosed: 0.171 ± 0.073
  Theta for others: 0.117
  Proportion difference: 0.055

Disease 7 (signature 1, LR=65.45):
  Theta for diagnosed: 0.191 ± 0.116
  Theta for others: nan
  Proportion difference: nan

Epoch 95
Loss: 28.9366

Monitoring signature responses:

Disease 16 (signature 4, LR=74.42):
  Theta for diagnosed: 0.171 ± 0.073
  Theta for others: 0.056
  Proportion difference: 0.115

Disease 15 (signature 3, LR=71.16):
  Theta for diagnosed: 0.174 ± 0.087
  Theta for others: 0.126
  Proportion difference: 0.048

Disease 12 (signature 3, LR=68.87):
  Theta for diagnosed: 0.170 ± 0.086
  Theta for others: 0.122
  Proportion difference: 0.047

Disease 17 (signature 4, LR=67.86):
  Theta for diagnosed: 0.171 ± 0.073
  Theta for others: 0.116
  Proportion difference: 0.055

Disease 7 (signature 1, LR=65.67):
  Theta for diagnosed: 0.191 ± 0.116
  Theta for others: nan
  Proportion difference: nan

Epoch 96
Loss: 28.9003

Monitoring signature responses:

Disease 16 (signature 4, LR=74.64):
  Theta for diagnosed: 0.171 ± 0.073
  Theta for others: 0.056
  Proportion difference: 0.115

Disease 15 (signature 3, LR=71.31):
  Theta for diagnosed: 0.174 ± 0.087
  Theta for others: 0.126
  Proportion difference: 0.049

Disease 12 (signature 3, LR=69.05):
  Theta for diagnosed: 0.170 ± 0.086
  Theta for others: 0.122
  Proportion difference: 0.048

Disease 17 (signature 4, LR=68.04):
  Theta for diagnosed: 0.172 ± 0.074
  Theta for others: 0.116
  Proportion difference: 0.055

Disease 7 (signature 1, LR=65.89):
  Theta for diagnosed: 0.191 ± 0.116
  Theta for others: nan
  Proportion difference: nan

Epoch 97
Loss: 28.8637

Monitoring signature responses:

Disease 16 (signature 4, LR=74.87):
  Theta for diagnosed: 0.171 ± 0.074
  Theta for others: 0.056
  Proportion difference: 0.115

Disease 15 (signature 3, LR=71.46):
  Theta for diagnosed: 0.174 ± 0.088
  Theta for others: 0.125
  Proportion difference: 0.049

Disease 12 (signature 3, LR=69.24):
  Theta for diagnosed: 0.170 ± 0.086
  Theta for others: 0.122
  Proportion difference: 0.048

Disease 17 (signature 4, LR=68.22):
  Theta for diagnosed: 0.172 ± 0.074
  Theta for others: 0.116
  Proportion difference: 0.056

Disease 7 (signature 1, LR=66.12):
  Theta for diagnosed: 0.192 ± 0.117
  Theta for others: nan
  Proportion difference: nan

Epoch 98
Loss: 28.8286

Monitoring signature responses:

Disease 16 (signature 4, LR=75.09):
  Theta for diagnosed: 0.171 ± 0.074
  Theta for others: 0.056
  Proportion difference: 0.115

Disease 15 (signature 3, LR=71.61):
  Theta for diagnosed: 0.174 ± 0.088
  Theta for others: 0.125
  Proportion difference: 0.049

Disease 12 (signature 3, LR=69.42):
  Theta for diagnosed: 0.170 ± 0.086
  Theta for others: 0.122
  Proportion difference: 0.048

Disease 17 (signature 4, LR=68.40):
  Theta for diagnosed: 0.172 ± 0.074
  Theta for others: 0.116
  Proportion difference: 0.056

Disease 7 (signature 1, LR=66.34):
  Theta for diagnosed: 0.192 ± 0.117
  Theta for others: nan
  Proportion difference: nan

Epoch 99
Loss: 28.7942

Monitoring signature responses:

Disease 16 (signature 4, LR=75.32):
  Theta for diagnosed: 0.171 ± 0.074
  Theta for others: 0.056
  Proportion difference: 0.115

Disease 15 (signature 3, LR=71.76):
  Theta for diagnosed: 0.174 ± 0.088
  Theta for others: 0.125
  Proportion difference: 0.049

Disease 12 (signature 3, LR=69.61):
  Theta for diagnosed: 0.170 ± 0.086
  Theta for others: 0.122
  Proportion difference: 0.048

Disease 17 (signature 4, LR=68.59):
  Theta for diagnosed: 0.172 ± 0.074
  Theta for others: 0.116
  Proportion difference: 0.056

Disease 7 (signature 1, LR=66.56):
  Theta for diagnosed: 0.192 ± 0.117
  Theta for others: nan
  Proportion difference: nan
No description has been provided for this image
In [8]:
# Modified parameter recovery cell (replace cell 13)

print("\n" + "="*70)
print("PARAMETER RECOVERY ANALYSIS")
print("="*70)
print("Note: Adjusted Rand Index is not shown because we initialize with true clusters,")
print("making it artificially perfect (1.0). Focus is on prediction calibration instead.")
print("="*70)

# Extract estimated parameters
with torch.no_grad():
    estimated_psi = model.psi.detach().numpy()
    estimated_phi = model.phi.detach().numpy()
    estimated_lambda = model.lambda_.detach().numpy()

# Compare Psi and Phi only (clustering is artificially perfect)
fig, axes = plt.subplots(1, 2, figsize=(14, 5))

# True vs Estimated Psi
ax = axes[0]
scatter = ax.scatter(data['psi'].flatten(), estimated_psi.flatten(), 
                    alpha=0.6, s=50, edgecolors='black', linewidth=0.5)
min_val = min(data['psi'].min(), estimated_psi.min())
max_val = max(data['psi'].max(), estimated_psi.max())
ax.plot([min_val, max_val], [min_val, max_val], 'r--', linewidth=2, label='y=x')
ax.set_xlabel('True ψ', fontsize=12)
ax.set_ylabel('Estimated ψ', fontsize=12)
ax.set_title('Psi Recovery', fontsize=14, fontweight='bold')
ax.legend()
ax.grid(True, alpha=0.3)

# Correlation
psi_corr = np.corrcoef(data['psi'].flatten(), estimated_psi.flatten())[0, 1]
ax.text(0.05, 0.95, f'r = {psi_corr:.3f}', transform=ax.transAxes,
        fontsize=12, verticalalignment='top', 
        bbox=dict(boxstyle='round', facecolor='wheat', alpha=0.5))

# Phi recovery (average over time)
ax = axes[1]
true_phi_avg = data['phi'].mean(axis=2)  # Average over time
est_phi_avg = estimated_phi.mean(axis=2)
ax.scatter(true_phi_avg.flatten(), est_phi_avg.flatten(), 
          alpha=0.6, s=50, edgecolors='black', linewidth=0.5)
min_val = min(true_phi_avg.min(), est_phi_avg.min())
max_val = max(true_phi_avg.max(), est_phi_avg.max())
ax.plot([min_val, max_val], [min_val, max_val], 'r--', linewidth=2, label='y=x')
ax.set_xlabel('True φ (avg)', fontsize=12)
ax.set_ylabel('Estimated φ (avg)', fontsize=12)
ax.set_title('Phi Recovery (time-averaged)', fontsize=14, fontweight='bold')
ax.legend()
ax.grid(True, alpha=0.3)

phi_corr = np.corrcoef(true_phi_avg.flatten(), est_phi_avg.flatten())[0, 1]
ax.text(0.05, 0.95, f'r = {phi_corr:.3f}', transform=ax.transAxes,
        fontsize=12, verticalalignment='top',
        bbox=dict(boxstyle='round', facecolor='wheat', alpha=0.5))

plt.tight_layout()
plt.show()

# Print summary statistics
print(f"\nParameter Recovery Statistics:")
print(f"  Psi correlation: {psi_corr:.4f}")
print(f"  Phi correlation: {phi_corr:.4f}")
======================================================================
PARAMETER RECOVERY ANALYSIS
======================================================================
Note: Adjusted Rand Index is not shown because we initialize with true clusters,
making it artificially perfect (1.0). Focus is on prediction calibration instead.
======================================================================
No description has been provided for this image
Parameter Recovery Statistics:
  Psi correlation: 0.9932
  Phi correlation: 0.8783

Comparison of True vs Estimated Trajectories¶

In [10]:
def plot_true_calibration(pi_pred, true_pi, Y, n_bins=20, use_log_scale=True, min_bin_count=50):
    """
    Plots calibration curve: predicted pi vs. true pi (ground truth), at at-risk times.
    This is more important than parameter recovery for mixture models - we care about 
    prediction accuracy.
    """
    # Ensure numpy arrays
    if hasattr(pi_pred, 'detach'):
        pi_pred = pi_pred.detach().cpu().numpy()
    if hasattr(true_pi, 'detach'):
        true_pi = true_pi.detach().cpu().numpy()
    if hasattr(Y, 'detach'):
        Y = Y.detach().cpu().numpy()
    N, D, T = Y.shape

    # At-risk mask (only consider times before disease onset)
    at_risk = np.ones_like(Y, dtype=bool)
    for n in range(N):
        for d in range(D):
            event_times = np.where(Y[n, d, :])[0]
            if len(event_times) > 0:
                at_risk[n, d, (event_times[0]+1):] = False

    pred = pi_pred[at_risk]
    truth = true_pi[at_risk]

    # Bin by predicted probability
    if use_log_scale:
        bin_edges = np.logspace(np.log10(max(1e-7, pred.min())), np.log10(pred.max()), n_bins + 1)
    else:
        bin_edges = np.linspace(pred.min(), pred.max(), n_bins + 1)

    bin_means = []
    truth_means = []
    counts = []

    for i in range(n_bins):
        mask = (pred >= bin_edges[i]) & (pred < bin_edges[i + 1])
        if np.sum(mask) >= min_bin_count:
            bin_means.append(np.mean(pred[mask]))
            truth_means.append(np.mean(truth[mask]))
            counts.append(np.sum(mask))

    # Plot - single log scale plot
    plt.figure(figsize=(7, 7))
    plt.xscale('log')
    plt.yscale('log')
    plt.plot([1e-7, 1], [1e-7, 1], '--', color='gray', linewidth=2, label='Perfect calibration')
    plt.plot(bin_means, truth_means, 'o-', linewidth=2, markersize=8, label='Model calibration')
    plt.xlabel('Predicted Probability', fontsize=12)
    plt.ylabel('True Probability', fontsize=12)
    plt.title('Calibration: Predicted vs True π\n(Log Scale, At-Risk Only)', fontsize=14, fontweight='bold')
    plt.legend()
    plt.grid(True, which='both', linestyle='--', alpha=0.3)
    plt.show()

    # Print summary stats
    mse = np.mean((np.array(bin_means) - np.array(truth_means))**2)
    correlation = np.corrcoef(bin_means, truth_means)[0, 1]
    print(f'\nCalibration Statistics:')
    print(f'  MSE: {mse:.2e}')
    print(f'  Correlation: {correlation:.4f}')
    print(f'  Mean Predicted: {np.mean(pred):.6f}')
    print(f'  Mean True: {np.mean(truth):.6f}')
    print(f'  N total at-risk observations: {len(pred):,}')
    print(f'  N bins used: {len(bin_means)}')

    return bin_means, truth_means, counts

# Get model predictions
with torch.no_grad():
    pi_pred, _, _ = model.forward()

# Plot calibration
print("\n" + "="*70)
print("CALIBRATION ANALYSIS: PREDICTED vs TRUE PROBABILITIES")
print("="*70)
plot_true_calibration(pi_pred, data['pi'], data['Y'], n_bins=20, use_log_scale=True)
======================================================================
CALIBRATION ANALYSIS: PREDICTED vs TRUE PROBABILITIES
======================================================================
No description has been provided for this image
Calibration Statistics:
  MSE: 5.87e-03
  Correlation: 0.9222
  Mean Predicted: 0.009616
  Mean True: 0.009513
  N total at-risk observations: 8,749,563
  N bins used: 20
Out[10]:
([1.3260773e-06,
  2.7122196e-06,
  5.2880387e-06,
  1.1506615e-05,
  2.4354009e-05,
  4.5919296e-05,
  9.0311936e-05,
  0.0001836977,
  0.00036518817,
  0.00072584336,
  0.0014445297,
  0.0028855128,
  0.0057477253,
  0.011221664,
  0.022584533,
  0.04533383,
  0.088671476,
  0.16380726,
  0.3043931,
  0.6609377],
 [1.818606914443285e-06,
  6.043587788134624e-06,
  8.026383651129502e-06,
  7.655265420270203e-06,
  9.022088987214059e-06,
  1.9650861321617382e-05,
  4.160805637383012e-05,
  8.307767601443463e-05,
  0.00016338262965881887,
  0.000346347591939183,
  0.000688423162900587,
  0.0016449045205545526,
  0.003923981409225025,
  0.00876349710645597,
  0.019493320837760366,
  0.04423103026948786,
  0.09609553606652288,
  0.188384775840987,
  0.30392892205545197,
  0.31915293491973074],
 [1710434,
  1032153,
  260859,
  75829,
  199775,
  375707,
  352595,
  357437,
  451731,
  494417,
  549167,
  587359,
  611573,
  539435,
  393180,
  351635,
  285618,
  111581,
  8416,
  658])