Data-driven estimation of the constraint constant C for binary data using cross-window smoothing and empirical logit transformation.
estimate_C_binary(X, qmax = 8, safety = 1.5, eps = 1e-12, radius = 1)A list containing:
Cross-window radius used
Truncation rank used
Safety parameter applied
Original maximum row norm
Final conservative estimate of C
Row norms of factor matrix A
Row norms of factor matrix B
Logit-transformed matrix
Smoothed probability matrix
Count of values in each smoothing window
n x p binary data matrix (0/1 values)
Rank for truncated SVD (default 8)
Safety parameter for conservative estimation (default 1.5)
Small constant to avoid logit divergence when p=0 or p=1 (default 1e-12)
Radius for cross-window smoothing (default 1)
The function performs the following steps: 1. Applies cross-window smoothing to estimate probabilities 2. Performs empirical logit transformation with smoothing 3. Computes truncated SVD of the transformed matrix 4. Constructs matrices A and B and calculates row norms 5. Estimates C as the maximum norm times safety parameter
The cross-window smoothing helps stabilize probability estimates, especially for sparse binary data.