SelectArena-Preview / data /analysis /improvement_by_model.html
schaeferbasti's picture
Preview v0.12.14: restore DeepLasso, GAMformer, Kumo-CLS-Markus, STG, Raw-SIS/DC/HSIC
cbfc77f
Raw History Blame Contribute Delete
41.9 kB
<!doctype html>
<html lang='en'><head><meta charset='utf-8'><meta name='viewport' content='width=device-width,initial-scale=1'><title>SelectArena: improvement over Random per model</title><style>
:root { --fg:#1f2328; --muted:#59636e; --bg:#ffffff; --line:#d1d9e0; --soft:#f6f8fa; --accent:#0072B2; }
@media (prefers-color-scheme: dark) {
:root:not([data-theme="light"]) { --fg:#e6edf3; --muted:#9198a1; --bg:#0d1117; --line:#3d444d; --soft:#151b23; --accent:#4aa3df; }
}
:root[data-theme="dark"] { --fg:#e6edf3; --muted:#9198a1; --bg:#0d1117; --line:#3d444d; --soft:#151b23; --accent:#4aa3df; }
html, body { margin:0; padding:0; background:var(--bg); color:var(--fg);
font:14px/1.45 system-ui,-apple-system,"Segoe UI",Roboto,sans-serif; }
.toolbar { display:flex; gap:6px; justify-content:flex-end; align-items:center; padding:4px 2px 8px; }
.toolbar .hint { margin-right:auto; color:var(--muted); font-size:12px; }
.toolbar button { font:inherit; font-size:12px; color:var(--fg); background:var(--soft);
border:1px solid var(--line); border-radius:6px; padding:3px 10px; cursor:pointer; }
.toolbar button:hover { border-color:var(--accent); }
#sa-tip { position:fixed; z-index:10; pointer-events:none; display:none; max-width:280px;
padding:6px 9px; border-radius:6px; border:1px solid var(--line); background:var(--bg); color:var(--fg);
font-size:12px; line-height:1.45; white-space:pre-line; box-shadow:0 2px 8px rgba(0,0,0,0.15); }
#sa-tip b { font-weight:600; }
</style></head><body><div class='toolbar'><span class='hint'>Hover or tap a method for its values.</span><button onclick="saSvg('selectarena_improvement_by_model')">SVG</button><button onclick="saPng('selectarena_improvement_by_model')">PNG</button><button onclick="saPdf('selectarena_improvement_by_model')">PDF</button><button onclick="saCsv('selectarena_improvement_by_model.csv')">CSV</button></div><svg id='sa-figure' viewBox='0 0 718 864' role='img' aria-label='Improvement over Random (%) of each method, per group of the downstream models' style='max-width:826px;margin:0 auto'><style>
svg { display:block; width:100%; height:auto; }
.sa-text { fill:var(--fg); }
.sa-muted { fill:var(--muted); }
.sa-grid { stroke:var(--line); }
.sa-ink { stroke:var(--fg); }
.sa-hit { fill:transparent; cursor:default; }
.sa-hit:hover, .sa-hit.sa-on { fill:var(--fg); fill-opacity:0.06; }
.sa-dim { fill:var(--muted); }
.sa-frame-line { stroke:var(--fg); stroke-opacity:0.3; fill:none; }
.sa-point { stroke:var(--fg); }
.sa-legend { fill:var(--bg); stroke:var(--line); }
.sa-heat { image-rendering:pixelated; image-rendering:crisp-edges; }
.sa-halo { paint-order:stroke; stroke:var(--bg); stroke-width:3px; stroke-opacity:0.7; }
.sa-hollow { fill:var(--bg); stroke:var(--fg); } .sa-ci-none { stroke:var(--muted); }</style><line class='sa-grid' x1='138.0' x2='138.0' y1='22' y2='772'/><text class='sa-muted' x='138.0' y='788' text-anchor='middle' font-size='11'>-30</text><line class='sa-grid' x1='216.6' x2='216.6' y1='22' y2='772'/><text class='sa-muted' x='216.6' y='788' text-anchor='middle' font-size='11'>-20</text><line class='sa-grid' x1='295.1' x2='295.1' y1='22' y2='772'/><text class='sa-muted' x='295.1' y='788' text-anchor='middle' font-size='11'>-10</text><line class='sa-ink' x1='373.7' x2='373.7' y1='22' y2='772' stroke-opacity='0.5'/><text class='sa-muted' x='373.7' y='788' text-anchor='middle' font-size='11'>0</text><line class='sa-grid' x1='452.3' x2='452.3' y1='22' y2='772'/><text class='sa-muted' x='452.3' y='788' text-anchor='middle' font-size='11'>10</text><line class='sa-grid' x1='530.9' x2='530.9' y1='22' y2='772'/><text class='sa-muted' x='530.9' y='788' text-anchor='middle' font-size='11'>20</text><line class='sa-grid' x1='609.4' x2='609.4' y1='22' y2='772'/><text class='sa-muted' x='609.4' y='788' text-anchor='middle' font-size='11'>30</text><line class='sa-grid' x1='688.0' x2='688.0' y1='22' y2='772'/><text class='sa-muted' x='688.0' y='788' text-anchor='middle' font-size='11'>40</text><text class='sa-text' x='413.0' y='806' text-anchor='middle' font-size='12'>Improvement over Random (%)</text><text class='sa-text' x='8.0' y='38.5' font-size='12'>LGBMGain</text><line class='sa-ci-none' x1='575.5' x2='616.4' y1='34.5' y2='34.5' stroke-width='1.5'/><line class='sa-ink' x1='595.4' x2='595.4' y1='26.5' y2='42.5' stroke-width='2.5'/><circle cx='593.4' cy='34.5' r='4.5' fill='#0072B2'/><rect x='571.6' y='30.7' width='7.6' height='7.6' fill='#E69F00'/><polygon points='616.4,29.1 621.8,34.5 616.4,39.9 611.0,34.5' fill='#009E73'/><polygon points='601.7,29.3 606.6,37.9 596.7,37.9' fill='#CC79A7'/><polygon points='612.6,39.7 617.5,31.1 607.6,31.1' fill='#56B4E9'/><rect class='sa-hit' x='132.0' y='22.0' width='562.0' height='25' data-tip='LGBMGain&#10;All models: +28.2%&#10;RandomForest: +30.9%&#10;TabICLv2: +30.4%&#10;RealMLP: +29.0%&#10;LightGBM: +28.0%&#10;LinearModel: +25.7%'/><text class='sa-text' x='8.0' y='63.5' font-size='12'>GAMformer</text><line class='sa-ci-none' x1='576.7' x2='609.6' y1='59.5' y2='59.5' stroke-width='1.5'/><line class='sa-ink' x1='587.9' x2='587.9' y1='51.5' y2='67.5' stroke-width='2.5'/><circle cx='580.0' cy='59.5' r='4.5' fill='#0072B2'/><rect x='572.9' y='55.7' width='7.6' height='7.6' fill='#E69F00'/><polygon points='609.6,54.1 615.0,59.5 609.6,64.9 604.2,59.5' fill='#009E73'/><polygon points='587.2,54.3 592.1,62.9 582.2,62.9' fill='#CC79A7'/><polygon points='602.1,64.7 607.0,56.1 597.1,56.1' fill='#56B4E9'/><rect class='sa-hit' x='132.0' y='47.0' width='562.0' height='25' data-tip='GAMformer&#10;All models: +27.3%&#10;RandomForest: +30.0%&#10;TabICLv2: +29.1%&#10;RealMLP: +27.2%&#10;LightGBM: +26.3%&#10;LinearModel: +25.8%'/><text class='sa-text' x='8.0' y='88.5' font-size='12'>CD-PFN</text><line class='sa-ci-none' x1='579.4' x2='605.3' y1='84.5' y2='84.5' stroke-width='1.5'/><line class='sa-ink' x1='586.8' x2='586.8' y1='76.5' y2='92.5' stroke-width='2.5'/><circle cx='579.4' cy='84.5' r='4.5' fill='#0072B2'/><rect x='577.7' y='80.7' width='7.6' height='7.6' fill='#E69F00'/><polygon points='605.3,79.1 610.7,84.5 605.3,89.9 599.9,84.5' fill='#009E73'/><polygon points='586.2,79.3 591.2,87.9 581.3,87.9' fill='#CC79A7'/><polygon points='596.5,89.7 601.4,81.1 591.5,81.1' fill='#56B4E9'/><rect class='sa-hit' x='132.0' y='72.0' width='562.0' height='25' data-tip='CD-PFN&#10;All models: +27.1%&#10;RandomForest: +29.5%&#10;TabICLv2: +28.3%&#10;RealMLP: +27.0%&#10;LinearModel: +26.5%&#10;LightGBM: +26.2%'/><text class='sa-text' x='8.0' y='113.5' font-size='12'>RFImportance</text><line class='sa-ci-none' x1='566.7' x2='601.8' y1='109.5' y2='109.5' stroke-width='1.5'/><line class='sa-ink' x1='579.8' x2='579.8' y1='101.5' y2='117.5' stroke-width='2.5'/><circle cx='574.4' cy='109.5' r='4.5' fill='#0072B2'/><rect x='562.9' y='105.7' width='7.6' height='7.6' fill='#E69F00'/><polygon points='591.7,104.1 597.1,109.5 591.7,114.9 586.3,109.5' fill='#009E73'/><polygon points='586.2,104.3 591.1,112.9 581.2,112.9' fill='#CC79A7'/><polygon points='601.8,114.7 606.8,106.1 596.9,106.1' fill='#56B4E9'/><rect class='sa-hit' x='132.0' y='97.0' width='562.0' height='25' data-tip='RFImportance&#10;All models: +26.2%&#10;TabICLv2: +29.0%&#10;RandomForest: +27.7%&#10;RealMLP: +27.0%&#10;LightGBM: +25.5%&#10;LinearModel: +24.6%'/><text class='sa-text' x='8.0' y='138.5' font-size='12'>PACE-HSIC</text><line class='sa-ci-none' x1='567.7' x2='597.7' y1='134.5' y2='134.5' stroke-width='1.5'/><line class='sa-ink' x1='578.3' x2='578.3' y1='126.5' y2='142.5' stroke-width='2.5'/><circle cx='569.4' cy='134.5' r='4.5' fill='#0072B2'/><rect x='563.9' y='130.7' width='7.6' height='7.6' fill='#E69F00'/><polygon points='597.7,129.1 603.1,134.5 597.7,139.9 592.3,134.5' fill='#009E73'/><polygon points='576.1,129.3 581.0,137.9 571.1,137.9' fill='#CC79A7'/><polygon points='592.4,139.7 597.3,131.1 587.4,131.1' fill='#56B4E9'/><rect class='sa-hit' x='132.0' y='122.0' width='562.0' height='25' data-tip='PACE-HSIC&#10;All models: +26.0%&#10;RandomForest: +28.5%&#10;TabICLv2: +27.8%&#10;RealMLP: +25.8%&#10;LightGBM: +24.9%&#10;LinearModel: +24.7%'/><text class='sa-text' x='8.0' y='163.5' font-size='12'>LassoNet</text><line class='sa-ci-none' x1='565.6' x2='591.6' y1='159.5' y2='159.5' stroke-width='1.5'/><line class='sa-ink' x1='574.6' x2='574.6' y1='151.5' y2='167.5' stroke-width='2.5'/><circle cx='565.6' cy='159.5' r='4.5' fill='#0072B2'/><rect x='568.1' y='155.7' width='7.6' height='7.6' fill='#E69F00'/><polygon points='591.6,154.1 597.0,159.5 591.6,164.9 586.2,159.5' fill='#009E73'/><polygon points='571.9,154.3 576.8,162.9 566.9,162.9' fill='#CC79A7'/><polygon points='582.6,164.7 587.5,156.1 577.6,156.1' fill='#56B4E9'/><rect class='sa-hit' x='132.0' y='147.0' width='562.0' height='25' data-tip='LassoNet&#10;All models: +25.6%&#10;RandomForest: +27.7%&#10;TabICLv2: +26.6%&#10;LinearModel: +25.2%&#10;RealMLP: +25.2%&#10;LightGBM: +24.4%'/><text class='sa-text' x='8.0' y='188.5' font-size='12'>PACE-DC</text><line class='sa-ci-none' x1='560.7' x2='588.1' y1='184.5' y2='184.5' stroke-width='1.5'/><line class='sa-ink' x1='571.5' x2='571.5' y1='176.5' y2='192.5' stroke-width='2.5'/><circle cx='560.7' cy='184.5' r='4.5' fill='#0072B2'/><rect x='562.5' y='180.7' width='7.6' height='7.6' fill='#E69F00'/><polygon points='588.1,179.1 593.5,184.5 588.1,189.9 582.7,184.5' fill='#009E73'/><polygon points='568.8,179.3 573.7,187.9 563.8,187.9' fill='#CC79A7'/><polygon points='580.0,189.7 585.0,181.1 575.1,181.1' fill='#56B4E9'/><rect class='sa-hit' x='132.0' y='172.0' width='562.0' height='25' data-tip='PACE-DC&#10;All models: +25.2%&#10;RandomForest: +27.3%&#10;TabICLv2: +26.3%&#10;RealMLP: +24.8%&#10;LinearModel: +24.5%&#10;LightGBM: +23.8%'/><text class='sa-text' x='8.0' y='213.5' font-size='12'>Raw-HSIC</text><line class='sa-ci-none' x1='553.6' x2='587.8' y1='209.5' y2='209.5' stroke-width='1.5'/><line class='sa-ink' x1='564.1' x2='564.1' y1='201.5' y2='217.5' stroke-width='2.5'/><circle cx='555.8' cy='209.5' r='4.5' fill='#0072B2'/><rect x='549.8' y='205.7' width='7.6' height='7.6' fill='#E69F00'/><polygon points='587.8,204.1 593.2,209.5 587.8,214.9 582.4,209.5' fill='#009E73'/><polygon points='564.6,204.3 569.5,212.9 559.6,212.9' fill='#CC79A7'/><polygon points='578.4,214.7 583.4,206.1 573.5,206.1' fill='#56B4E9'/><rect class='sa-hit' x='132.0' y='197.0' width='562.0' height='25' data-tip='Raw-HSIC&#10;All models: +24.2%&#10;RandomForest: +27.2%&#10;TabICLv2: +26.1%&#10;RealMLP: +24.3%&#10;LightGBM: +23.2%&#10;LinearModel: +22.9%'/><text class='sa-text' x='8.0' y='238.5' font-size='12'>MI</text><line class='sa-ci-none' x1='553.8' x2='576.1' y1='234.5' y2='234.5' stroke-width='1.5'/><line class='sa-ink' x1='560.7' x2='560.7' y1='226.5' y2='242.5' stroke-width='2.5'/><circle cx='553.8' cy='234.5' r='4.5' fill='#0072B2'/><rect x='551.9' y='230.7' width='7.6' height='7.6' fill='#E69F00'/><polygon points='576.1,229.1 581.5,234.5 576.1,239.9 570.7,234.5' fill='#009E73'/><polygon points='564.0,229.3 568.9,237.9 559.0,237.9' fill='#CC79A7'/><polygon points='573.7,239.7 578.7,231.1 568.8,231.1' fill='#56B4E9'/><rect class='sa-hit' x='132.0' y='222.0' width='562.0' height='25' data-tip='MI&#10;All models: +23.8%&#10;RandomForest: +25.8%&#10;TabICLv2: +25.5%&#10;RealMLP: +24.2%&#10;LinearModel: +23.2%&#10;LightGBM: +22.9%'/><text class='sa-text' x='8.0' y='263.5' font-size='12'>CART</text><line class='sa-ci-none' x1='546.3' x2='577.3' y1='259.5' y2='259.5' stroke-width='1.5'/><line class='sa-ink' x1='560.6' x2='560.6' y1='251.5' y2='267.5' stroke-width='2.5'/><circle cx='558.4' cy='259.5' r='4.5' fill='#0072B2'/><rect x='542.4' y='255.7' width='7.6' height='7.6' fill='#E69F00'/><polygon points='568.8,254.1 574.2,259.5 568.8,264.9 563.4,259.5' fill='#009E73'/><polygon points='569.5,254.3 574.4,262.9 564.5,262.9' fill='#CC79A7'/><polygon points='577.3,264.7 582.3,256.1 572.4,256.1' fill='#56B4E9'/><rect class='sa-hit' x='132.0' y='247.0' width='562.0' height='25' data-tip='CART&#10;All models: +23.8%&#10;TabICLv2: +25.9%&#10;RealMLP: +24.9%&#10;RandomForest: +24.8%&#10;LightGBM: +23.5%&#10;LinearModel: +22.0%'/><text class='sa-text' x='8.0' y='288.5' font-size='12'>Kumo-CLS-Markus</text><line class='sa-ci-none' x1='550.7' x2='580.3' y1='284.5' y2='284.5' stroke-width='1.5'/><line class='sa-ink' x1='557.9' x2='557.9' y1='276.5' y2='292.5' stroke-width='2.5'/><circle cx='551.6' cy='284.5' r='4.5' fill='#0072B2'/><rect x='546.9' y='280.7' width='7.6' height='7.6' fill='#E69F00'/><polygon points='574.3,279.1 579.7,284.5 574.3,289.9 568.9,284.5' fill='#009E73'/><polygon points='553.8,279.3 558.7,287.9 548.8,287.9' fill='#CC79A7'/><polygon points='580.3,289.7 585.2,281.1 575.3,281.1' fill='#56B4E9'/><rect class='sa-hit' x='132.0' y='272.0' width='562.0' height='25' data-tip='Kumo-CLS-Markus&#10;All models: +23.4%&#10;TabICLv2: +26.3%&#10;RandomForest: +25.5%&#10;RealMLP: +22.9%&#10;LightGBM: +22.6%&#10;LinearModel: +22.5%'/><text class='sa-text' x='8.0' y='313.5' font-size='12'>F-Test</text><line class='sa-ci-none' x1='542.4' x2='563.8' y1='309.5' y2='309.5' stroke-width='1.5'/><line class='sa-ink' x1='552.5' x2='552.5' y1='301.5' y2='317.5' stroke-width='2.5'/><circle cx='542.4' cy='309.5' r='4.5' fill='#0072B2'/><rect x='549.4' y='305.7' width='7.6' height='7.6' fill='#E69F00'/><polygon points='560.5,304.1 565.9,309.5 560.5,314.9 555.1,309.5' fill='#009E73'/><polygon points='555.4,304.3 560.4,312.9 550.5,312.9' fill='#CC79A7'/><polygon points='563.8,314.7 568.8,306.1 558.9,306.1' fill='#56B4E9'/><rect class='sa-hit' x='132.0' y='297.0' width='562.0' height='25' data-tip='F-Test&#10;All models: +22.8%&#10;TabICLv2: +24.2%&#10;RandomForest: +23.8%&#10;RealMLP: +23.1%&#10;LinearModel: +22.9%&#10;LightGBM: +21.5%'/><text class='sa-text' x='8.0' y='338.5' font-size='12'>Raw-SIS</text><line class='sa-ci-none' x1='538.9' x2='567.5' y1='334.5' y2='334.5' stroke-width='1.5'/><line class='sa-ink' x1='551.1' x2='551.1' y1='326.5' y2='342.5' stroke-width='2.5'/><circle cx='538.9' cy='334.5' r='4.5' fill='#0072B2'/><rect x='546.6' y='330.7' width='7.6' height='7.6' fill='#E69F00'/><polygon points='567.5,329.1 572.9,334.5 567.5,339.9 562.1,334.5' fill='#009E73'/><polygon points='551.8,329.3 556.7,337.9 546.8,337.9' fill='#CC79A7'/><polygon points='556.4,339.7 561.4,331.1 551.5,331.1' fill='#56B4E9'/><rect class='sa-hit' x='132.0' y='322.0' width='562.0' height='25' data-tip='Raw-SIS&#10;All models: +22.6%&#10;RandomForest: +24.7%&#10;TabICLv2: +23.3%&#10;RealMLP: +22.7%&#10;LinearModel: +22.5%&#10;LightGBM: +21.0%'/><text class='sa-text' x='8.0' y='363.5' font-size='12'>PACE-SIS</text><line class='sa-ci-none' x1='538.3' x2='565.0' y1='359.5' y2='359.5' stroke-width='1.5'/><line class='sa-ink' x1='550.0' x2='550.0' y1='351.5' y2='367.5' stroke-width='2.5'/><circle cx='538.3' cy='359.5' r='4.5' fill='#0072B2'/><rect x='551.2' y='355.7' width='7.6' height='7.6' fill='#E69F00'/><polygon points='565.0,354.1 570.4,359.5 565.0,364.9 559.6,359.5' fill='#009E73'/><polygon points='542.0,354.3 547.0,362.9 537.1,362.9' fill='#CC79A7'/><polygon points='545.4,364.7 550.3,356.1 540.4,356.1' fill='#56B4E9'/><rect class='sa-hit' x='132.0' y='347.0' width='562.0' height='25' data-tip='PACE-SIS&#10;All models: +22.4%&#10;RandomForest: +24.3%&#10;LinearModel: +23.1%&#10;TabICLv2: +21.8%&#10;RealMLP: +21.4%&#10;LightGBM: +20.9%'/><text class='sa-text' x='8.0' y='388.5' font-size='12'>Raw-DC</text><line class='sa-ci-none' x1='540.2' x2='563.1' y1='384.5' y2='384.5' stroke-width='1.5'/><line class='sa-ink' x1='549.9' x2='549.9' y1='376.5' y2='392.5' stroke-width='2.5'/><circle cx='540.2' cy='384.5' r='4.5' fill='#0072B2'/><rect x='542.3' y='380.7' width='7.6' height='7.6' fill='#E69F00'/><polygon points='563.1,379.1 568.5,384.5 563.1,389.9 557.7,384.5' fill='#009E73'/><polygon points='549.2,379.3 554.2,387.9 544.3,387.9' fill='#CC79A7'/><polygon points='557.6,389.7 562.5,381.1 552.6,381.1' fill='#56B4E9'/><rect class='sa-hit' x='132.0' y='372.0' width='562.0' height='25' data-tip='Raw-DC&#10;All models: +22.4%&#10;RandomForest: +24.1%&#10;TabICLv2: +23.4%&#10;RealMLP: +22.3%&#10;LinearModel: +21.9%&#10;LightGBM: +21.2%'/><text class='sa-text' x='8.0' y='413.5' font-size='12'>ElasticNet</text><line class='sa-ci-none' x1='538.2' x2='550.9' y1='409.5' y2='409.5' stroke-width='1.5'/><line class='sa-ink' x1='545.6' x2='545.6' y1='401.5' y2='417.5' stroke-width='2.5'/><circle cx='543.3' cy='409.5' r='4.5' fill='#0072B2'/><rect x='547.1' y='405.7' width='7.6' height='7.6' fill='#E69F00'/><polygon points='547.4,404.1 552.8,409.5 547.4,414.9 542.0,409.5' fill='#009E73'/><polygon points='538.2,404.3 543.1,412.9 533.2,412.9' fill='#CC79A7'/><polygon points='544.4,414.7 549.4,406.1 539.5,406.1' fill='#56B4E9'/><rect class='sa-hit' x='132.0' y='397.0' width='562.0' height='25' data-tip='ElasticNet&#10;All models: +21.9%&#10;LinearModel: +22.6%&#10;RandomForest: +22.1%&#10;TabICLv2: +21.7%&#10;LightGBM: +21.6%&#10;RealMLP: +20.9%'/><text class='sa-text' x='8.0' y='438.5' font-size='12'>mRMR</text><line class='sa-ci-none' x1='539.7' x2='559.1' y1='434.5' y2='434.5' stroke-width='1.5'/><line class='sa-ink' x1='544.0' x2='544.0' y1='426.5' y2='442.5' stroke-width='2.5'/><circle cx='543.8' cy='434.5' r='4.5' fill='#0072B2'/><rect x='541.3' y='430.7' width='7.6' height='7.6' fill='#E69F00'/><polygon points='539.7,429.1 545.1,434.5 539.7,439.9 534.3,434.5' fill='#009E73'/><polygon points='543.3,429.3 548.2,437.9 538.3,437.9' fill='#CC79A7'/><polygon points='559.1,439.7 564.0,431.1 554.1,431.1' fill='#56B4E9'/><rect class='sa-hit' x='132.0' y='422.0' width='562.0' height='25' data-tip='mRMR&#10;All models: +21.7%&#10;TabICLv2: +23.6%&#10;LinearModel: +21.8%&#10;LightGBM: +21.7%&#10;RealMLP: +21.6%&#10;RandomForest: +21.1%'/><text class='sa-text' x='8.0' y='463.5' font-size='12'>MarkovBlanket</text><line class='sa-ci-none' x1='523.2' x2='558.8' y1='459.5' y2='459.5' stroke-width='1.5'/><line class='sa-ink' x1='540.6' x2='540.6' y1='451.5' y2='467.5' stroke-width='2.5'/><circle cx='540.1' cy='459.5' r='4.5' fill='#0072B2'/><rect x='519.4' y='455.7' width='7.6' height='7.6' fill='#E69F00'/><polygon points='558.8,454.1 564.2,459.5 558.8,464.9 553.4,459.5' fill='#009E73'/><polygon points='545.2,454.3 550.2,462.9 540.3,462.9' fill='#CC79A7'/><polygon points='558.7,464.7 563.6,456.1 553.7,456.1' fill='#56B4E9'/><rect class='sa-hit' x='132.0' y='447.0' width='562.0' height='25' data-tip='MarkovBlanket&#10;All models: +21.2%&#10;RandomForest: +23.6%&#10;TabICLv2: +23.5%&#10;RealMLP: +21.8%&#10;LightGBM: +21.2%&#10;LinearModel: +19.0%'/><text class='sa-text' x='8.0' y='488.5' font-size='12'>CPI</text><line class='sa-ci-none' x1='523.4' x2='556.6' y1='484.5' y2='484.5' stroke-width='1.5'/><line class='sa-ink' x1='539.4' x2='539.4' y1='476.5' y2='492.5' stroke-width='2.5'/><circle cx='536.5' cy='484.5' r='4.5' fill='#0072B2'/><rect x='519.6' y='480.7' width='7.6' height='7.6' fill='#E69F00'/><polygon points='556.6,479.1 562.0,484.5 556.6,489.9 551.2,484.5' fill='#009E73'/><polygon points='539.0,479.3 543.9,487.9 534.0,487.9' fill='#CC79A7'/><polygon points='550.4,489.7 555.4,481.1 545.5,481.1' fill='#56B4E9'/><rect class='sa-hit' x='132.0' y='472.0' width='562.0' height='25' data-tip='CPI&#10;All models: +21.1%&#10;RandomForest: +23.3%&#10;TabICLv2: +22.5%&#10;RealMLP: +21.0%&#10;LightGBM: +20.7%&#10;LinearModel: +19.1%'/><text class='sa-text' x='8.0' y='513.5' font-size='12'>DeepLasso</text><line class='sa-ci-none' x1='529.4' x2='550.6' y1='509.5' y2='509.5' stroke-width='1.5'/><line class='sa-ink' x1='538.3' x2='538.3' y1='501.5' y2='517.5' stroke-width='2.5'/><circle cx='530.9' cy='509.5' r='4.5' fill='#0072B2'/><rect x='525.6' y='505.7' width='7.6' height='7.6' fill='#E69F00'/><polygon points='550.6,504.1 556.0,509.5 550.6,514.9 545.2,509.5' fill='#009E73'/><polygon points='539.9,504.3 544.9,512.9 535.0,512.9' fill='#CC79A7'/><polygon points='549.5,514.7 554.5,506.1 544.6,506.1' fill='#56B4E9'/><rect class='sa-hit' x='132.0' y='497.0' width='562.0' height='25' data-tip='DeepLasso&#10;All models: +20.9%&#10;RandomForest: +22.5%&#10;TabICLv2: +22.4%&#10;RealMLP: +21.2%&#10;LightGBM: +20.0%&#10;LinearModel: +19.8%'/><text class='sa-text' x='8.0' y='538.5' font-size='12'>Lasso</text><line class='sa-ci-none' x1='524.7' x2='544.1' y1='534.5' y2='534.5' stroke-width='1.5'/><line class='sa-ink' x1='538.0' x2='538.0' y1='526.5' y2='542.5' stroke-width='2.5'/><circle cx='539.2' cy='534.5' r='4.5' fill='#0072B2'/><rect x='540.3' y='530.7' width='7.6' height='7.6' fill='#E69F00'/><polygon points='539.9,529.1 545.3,534.5 539.9,539.9 534.5,534.5' fill='#009E73'/><polygon points='524.7,529.3 529.7,537.9 519.8,537.9' fill='#CC79A7'/><polygon points='533.2,539.7 538.2,531.1 528.3,531.1' fill='#56B4E9'/><rect class='sa-hit' x='132.0' y='522.0' width='562.0' height='25' data-tip='Lasso&#10;All models: +20.9%&#10;LinearModel: +21.7%&#10;RandomForest: +21.2%&#10;LightGBM: +21.1%&#10;TabICLv2: +20.3%&#10;RealMLP: +19.2%'/><text class='sa-text' x='8.0' y='563.5' font-size='12'>SHAP</text><line class='sa-ci-none' x1='522.8' x2='552.1' y1='559.5' y2='559.5' stroke-width='1.5'/><line class='sa-ink' x1='535.7' x2='535.7' y1='551.5' y2='567.5' stroke-width='2.5'/><circle cx='535.7' cy='559.5' r='4.5' fill='#0072B2'/><rect x='518.9' y='555.7' width='7.6' height='7.6' fill='#E69F00'/><polygon points='552.1,554.1 557.5,559.5 552.1,564.9 546.7,559.5' fill='#009E73'/><polygon points='530.2,554.3 535.1,562.9 525.2,562.9' fill='#CC79A7'/><polygon points='546.2,564.7 551.1,556.1 541.2,556.1' fill='#56B4E9'/><rect class='sa-hit' x='132.0' y='547.0' width='562.0' height='25' data-tip='SHAP&#10;All models: +20.6%&#10;RandomForest: +22.7%&#10;TabICLv2: +21.9%&#10;LightGBM: +20.6%&#10;RealMLP: +19.9%&#10;LinearModel: +19.0%'/><text class='sa-text' x='8.0' y='588.5' font-size='12'>GainRatio</text><line class='sa-ci-none' x1='518.0' x2='537.3' y1='584.5' y2='584.5' stroke-width='1.5'/><line class='sa-ink' x1='527.1' x2='527.1' y1='576.5' y2='592.5' stroke-width='2.5'/><circle cx='529.1' cy='584.5' r='4.5' fill='#0072B2'/><rect x='514.2' y='580.7' width='7.6' height='7.6' fill='#E69F00'/><polygon points='535.6,579.1 541.0,584.5 535.6,589.9 530.2,584.5' fill='#009E73'/><polygon points='533.4,579.3 538.4,587.9 528.5,587.9' fill='#CC79A7'/><polygon points='537.3,589.7 542.2,581.1 532.3,581.1' fill='#56B4E9'/><rect class='sa-hit' x='132.0' y='572.0' width='562.0' height='25' data-tip='GainRatio&#10;All models: +19.5%&#10;TabICLv2: +20.8%&#10;RandomForest: +20.6%&#10;RealMLP: +20.3%&#10;LightGBM: +19.8%&#10;LinearModel: +18.4%'/><text class='sa-text' x='8.0' y='613.5' font-size='12'>(R)ReliefF</text><line class='sa-ci-none' x1='501.5' x2='544.1' y1='609.5' y2='609.5' stroke-width='1.5'/><line class='sa-ink' x1='519.6' x2='519.6' y1='601.5' y2='617.5' stroke-width='2.5'/><circle cx='519.0' cy='609.5' r='4.5' fill='#0072B2'/><rect x='497.7' y='605.7' width='7.6' height='7.6' fill='#E69F00'/><polygon points='533.6,604.1 539.0,609.5 533.6,614.9 528.2,609.5' fill='#009E73'/><polygon points='535.8,604.3 540.8,612.9 530.9,612.9' fill='#CC79A7'/><polygon points='544.1,614.7 549.0,606.1 539.1,606.1' fill='#56B4E9'/><rect class='sa-hit' x='132.0' y='597.0' width='562.0' height='25' data-tip='(R)ReliefF&#10;All models: +18.6%&#10;TabICLv2: +21.7%&#10;RealMLP: +20.6%&#10;RandomForest: +20.3%&#10;LightGBM: +18.5%&#10;LinearModel: +16.3%'/><text class='sa-text' x='8.0' y='638.5' font-size='12'>SFS</text><line class='sa-ci-none' x1='511.4' x2='525.7' y1='634.5' y2='634.5' stroke-width='1.5'/><line class='sa-ink' x1='516.6' x2='516.6' y1='626.5' y2='642.5' stroke-width='2.5'/><circle cx='515.7' cy='634.5' r='4.5' fill='#0072B2'/><rect x='509.1' y='630.7' width='7.6' height='7.6' fill='#E69F00'/><polygon points='511.4,629.1 516.8,634.5 511.4,639.9 506.0,634.5' fill='#009E73'/><polygon points='520.7,629.3 525.6,637.9 515.7,637.9' fill='#CC79A7'/><polygon points='525.7,639.7 530.6,631.1 520.7,631.1' fill='#56B4E9'/><rect class='sa-hit' x='132.0' y='622.0' width='562.0' height='25' data-tip='SFS&#10;All models: +18.2%&#10;TabICLv2: +19.3%&#10;RealMLP: +18.7%&#10;LightGBM: +18.1%&#10;LinearModel: +17.7%&#10;RandomForest: +17.5%'/><text class='sa-text' x='8.0' y='663.5' font-size='12'>STG</text><line class='sa-ci-none' x1='492.1' x2='530.9' y1='659.5' y2='659.5' stroke-width='1.5'/><line class='sa-ink' x1='512.1' x2='512.1' y1='651.5' y2='667.5' stroke-width='2.5'/><circle cx='492.1' cy='659.5' r='4.5' fill='#0072B2'/><rect x='500.5' y='655.7' width='7.6' height='7.6' fill='#E69F00'/><polygon points='530.9,654.1 536.3,659.5 530.9,664.9 525.5,659.5' fill='#009E73'/><polygon points='525.8,654.3 530.7,662.9 520.8,662.9' fill='#CC79A7'/><polygon points='523.3,664.7 528.2,656.1 518.3,656.1' fill='#56B4E9'/><rect class='sa-hit' x='132.0' y='647.0' width='562.0' height='25' data-tip='STG&#10;All models: +17.6%&#10;RandomForest: +20.0%&#10;RealMLP: +19.4%&#10;TabICLv2: +19.0%&#10;LinearModel: +16.6%&#10;LightGBM: +15.1%'/><text class='sa-text' x='8.0' y='688.5' font-size='12'>LOCO</text><line class='sa-ci-none' x1='467.7' x2='489.7' y1='684.5' y2='684.5' stroke-width='1.5'/><line class='sa-ink' x1='475.7' x2='475.7' y1='676.5' y2='692.5' stroke-width='2.5'/><circle cx='475.9' cy='684.5' r='4.5' fill='#0072B2'/><rect x='463.9' y='680.7' width='7.6' height='7.6' fill='#E69F00'/><polygon points='473.8,679.1 479.2,684.5 473.8,689.9 468.4,684.5' fill='#009E73'/><polygon points='489.7,679.3 494.6,687.9 484.7,687.9' fill='#CC79A7'/><polygon points='488.7,689.7 493.7,681.1 483.8,681.1' fill='#56B4E9'/><rect class='sa-hit' x='132.0' y='672.0' width='562.0' height='25' data-tip='LOCO&#10;All models: +13.0%&#10;RealMLP: +14.8%&#10;TabICLv2: +14.6%&#10;LightGBM: +13.0%&#10;RandomForest: +12.7%&#10;LinearModel: +12.0%'/><text class='sa-text' x='8.0' y='713.5' font-size='12'>SBE</text><line class='sa-ci-none' x1='439.6' x2='477.2' y1='709.5' y2='709.5' stroke-width='1.5'/><line class='sa-ink' x1='463.3' x2='463.3' y1='701.5' y2='717.5' stroke-width='2.5'/><circle cx='470.7' cy='709.5' r='4.5' fill='#0072B2'/><rect x='435.8' y='705.7' width='7.6' height='7.6' fill='#E69F00'/><polygon points='476.0,704.1 481.4,709.5 476.0,714.9 470.6,709.5' fill='#009E73'/><polygon points='472.1,704.3 477.1,712.9 467.2,712.9' fill='#CC79A7'/><polygon points='477.2,714.7 482.1,706.1 472.2,706.1' fill='#56B4E9'/><rect class='sa-hit' x='132.0' y='697.0' width='562.0' height='25' data-tip='SBE&#10;All models: +11.4%&#10;TabICLv2: +13.2%&#10;RandomForest: +13.0%&#10;RealMLP: +12.5%&#10;LightGBM: +12.3%&#10;LinearModel: +8.4%'/><text class='sa-text' x='8.0' y='738.5' font-size='12'>Random</text><line class='sa-ci-none' x1='373.7' x2='373.7' y1='734.5' y2='734.5' stroke-width='1.5'/><line class='sa-ink' x1='373.7' x2='373.7' y1='726.5' y2='742.5' stroke-width='2.5'/><circle cx='373.7' cy='734.5' r='4.5' fill='#0072B2'/><rect x='369.9' y='730.7' width='7.6' height='7.6' fill='#E69F00'/><polygon points='373.7,729.1 379.1,734.5 373.7,739.9 368.3,734.5' fill='#009E73'/><polygon points='373.7,729.3 378.7,737.9 368.8,737.9' fill='#CC79A7'/><polygon points='373.7,739.7 378.7,731.1 368.8,731.1' fill='#56B4E9'/><rect class='sa-hit' x='132.0' y='722.0' width='562.0' height='25' data-tip='Random&#10;All models: +0.0%&#10;LightGBM: +0.0%&#10;LinearModel: +0.0%&#10;RandomForest: +0.0%&#10;RealMLP: +0.0%&#10;TabICLv2: +0.0%'/><text class='sa-text' x='8.0' y='763.5' font-size='12'>LaplacianScore</text><line class='sa-ci-none' x1='191.8' x2='260.8' y1='759.5' y2='759.5' stroke-width='1.5'/><line class='sa-ink' x1='227.7' x2='227.7' y1='751.5' y2='767.5' stroke-width='2.5'/><circle cx='191.8' cy='759.5' r='4.5' fill='#0072B2'/><rect x='257.0' y='755.7' width='7.6' height='7.6' fill='#E69F00'/><polygon points='239.9,754.1 245.3,759.5 239.9,764.9 234.5,759.5' fill='#009E73'/><polygon points='229.2,754.3 234.1,762.9 224.2,762.9' fill='#CC79A7'/><polygon points='219.4,764.7 224.3,756.1 214.4,756.1' fill='#56B4E9'/><rect class='sa-hit' x='132.0' y='747.0' width='562.0' height='25' data-tip='LaplacianScore&#10;All models: -18.6%&#10;LinearModel: -14.4%&#10;RandomForest: -17.0%&#10;RealMLP: -18.4%&#10;TabICLv2: -19.6%&#10;LightGBM: -23.2%'/><line class='sa-ink' x1='132.0' x2='132.0' y1='820' y2='834' stroke-width='2.5'/><text class='sa-text' x='140.0' y='832' font-size='12'>All models</text><circle cx='231.0' cy='828.0' r='4.5' fill='#0072B2'/><text class='sa-text' x='240.0' y='832' font-size='12'>LightGBM</text><rect x='311.6' y='824.2' width='7.6' height='7.6' fill='#E69F00'/><text class='sa-text' x='324.4' y='832' font-size='12'>LinearModel</text><polygon points='420.2,822.6 425.6,828.0 420.2,833.4 414.8,828.0' fill='#009E73'/><text class='sa-text' x='429.2' y='832' font-size='12'>RandomForest</text><polygon points='531.8,822.8 536.8,831.4 526.8,831.4' fill='#CC79A7'/><text class='sa-text' x='540.8' y='832' font-size='12'>RealMLP</text><polygon points='609.4,833.2 614.4,824.6 604.4,824.6' fill='#56B4E9'/><text class='sa-text' x='618.4' y='832' font-size='12'>TabICLv2</text><text class='sa-muted' x='128' y='856' font-size='11'>Agreement of the method rankings between the downstream models: mean Spearman ρ = 0.95</text></svg><script type='text/plain' id='sa-csv'>group,method,improvement
All,(R)ReliefF,18.5678
All,CART,23.781
All,CD-PFN,27.1205
All,CPI,21.0858
All,DeepLasso,20.9432
All,ElasticNet,21.875
All,F-Test,22.7574
All,GAMformer,27.2609
All,GainRatio,19.528
All,Kumo-CLS-Markus,23.4378
All,LGBMGain,28.2199
All,LOCO,12.9833
All,LaplacianScore,-18.5819
All,Lasso,20.9045
All,LassoNet,25.5724
All,MI,23.7998
All,MarkovBlanket,21.2405
All,PACE-DC,25.1714
All,PACE-HSIC,26.0387
All,PACE-SIS,22.4314
All,RFImportance,26.2289
All,Random,0.0
All,Raw-DC,22.4294
All,Raw-HSIC,24.2268
All,Raw-SIS,22.5796
All,SBE,11.3964
All,SFS,18.1824
All,SHAP,20.6113
All,STG,17.607
All,mRMR,21.6681
LightGBM,(R)ReliefF,18.4867
LightGBM,CART,23.5071
LightGBM,CD-PFN,26.183
LightGBM,CPI,20.7231
LightGBM,DeepLasso,20.0002
LightGBM,ElasticNet,21.5894
LightGBM,F-Test,21.475
LightGBM,GAMformer,26.2507
LightGBM,GainRatio,19.7715
LightGBM,Kumo-CLS-Markus,22.6374
LightGBM,LGBMGain,27.9552
LightGBM,LOCO,13.0103
LightGBM,LaplacianScore,-23.1502
LightGBM,Lasso,21.0678
LightGBM,LassoNet,24.4199
LightGBM,MI,22.9183
LightGBM,MarkovBlanket,21.1769
LightGBM,PACE-DC,23.8011
LightGBM,PACE-HSIC,24.9057
LightGBM,PACE-SIS,20.9418
LightGBM,RFImportance,25.5467
LightGBM,Random,0.0
LightGBM,Raw-DC,21.1889
LightGBM,Raw-HSIC,23.1748
LightGBM,Raw-SIS,21.0192
LightGBM,SBE,12.3493
LightGBM,SFS,18.0757
LightGBM,SHAP,20.6223
LightGBM,STG,15.0736
LightGBM,mRMR,21.651
LinearModel,(R)ReliefF,16.2645
LinearModel,CART,21.9597
LinearModel,CD-PFN,26.4505
LinearModel,CPI,19.052
LinearModel,DeepLasso,19.8169
LinearModel,ElasticNet,22.5544
LinearModel,F-Test,22.8523
LinearModel,GAMformer,25.8336
LinearModel,GainRatio,18.3668
LinearModel,Kumo-CLS-Markus,22.5274
LinearModel,LGBMGain,25.6778
LinearModel,LOCO,11.9654
LinearModel,LaplacianScore,-14.3694
LinearModel,Lasso,21.6866
LinearModel,LassoNet,25.2308
LinearModel,MI,23.1632
LinearModel,MarkovBlanket,19.0224
LinearModel,PACE-DC,24.5097
LinearModel,PACE-HSIC,24.6864
LinearModel,PACE-SIS,23.0739
LinearModel,RFImportance,24.5664
LinearModel,Random,0.0
LinearModel,Raw-DC,21.9457
LinearModel,Raw-HSIC,22.8934
LinearModel,Raw-SIS,22.4916
LinearModel,SBE,8.3911
LinearModel,SFS,17.7144
LinearModel,SHAP,18.9699
LinearModel,STG,16.6242
LinearModel,mRMR,21.8144
RandomForest,(R)ReliefF,20.3467
RandomForest,CART,24.8293
RandomForest,CD-PFN,29.4782
RandomForest,CPI,23.2772
RandomForest,DeepLasso,22.5175
RandomForest,ElasticNet,22.1065
RandomForest,F-Test,23.7761
RandomForest,GAMformer,30.0164
RandomForest,GainRatio,20.6076
RandomForest,Kumo-CLS-Markus,25.5301
RandomForest,LGBMGain,30.8861
RandomForest,LOCO,12.7433
RandomForest,LaplacianScore,-17.0265
RandomForest,Lasso,21.1521
RandomForest,LassoNet,27.7321
RandomForest,MI,25.7525
RandomForest,MarkovBlanket,23.5531
RandomForest,PACE-DC,27.2859
RandomForest,PACE-HSIC,28.5125
RandomForest,PACE-SIS,24.3438
RandomForest,RFImportance,27.744
RandomForest,Random,0.0
RandomForest,Raw-DC,24.1007
RandomForest,Raw-HSIC,27.2425
RandomForest,Raw-SIS,24.664
RandomForest,SBE,13.0122
RandomForest,SFS,17.5256
RandomForest,SHAP,22.7012
RandomForest,STG,20.0017
RandomForest,mRMR,21.1309
RealMLP,(R)ReliefF,20.6316
RealMLP,CART,24.9132
RealMLP,CD-PFN,27.0478
RealMLP,CPI,21.0333
RealMLP,DeepLasso,21.1518
RealMLP,ElasticNet,20.9298
RealMLP,F-Test,23.128
RealMLP,GAMformer,27.1659
RealMLP,GainRatio,20.3239
RealMLP,Kumo-CLS-Markus,22.9158
RealMLP,LGBMGain,29.0103
RealMLP,LOCO,14.7581
RealMLP,LaplacianScore,-18.397
RealMLP,Lasso,19.2202
RealMLP,LassoNet,25.2174
RealMLP,MI,24.2144
RealMLP,MarkovBlanket,21.8261
RealMLP,PACE-DC,24.8272
RealMLP,PACE-HSIC,25.755
RealMLP,PACE-SIS,21.4222
RealMLP,RFImportance,27.0392
RealMLP,Random,0.0
RealMLP,Raw-DC,22.3359
RealMLP,Raw-HSIC,24.2908
RealMLP,Raw-SIS,22.6649
RealMLP,SBE,12.5247
RealMLP,SFS,18.7021
RealMLP,SHAP,19.9144
RealMLP,STG,19.3504
RealMLP,mRMR,21.5824
TabICLv2,(R)ReliefF,21.6818
TabICLv2,CART,25.9125
TabICLv2,CD-PFN,28.3484
TabICLv2,CPI,22.488
TabICLv2,DeepLasso,22.3743
TabICLv2,ElasticNet,21.7247
TabICLv2,F-Test,24.197
TabICLv2,GAMformer,29.0635
TabICLv2,GainRatio,20.8154
TabICLv2,Kumo-CLS-Markus,26.2869
TabICLv2,LGBMGain,30.4016
TabICLv2,LOCO,14.6377
TabICLv2,LaplacianScore,-19.6423
TabICLv2,Lasso,20.2986
TabICLv2,LassoNet,26.5802
TabICLv2,MI,25.4563
TabICLv2,MarkovBlanket,23.542
TabICLv2,PACE-DC,26.2553
TabICLv2,PACE-HSIC,27.8296
TabICLv2,PACE-SIS,21.8453
TabICLv2,RFImportance,29.0337
TabICLv2,Random,0.0
TabICLv2,Raw-DC,23.3979
TabICLv2,Raw-HSIC,26.0563
TabICLv2,Raw-SIS,23.2534
TabICLv2,SBE,13.1672
TabICLv2,SFS,19.3388
TabICLv2,SHAP,21.9493
TabICLv2,STG,19.0359
TabICLv2,mRMR,23.5926
</script><script>
// Theme: the Space sets data-theme on this page when its theme button was used (same origin), or
// sends {saTheme: 'light' | 'dark' | null}; without either, the page follows the system setting.
(function () {
function apply(theme) {
if (theme === 'light' || theme === 'dark') document.documentElement.setAttribute('data-theme', theme);
else document.documentElement.removeAttribute('data-theme');
}
try { apply(window.parent.document.documentElement.getAttribute('data-theme')); } catch (e) {}
window.addEventListener('message', function (event) {
if (event.data && 'saTheme' in event.data) apply(event.data.saTheme);
});
})();
function saDownload(name, blob) {
var a = document.createElement('a');
a.href = URL.createObjectURL(blob);
a.download = name;
document.body.appendChild(a);
a.click();
setTimeout(function () { URL.revokeObjectURL(a.href); a.remove(); }, 500);
}
function saCsv(name) {
saDownload(name, new Blob([document.getElementById('sa-csv').textContent], {type: 'text/csv'}));
}
// Report the page height to an embedding page (the Space resizes its iframe to it).
(function () {
function post() {
try {
var height = Math.ceil(document.body.getBoundingClientRect().height) + 4;
if (window.parent !== window) window.parent.postMessage({saFrameHeight: height}, '*');
} catch (e) {}
}
window.addEventListener('load', post);
window.addEventListener('resize', post);
if (window.ResizeObserver) new ResizeObserver(post).observe(document.body);
})();
// Instant tooltip: a native SVG <title> only shows after a browser delay of 1-3 s.
(function () {
var tip = document.createElement('div');
tip.id = 'sa-tip';
document.body.appendChild(tip);
var current = null;
function show(hit, x, y) {
if (current !== hit) {
if (current) current.classList.remove('sa-on');
current = hit;
hit.classList.add('sa-on');
var lines = hit.getAttribute('data-tip').split('\n');
tip.textContent = '';
var head = document.createElement('b');
head.textContent = lines[0];
tip.appendChild(head);
tip.appendChild(document.createTextNode('\n' + lines.slice(1).join('\n')));
tip.style.display = 'block';
}
var w = tip.offsetWidth, h = tip.offsetHeight;
var left = x + 14, top = y + 14;
if (left + w > window.innerWidth - 4) left = Math.max(4, x - w - 14);
if (top + h > window.innerHeight - 4) top = Math.max(4, y - h - 14);
tip.style.left = left + 'px';
tip.style.top = top + 'px';
}
function hide() {
if (current) current.classList.remove('sa-on');
current = null;
tip.style.display = 'none';
}
document.addEventListener('pointermove', function (e) {
var hit = e.target.closest ? e.target.closest('.sa-hit') : null;
if (hit) show(hit, e.clientX, e.clientY); else if (e.pointerType === 'mouse') hide();
});
document.addEventListener('pointerdown', function (e) { // touch: tap a bar to show, elsewhere to hide
var hit = e.target.closest ? e.target.closest('.sa-hit') : null;
if (hit) show(hit, e.clientX, e.clientY); else hide();
});
document.addEventListener('mouseleave', hide);
})();
// Downloads always use the light colours (the paper look), whatever the page's theme.
var SA_LIGHT = {'--fg': '#1f2328', '--muted': '#59636e', '--line': '#d1d9e0', '--bg': '#ffffff',
'--soft': '#f6f8fa', '--accent': '#0072B2'};
function saSvgString() {
var svg = document.getElementById('sa-figure').cloneNode(true);
var style = svg.querySelector('style');
var css = style.textContent;
Object.keys(SA_LIGHT).forEach(function (v) { css = css.split('var(' + v + ')').join(SA_LIGHT[v]); });
style.textContent = css;
svg.querySelectorAll('.sa-hit').forEach(function (hit) { hit.remove(); });
svg.setAttribute('xmlns', 'http://www.w3.org/2000/svg');
svg.setAttribute('xmlns:xlink', 'http://www.w3.org/1999/xlink');
return new XMLSerializer().serializeToString(svg);
}
function saSvg(name) {
saDownload(name + '.svg', new Blob([saSvgString()], {type: 'image/svg+xml'}));
}
function saPng(name) {
var svg = document.getElementById('sa-figure');
var box = svg.viewBox.baseVal, scale = 3;
var img = new Image();
img.onload = function () {
var canvas = document.createElement('canvas');
canvas.width = box.width * scale; canvas.height = box.height * scale;
var ctx = canvas.getContext('2d');
ctx.fillStyle = SA_LIGHT['--bg'];
ctx.fillRect(0, 0, canvas.width, canvas.height);
ctx.drawImage(img, 0, 0, canvas.width, canvas.height);
canvas.toBlob(function (blob) { saDownload(name + '.png', blob); });
};
img.src = 'data:image/svg+xml;charset=utf-8,' + encodeURIComponent(saSvgString());
}
// PDF. In the leaderboard, the page sends the figure's SVG to it (message {saPdf}), which makes a
// vector PDF (the Space's assets/downloads.js) and answers {saPdfAck}. Without an answer (the page
// alone or elsewhere), the PDF holds the figure rendered at 4x as a JPEG: one page of the figure's
// size (1 px = 0.75 pt), built by hand as the pages are self-contained, without any library.
function saPdfBlob(canvas, widthPt, heightPt) {
var jpeg = atob(canvas.toDataURL('image/jpeg', 0.95).split(',')[1]);
var w = widthPt.toFixed(2), h = heightPt.toFixed(2);
var content = 'q ' + w + ' 0 0 ' + h + ' 0 0 cm /Im0 Do Q';
var objects = [
'<< /Type /Catalog /Pages 2 0 R >>',
'<< /Type /Pages /Kids [3 0 R] /Count 1 >>',
'<< /Type /Page /Parent 2 0 R /MediaBox [0 0 ' + w + ' ' + h + '] /Resources << /XObject << /Im0 5 0 R >> >> /Contents 4 0 R >>',
'<< /Length ' + content.length + ' >>\nstream\n' + content + '\nendstream',
'<< /Type /XObject /Subtype /Image /Width ' + canvas.width + ' /Height ' + canvas.height +
' /ColorSpace /DeviceRGB /BitsPerComponent 8 /Filter /DCTDecode /Length ' + jpeg.length + ' >>\nstream\n' + jpeg + '\nendstream'
];
var pdf = '%PDF-1.4\n', offsets = [];
objects.forEach(function (body, i) { offsets.push(pdf.length); pdf += (i + 1) + ' 0 obj\n' + body + '\nendobj\n'; });
var xref = pdf.length;
pdf += 'xref\n0 ' + (objects.length + 1) + '\n0000000000 65535 f \n';
offsets.forEach(function (o) { pdf += ('0000000000' + o).slice(-10) + ' 00000 n \n'; });
pdf += 'trailer\n<< /Size ' + (objects.length + 1) + ' /Root 1 0 R >>\nstartxref\n' + xref + '\n%%EOF';
var bytes = new Uint8Array(pdf.length);
for (var i = 0; i < pdf.length; i++) bytes[i] = pdf.charCodeAt(i) & 0xff;
return new Blob([bytes], {type: 'application/pdf'});
}
var saPdfPending = {};
window.addEventListener('message', function (event) {
var name = event.data && event.data.saPdfAck;
if (typeof name === 'string' && saPdfPending[name]) { clearTimeout(saPdfPending[name]); delete saPdfPending[name]; }
});
function saPdf(name) {
var svg = document.getElementById('sa-figure');
var box = svg.viewBox.baseVal;
if (window.parent !== window && !saPdfPending[name + '.pdf']) {
saPdfPending[name + '.pdf'] = setTimeout(function () {
delete saPdfPending[name + '.pdf'];
saRasterPdf(name);
}, 1500);
window.parent.postMessage({saPdf: {svg: saSvgString(), width: box.width, height: box.height, name: name + '.pdf'}}, '*');
return;
}
if (window.parent === window) saRasterPdf(name);
}
function saRasterPdf(name) {
var svg = document.getElementById('sa-figure');
var box = svg.viewBox.baseVal, scale = 4;
var img = new Image();
img.onload = function () {
var canvas = document.createElement('canvas');
canvas.width = box.width * scale; canvas.height = box.height * scale;
var ctx = canvas.getContext('2d');
ctx.fillStyle = SA_LIGHT['--bg'];
ctx.fillRect(0, 0, canvas.width, canvas.height);
ctx.drawImage(img, 0, 0, canvas.width, canvas.height);
saDownload(name + '.pdf', saPdfBlob(canvas, box.width * 0.75, box.height * 0.75));
};
img.src = 'data:image/svg+xml;charset=utf-8,' + encodeURIComponent(saSvgString());
}
</script></body></html>