Skip to content

Troubleshooting

automation edited this page Aug 8, 2025 · 1 revision

Troubleshooting

Common Issues

ImportError

pip install --upgrade statclean

Memory Issues

# Process in chunks
for chunk in pd.read_csv('large_file.csv', chunksize=10000):
    cleaner = StatClean(chunk)
    # Process chunk

Visualization Problems

# For headless servers
export MPLBACKEND=Agg

Mahalanobis Threshold and Stability

Details

chi2_threshold can be percentile (0<val<=1) or absolute chi-square statistic. Covariance inversion uses pseudoinverse when needed; optional shrinkage via scikit-learn's Ledoit–Wolf with use_shrinkage=True.

# Remove highly correlated variables first if instability persists
correlation_matrix = df.corr()

Back to top

Clone this wiki locally