Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Benchmarking methods

This notebook provides a guide to benchmarking different imputation methods using Microimpute through two example data sets.

With sklearn’s Diabetes data set

For data set details refer here.

Loading...
Summary of quantile loss by method:
Method
OLS         0.012658
QuantReg    0.012670
QRF         0.016240
Matching    0.022570
Name: Loss, dtype: float64
Loading...
Loading...
Optimal subset: ['bp', 'age', 'bmi', 'sex']
Optimal loss: 0.016242569699135692
   step predictor_added  predictors_included  avg_quantile_loss  avg_log_loss  \
0     1              bp                 [bp]           0.017815             0   
1     2             age            [bp, age]           0.017225             0   
2     3             bmi       [bp, age, bmi]           0.016578             0   
3     4             sex  [bp, age, bmi, sex]           0.016243             0   

   cumulative_improvement  marginal_improvement  
0                0.000000              0.000000  
1                0.000590              0.000590  
2                0.001236              0.000647  
3                0.001572              0.000336  

With the US Federal Reserve Board’s Survey of Consumer Finances

For data set details refer here.


Mutual information with networth:
              networth
hhsex         0.014095
age           0.119553
married       0.016892
race          0.027996
income        0.156195
wageinc       0.121915
bussefarminc  0.080536
intdivinc     0.085286
ssretinc      0.059902
lf            0.010602
Loading...
Model: QRF, distribution similarity: 
   Variable                Metric      Distance
0  networth  wasserstein_distance  1.200929e+07
Model: OLS, distribution similarity: 
   Variable                Metric      Distance
0  networth  wasserstein_distance  2.274842e+07
Model: QuantReg, distribution similarity: 
   Variable                Metric      Distance
0  networth  wasserstein_distance  2.818652e+07
Model: Matching, distribution similarity: 
   Variable                Metric      Distance
0  networth  wasserstein_distance  1.798092e+07