Spaces:
Running
Running
Leaderboard v0.12.3: add LGBMGain (from Preview v0.12.13; results: SelectArena_Results@49f46580)
2517b84 Download data/analysis/rank_by_size.html from SelectArena/Leaderboard: direct link, hf CLI and curl.
- Browser
- Download file 45.4 kB
-
https://huggingface.co/spaces/SelectArena/Leaderboard/resolve/main/data/analysis/rank_by_size.html
- Command line
-
hf download hf://spaces/SelectArena/Leaderboard/data/analysis/rank_by_size.html
-
curl -L -o rank_by_size.html https://huggingface.co/spaces/SelectArena/Leaderboard/resolve/main/data/analysis/rank_by_size.html
45.4 kB
| <html lang='en'><head><meta charset='utf-8'><meta name='viewport' content='width=device-width,initial-scale=1'><title>SelectArena: rank by dataset size</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_rank_by_size')">SVG</button><button onclick="saPng('selectarena_rank_by_size')">PNG</button><button onclick="saPdf('selectarena_rank_by_size')">PDF</button><button onclick="saCsv('selectarena_rank_by_size.csv')">CSV</button></div><svg id='sa-figure' viewBox='0 0 824 701' role='img' aria-label='Rank correlation of each method with the size of the datasets' style='max-width:948px;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><text class='sa-text' x='8.0' y='62.5' font-size='12'>LGBMGain</text><text class='sa-text' x='8.0' y='87.5' font-size='12'>CD-PFN</text><text class='sa-text' x='8.0' y='112.5' font-size='12'>RFImportance</text><text class='sa-text' x='8.0' y='137.5' font-size='12'>PACE-HSIC</text><text class='sa-text' x='8.0' y='162.5' font-size='12'>LassoNet</text><text class='sa-text' x='8.0' y='187.5' font-size='12'>PACE-DC</text><text class='sa-text' x='8.0' y='212.5' font-size='12'>MI</text><text class='sa-text' x='8.0' y='237.5' font-size='12'>CART</text><text class='sa-text' x='8.0' y='262.5' font-size='12'>F-Test</text><text class='sa-text' x='8.0' y='287.5' font-size='12'>PACE-SIS</text><text class='sa-text' x='8.0' y='312.5' font-size='12'>ElasticNet</text><text class='sa-text' x='8.0' y='337.5' font-size='12'>mRMR</text><text class='sa-text' x='8.0' y='362.5' font-size='12'>MarkovBlanket</text><text class='sa-text' x='8.0' y='387.5' font-size='12'>CPI</text><text class='sa-text' x='8.0' y='412.5' font-size='12'>Lasso</text><text class='sa-text' x='8.0' y='437.5' font-size='12'>SHAP</text><text class='sa-text' x='8.0' y='462.5' font-size='12'>GainRatio</text><text class='sa-text' x='8.0' y='487.5' font-size='12'>(R)ReliefF</text><text class='sa-text' x='8.0' y='512.5' font-size='12'>SFS</text><text class='sa-text' x='8.0' y='537.5' font-size='12'>LOCO</text><text class='sa-text' x='8.0' y='562.5' font-size='12'>SBE</text><text class='sa-text' x='8.0' y='587.5' font-size='12'>Random</text><text class='sa-text' x='8.0' y='612.5' font-size='12'>LaplacianScore</text><text class='sa-text' x='233.0' y='28' text-anchor='middle' font-size='12' font-weight='600'>Samples</text><line class='sa-grid' x1='136.0' x2='136.0' y1='42' y2='621.0'/><text class='sa-muted' x='136.0' y='637.0' text-anchor='middle' font-size='11'>-1</text><line class='sa-grid' x1='184.5' x2='184.5' y1='42' y2='621.0'/><text class='sa-muted' x='184.5' y='637.0' text-anchor='middle' font-size='11'>-0.5</text><line class='sa-ink' x1='233.0' x2='233.0' y1='42' y2='621.0' stroke-opacity='0.5'/><text class='sa-muted' x='233.0' y='637.0' text-anchor='middle' font-size='11'>0</text><line class='sa-grid' x1='281.5' x2='281.5' y1='42' y2='621.0'/><text class='sa-muted' x='281.5' y='637.0' text-anchor='middle' font-size='11'>0.5</text><line class='sa-grid' x1='330.0' x2='330.0' y1='42' y2='621.0'/><text class='sa-muted' x='330.0' y='637.0' text-anchor='middle' font-size='11'>1</text><text class='sa-muted' x='233.0' y='654.0' text-anchor='middle' font-size='11'>← better with fewer · more →</text><line x1='269.0' x2='302.7' y1='58.5' y2='58.5' stroke='#0072B2' stroke-width='2' stroke-linecap='round'/><circle cx='287.4' cy='58.5' r='4.5' fill='#0072B2'/><rect class='sa-hit' x='130.0' y='46.0' width='206.0' height='25' data-tip='LGBMGain · Samples Rank correlation +0.56 (95% CI +0.37 to +0.72) Ranks better with more samples 71 datasets'/><line x1='220.7' x2='265.2' y1='83.5' y2='83.5' class='sa-ci-none' stroke-width='2' stroke-linecap='round'/><circle class='sa-hollow' cx='242.7' cy='83.5' r='4' stroke-width='1.5'/><rect class='sa-hit' x='130.0' y='71.0' width='206.0' height='25' data-tip='CD-PFN · Samples Rank correlation +0.10 (95% CI -0.13 to +0.33) No clear trend (the interval includes 0) 71 datasets'/><line x1='207.4' x2='254.8' y1='108.5' y2='108.5' class='sa-ci-none' stroke-width='2' stroke-linecap='round'/><circle class='sa-hollow' cx='230.9' cy='108.5' r='4' stroke-width='1.5'/><rect class='sa-hit' x='130.0' y='96.0' width='206.0' height='25' data-tip='RFImportance · Samples Rank correlation -0.02 (95% CI -0.26 to +0.22) No clear trend (the interval includes 0) 71 datasets'/><line x1='190.5' x2='234.3' y1='133.5' y2='133.5' class='sa-ci-none' stroke-width='2' stroke-linecap='round'/><circle class='sa-hollow' cx='212.6' cy='133.5' r='4' stroke-width='1.5'/><rect class='sa-hit' x='130.0' y='121.0' width='206.0' height='25' data-tip='PACE-HSIC · Samples Rank correlation -0.21 (95% CI -0.44 to +0.01) No clear trend (the interval includes 0) 71 datasets'/><line x1='230.6' x2='275.7' y1='158.5' y2='158.5' class='sa-ci-none' stroke-width='2' stroke-linecap='round'/><circle class='sa-hollow' cx='254.5' cy='158.5' r='4' stroke-width='1.5'/><rect class='sa-hit' x='130.0' y='146.0' width='206.0' height='25' data-tip='LassoNet · Samples Rank correlation +0.22 (95% CI -0.02 to +0.44) No clear trend (the interval includes 0) 71 datasets'/><line x1='183.0' x2='221.1' y1='183.5' y2='183.5' stroke='#D55E00' stroke-width='2' stroke-linecap='round'/><circle cx='200.1' cy='183.5' r='4.5' fill='#D55E00'/><rect class='sa-hit' x='130.0' y='171.0' width='206.0' height='25' data-tip='PACE-DC · Samples Rank correlation -0.34 (95% CI -0.52 to -0.12) Ranks worse with more samples 71 datasets'/><line x1='191.7' x2='233.1' y1='208.5' y2='208.5' class='sa-ci-none' stroke-width='2' stroke-linecap='round'/><circle class='sa-hollow' cx='211.3' cy='208.5' r='4' stroke-width='1.5'/><rect class='sa-hit' x='130.0' y='196.0' width='206.0' height='25' data-tip='MI · Samples Rank correlation -0.22 (95% CI -0.43 to +0.00) No clear trend (the interval includes 0) 71 datasets'/><line x1='236.7' x2='284.6' y1='233.5' y2='233.5' stroke='#0072B2' stroke-width='2' stroke-linecap='round'/><circle cx='262.8' cy='233.5' r='4.5' fill='#0072B2'/><rect class='sa-hit' x='130.0' y='221.0' width='206.0' height='25' data-tip='CART · Samples Rank correlation +0.31 (95% CI +0.04 to +0.53) Ranks better with more samples 71 datasets'/><line x1='196.7' x2='244.3' y1='258.5' y2='258.5' class='sa-ci-none' stroke-width='2' stroke-linecap='round'/><circle class='sa-hollow' cx='219.9' cy='258.5' r='4' stroke-width='1.5'/><rect class='sa-hit' x='130.0' y='246.0' width='206.0' height='25' data-tip='F-Test · Samples Rank correlation -0.13 (95% CI -0.37 to +0.12) No clear trend (the interval includes 0) 71 datasets'/><line x1='181.2' x2='219.9' y1='283.5' y2='283.5' stroke='#D55E00' stroke-width='2' stroke-linecap='round'/><circle cx='198.6' cy='283.5' r='4.5' fill='#D55E00'/><rect class='sa-hit' x='130.0' y='271.0' width='206.0' height='25' data-tip='PACE-SIS · Samples Rank correlation -0.35 (95% CI -0.53 to -0.14) Ranks worse with more samples 71 datasets'/><line x1='221.4' x2='268.0' y1='308.5' y2='308.5' class='sa-ci-none' stroke-width='2' stroke-linecap='round'/><circle class='sa-hollow' cx='245.7' cy='308.5' r='4' stroke-width='1.5'/><rect class='sa-hit' x='130.0' y='296.0' width='206.0' height='25' data-tip='ElasticNet · Samples Rank correlation +0.13 (95% CI -0.12 to +0.36) No clear trend (the interval includes 0) 71 datasets'/><line x1='190.0' x2='234.5' y1='333.5' y2='333.5' class='sa-ci-none' stroke-width='2' stroke-linecap='round'/><circle class='sa-hollow' cx='210.9' cy='333.5' r='4' stroke-width='1.5'/><rect class='sa-hit' x='130.0' y='321.0' width='206.0' height='25' data-tip='mRMR · Samples Rank correlation -0.23 (95% CI -0.44 to +0.02) No clear trend (the interval includes 0) 71 datasets'/><line x1='223.9' x2='266.2' y1='358.5' y2='358.5' class='sa-ci-none' stroke-width='2' stroke-linecap='round'/><circle class='sa-hollow' cx='244.4' cy='358.5' r='4' stroke-width='1.5'/><rect class='sa-hit' x='130.0' y='346.0' width='206.0' height='25' data-tip='MarkovBlanket · Samples Rank correlation +0.12 (95% CI -0.09 to +0.34) No clear trend (the interval includes 0) 71 datasets'/><line x1='237.4' x2='281.2' y1='383.5' y2='383.5' stroke='#0072B2' stroke-width='2' stroke-linecap='round'/><circle cx='260.8' cy='383.5' r='4.5' fill='#0072B2'/><rect class='sa-hit' x='130.0' y='371.0' width='206.0' height='25' data-tip='CPI · Samples Rank correlation +0.29 (95% CI +0.05 to +0.50) Ranks better with more samples 71 datasets'/><line x1='219.6' x2='262.9' y1='408.5' y2='408.5' class='sa-ci-none' stroke-width='2' stroke-linecap='round'/><circle class='sa-hollow' cx='242.7' cy='408.5' r='4' stroke-width='1.5'/><rect class='sa-hit' x='130.0' y='396.0' width='206.0' height='25' data-tip='Lasso · Samples Rank correlation +0.10 (95% CI -0.14 to +0.31) No clear trend (the interval includes 0) 71 datasets'/><line x1='262.8' x2='295.9' y1='433.5' y2='433.5' stroke='#0072B2' stroke-width='2' stroke-linecap='round'/><circle cx='281.3' cy='433.5' r='4.5' fill='#0072B2'/><rect class='sa-hit' x='130.0' y='421.0' width='206.0' height='25' data-tip='SHAP · Samples Rank correlation +0.50 (95% CI +0.31 to +0.65) Ranks better with more samples 71 datasets'/><line x1='188.4' x2='232.8' y1='458.5' y2='458.5' stroke='#D55E00' stroke-width='2' stroke-linecap='round'/><circle cx='209.8' cy='458.5' r='4.5' fill='#D55E00'/><rect class='sa-hit' x='130.0' y='446.0' width='206.0' height='25' data-tip='GainRatio · Samples Rank correlation -0.24 (95% CI -0.46 to -0.00) Ranks worse with more samples 71 datasets'/><line x1='176.1' x2='214.7' y1='483.5' y2='483.5' stroke='#D55E00' stroke-width='2' stroke-linecap='round'/><circle cx='193.8' cy='483.5' r='4.5' fill='#D55E00'/><rect class='sa-hit' x='130.0' y='471.0' width='206.0' height='25' data-tip='(R)ReliefF · Samples Rank correlation -0.40 (95% CI -0.59 to -0.19) Ranks worse with more samples 71 datasets'/><line x1='229.7' x2='277.6' y1='508.5' y2='508.5' class='sa-ci-none' stroke-width='2' stroke-linecap='round'/><circle class='sa-hollow' cx='255.5' cy='508.5' r='4' stroke-width='1.5'/><rect class='sa-hit' x='130.0' y='496.0' width='206.0' height='25' data-tip='SFS · Samples Rank correlation +0.23 (95% CI -0.03 to +0.46) No clear trend (the interval includes 0) 71 datasets'/><line x1='228.8' x2='275.4' y1='533.5' y2='533.5' class='sa-ci-none' stroke-width='2' stroke-linecap='round'/><circle class='sa-hollow' cx='254.0' cy='533.5' r='4' stroke-width='1.5'/><rect class='sa-hit' x='130.0' y='521.0' width='206.0' height='25' data-tip='LOCO · Samples Rank correlation +0.22 (95% CI -0.04 to +0.44) No clear trend (the interval includes 0) 71 datasets'/><line x1='214.2' x2='265.3' y1='558.5' y2='558.5' class='sa-ci-none' stroke-width='2' stroke-linecap='round'/><circle class='sa-hollow' cx='239.3' cy='558.5' r='4' stroke-width='1.5'/><rect class='sa-hit' x='130.0' y='546.0' width='206.0' height='25' data-tip='SBE · Samples Rank correlation +0.06 (95% CI -0.19 to +0.33) No clear trend (the interval includes 0) 71 datasets'/><line x1='182.2' x2='221.7' y1='583.5' y2='583.5' stroke='#D55E00' stroke-width='2' stroke-linecap='round'/><circle cx='200.8' cy='583.5' r='4.5' fill='#D55E00'/><rect class='sa-hit' x='130.0' y='571.0' width='206.0' height='25' data-tip='Random · Samples Rank correlation -0.33 (95% CI -0.52 to -0.12) Ranks worse with more samples 71 datasets'/><line x1='176.0' x2='219.1' y1='608.5' y2='608.5' stroke='#D55E00' stroke-width='2' stroke-linecap='round'/><circle cx='195.2' cy='608.5' r='4.5' fill='#D55E00'/><rect class='sa-hit' x='130.0' y='596.0' width='206.0' height='25' data-tip='LaplacianScore · Samples Rank correlation -0.39 (95% CI -0.59 to -0.14) Ranks worse with more samples 71 datasets'/><text class='sa-text' x='465.0' y='28' text-anchor='middle' font-size='12' font-weight='600'>Features</text><line class='sa-grid' x1='368.0' x2='368.0' y1='42' y2='621.0'/><text class='sa-muted' x='368.0' y='637.0' text-anchor='middle' font-size='11'>-1</text><line class='sa-grid' x1='416.5' x2='416.5' y1='42' y2='621.0'/><text class='sa-muted' x='416.5' y='637.0' text-anchor='middle' font-size='11'>-0.5</text><line class='sa-ink' x1='465.0' x2='465.0' y1='42' y2='621.0' stroke-opacity='0.5'/><text class='sa-muted' x='465.0' y='637.0' text-anchor='middle' font-size='11'>0</text><line class='sa-grid' x1='513.5' x2='513.5' y1='42' y2='621.0'/><text class='sa-muted' x='513.5' y='637.0' text-anchor='middle' font-size='11'>0.5</text><line class='sa-grid' x1='562.0' x2='562.0' y1='42' y2='621.0'/><text class='sa-muted' x='562.0' y='637.0' text-anchor='middle' font-size='11'>1</text><text class='sa-muted' x='465.0' y='654.0' text-anchor='middle' font-size='11'>← better with fewer · more →</text><line x1='467.4' x2='511.8' y1='58.5' y2='58.5' stroke='#0072B2' stroke-width='2' stroke-linecap='round'/><circle cx='490.2' cy='58.5' r='4.5' fill='#0072B2'/><rect class='sa-hit' x='362.0' y='46.0' width='206.0' height='25' data-tip='LGBMGain · Features Rank correlation +0.26 (95% CI +0.03 to +0.48) Ranks better with more features 71 datasets'/><line x1='429.4' x2='473.5' y1='83.5' y2='83.5' class='sa-ci-none' stroke-width='2' stroke-linecap='round'/><circle class='sa-hollow' cx='451.7' cy='83.5' r='4' stroke-width='1.5'/><rect class='sa-hit' x='362.0' y='71.0' width='206.0' height='25' data-tip='CD-PFN · Features Rank correlation -0.14 (95% CI -0.37 to +0.09) No clear trend (the interval includes 0) 71 datasets'/><line x1='484.3' x2='521.2' y1='108.5' y2='108.5' stroke='#0072B2' stroke-width='2' stroke-linecap='round'/><circle cx='503.7' cy='108.5' r='4.5' fill='#0072B2'/><rect class='sa-hit' x='362.0' y='96.0' width='206.0' height='25' data-tip='RFImportance · Features Rank correlation +0.40 (95% CI +0.20 to +0.58) Ranks better with more features 71 datasets'/><line x1='443.0' x2='485.8' y1='133.5' y2='133.5' class='sa-ci-none' stroke-width='2' stroke-linecap='round'/><circle class='sa-hollow' cx='464.3' cy='133.5' r='4' stroke-width='1.5'/><rect class='sa-hit' x='362.0' y='121.0' width='206.0' height='25' data-tip='PACE-HSIC · Features Rank correlation -0.01 (95% CI -0.23 to +0.21) No clear trend (the interval includes 0) 71 datasets'/><line x1='471.2' x2='513.3' y1='158.5' y2='158.5' stroke='#0072B2' stroke-width='2' stroke-linecap='round'/><circle cx='493.4' cy='158.5' r='4.5' fill='#0072B2'/><rect class='sa-hit' x='362.0' y='146.0' width='206.0' height='25' data-tip='LassoNet · Features Rank correlation +0.29 (95% CI +0.06 to +0.50) Ranks better with more features 71 datasets'/><line x1='438.2' x2='479.5' y1='183.5' y2='183.5' class='sa-ci-none' stroke-width='2' stroke-linecap='round'/><circle class='sa-hollow' cx='458.8' cy='183.5' r='4' stroke-width='1.5'/><rect class='sa-hit' x='362.0' y='171.0' width='206.0' height='25' data-tip='PACE-DC · Features Rank correlation -0.06 (95% CI -0.28 to +0.15) No clear trend (the interval includes 0) 71 datasets'/><line x1='435.0' x2='480.9' y1='208.5' y2='208.5' class='sa-ci-none' stroke-width='2' stroke-linecap='round'/><circle class='sa-hollow' cx='458.4' cy='208.5' r='4' stroke-width='1.5'/><rect class='sa-hit' x='362.0' y='196.0' width='206.0' height='25' data-tip='MI · Features Rank correlation -0.07 (95% CI -0.31 to +0.16) No clear trend (the interval includes 0) 71 datasets'/><line x1='446.1' x2='497.7' y1='233.5' y2='233.5' class='sa-ci-none' stroke-width='2' stroke-linecap='round'/><circle class='sa-hollow' cx='471.6' cy='233.5' r='4' stroke-width='1.5'/><rect class='sa-hit' x='362.0' y='221.0' width='206.0' height='25' data-tip='CART · Features Rank correlation +0.07 (95% CI -0.19 to +0.34) No clear trend (the interval includes 0) 71 datasets'/><line x1='453.7' x2='499.0' y1='258.5' y2='258.5' class='sa-ci-none' stroke-width='2' stroke-linecap='round'/><circle class='sa-hollow' cx='477.5' cy='258.5' r='4' stroke-width='1.5'/><rect class='sa-hit' x='362.0' y='246.0' width='206.0' height='25' data-tip='F-Test · Features Rank correlation +0.13 (95% CI -0.12 to +0.35) No clear trend (the interval includes 0) 71 datasets'/><line x1='445.9' x2='486.4' y1='283.5' y2='283.5' class='sa-ci-none' stroke-width='2' stroke-linecap='round'/><circle class='sa-hollow' cx='465.3' cy='283.5' r='4' stroke-width='1.5'/><rect class='sa-hit' x='362.0' y='271.0' width='206.0' height='25' data-tip='PACE-SIS · Features Rank correlation +0.00 (95% CI -0.20 to +0.22) No clear trend (the interval includes 0) 71 datasets'/><line x1='492.5' x2='522.9' y1='308.5' y2='308.5' stroke='#0072B2' stroke-width='2' stroke-linecap='round'/><circle cx='510.2' cy='308.5' r='4.5' fill='#0072B2'/><rect class='sa-hit' x='362.0' y='296.0' width='206.0' height='25' data-tip='ElasticNet · Features Rank correlation +0.47 (95% CI +0.28 to +0.60) Ranks better with more features 71 datasets'/><line x1='457.3' x2='506.2' y1='333.5' y2='333.5' class='sa-ci-none' stroke-width='2' stroke-linecap='round'/><circle class='sa-hollow' cx='481.5' cy='333.5' r='4' stroke-width='1.5'/><rect class='sa-hit' x='362.0' y='321.0' width='206.0' height='25' data-tip='mRMR · Features Rank correlation +0.17 (95% CI -0.08 to +0.42) No clear trend (the interval includes 0) 71 datasets'/><line x1='450.2' x2='491.7' y1='358.5' y2='358.5' class='sa-ci-none' stroke-width='2' stroke-linecap='round'/><circle class='sa-hollow' cx='471.6' cy='358.5' r='4' stroke-width='1.5'/><rect class='sa-hit' x='362.0' y='346.0' width='206.0' height='25' data-tip='MarkovBlanket · Features Rank correlation +0.07 (95% CI -0.15 to +0.27) No clear trend (the interval includes 0) 71 datasets'/><line x1='429.6' x2='474.6' y1='383.5' y2='383.5' class='sa-ci-none' stroke-width='2' stroke-linecap='round'/><circle class='sa-hollow' cx='451.0' cy='383.5' r='4' stroke-width='1.5'/><rect class='sa-hit' x='362.0' y='371.0' width='206.0' height='25' data-tip='CPI · Features Rank correlation -0.14 (95% CI -0.37 to +0.10) No clear trend (the interval includes 0) 71 datasets'/><line x1='487.1' x2='521.4' y1='408.5' y2='408.5' stroke='#0072B2' stroke-width='2' stroke-linecap='round'/><circle cx='505.8' cy='408.5' r='4.5' fill='#0072B2'/><rect class='sa-hit' x='362.0' y='396.0' width='206.0' height='25' data-tip='Lasso · Features Rank correlation +0.42 (95% CI +0.23 to +0.58) Ranks better with more features 71 datasets'/><line x1='435.0' x2='481.6' y1='433.5' y2='433.5' class='sa-ci-none' stroke-width='2' stroke-linecap='round'/><circle class='sa-hollow' cx='457.1' cy='433.5' r='4' stroke-width='1.5'/><rect class='sa-hit' x='362.0' y='421.0' width='206.0' height='25' data-tip='SHAP · Features Rank correlation -0.08 (95% CI -0.31 to +0.17) No clear trend (the interval includes 0) 71 datasets'/><line x1='447.4' x2='496.5' y1='458.5' y2='458.5' class='sa-ci-none' stroke-width='2' stroke-linecap='round'/><circle class='sa-hollow' cx='472.6' cy='458.5' r='4' stroke-width='1.5'/><rect class='sa-hit' x='362.0' y='446.0' width='206.0' height='25' data-tip='GainRatio · Features Rank correlation +0.08 (95% CI -0.18 to +0.32) No clear trend (the interval includes 0) 71 datasets'/><line x1='462.1' x2='508.1' y1='483.5' y2='483.5' class='sa-ci-none' stroke-width='2' stroke-linecap='round'/><circle class='sa-hollow' cx='487.1' cy='483.5' r='4' stroke-width='1.5'/><rect class='sa-hit' x='362.0' y='471.0' width='206.0' height='25' data-tip='(R)ReliefF · Features Rank correlation +0.23 (95% CI -0.03 to +0.44) No clear trend (the interval includes 0) 71 datasets'/><line x1='422.9' x2='463.6' y1='508.5' y2='508.5' stroke='#D55E00' stroke-width='2' stroke-linecap='round'/><circle cx='441.0' cy='508.5' r='4.5' fill='#D55E00'/><rect class='sa-hit' x='362.0' y='496.0' width='206.0' height='25' data-tip='SFS · Features Rank correlation -0.25 (95% CI -0.43 to -0.01) Ranks worse with more features 71 datasets'/><line x1='401.1' x2='435.3' y1='533.5' y2='533.5' stroke='#D55E00' stroke-width='2' stroke-linecap='round'/><circle cx='415.8' cy='533.5' r='4.5' fill='#D55E00'/><rect class='sa-hit' x='362.0' y='521.0' width='206.0' height='25' data-tip='LOCO · Features Rank correlation -0.51 (95% CI -0.66 to -0.31) Ranks worse with more features 71 datasets'/><line x1='391.8' x2='414.6' y1='558.5' y2='558.5' stroke='#D55E00' stroke-width='2' stroke-linecap='round'/><circle cx='401.1' cy='558.5' r='4.5' fill='#D55E00'/><rect class='sa-hit' x='362.0' y='546.0' width='206.0' height='25' data-tip='SBE · Features Rank correlation -0.66 (95% CI -0.75 to -0.52) Ranks worse with more features 71 datasets'/><line x1='438.3' x2='480.7' y1='583.5' y2='583.5' class='sa-ci-none' stroke-width='2' stroke-linecap='round'/><circle class='sa-hollow' cx='458.0' cy='583.5' r='4' stroke-width='1.5'/><rect class='sa-hit' x='362.0' y='571.0' width='206.0' height='25' data-tip='Random · Features Rank correlation -0.07 (95% CI -0.27 to +0.16) No clear trend (the interval includes 0) 71 datasets'/><line x1='425.2' x2='471.9' y1='608.5' y2='608.5' class='sa-ci-none' stroke-width='2' stroke-linecap='round'/><circle class='sa-hollow' cx='448.3' cy='608.5' r='4' stroke-width='1.5'/><rect class='sa-hit' x='362.0' y='596.0' width='206.0' height='25' data-tip='LaplacianScore · Features Rank correlation -0.17 (95% CI -0.41 to +0.07) No clear trend (the interval includes 0) 71 datasets'/><text class='sa-text' x='697.0' y='28' text-anchor='middle' font-size='12' font-weight='600'>Samples per feature</text><line class='sa-grid' x1='600.0' x2='600.0' y1='42' y2='621.0'/><text class='sa-muted' x='600.0' y='637.0' text-anchor='middle' font-size='11'>-1</text><line class='sa-grid' x1='648.5' x2='648.5' y1='42' y2='621.0'/><text class='sa-muted' x='648.5' y='637.0' text-anchor='middle' font-size='11'>-0.5</text><line class='sa-ink' x1='697.0' x2='697.0' y1='42' y2='621.0' stroke-opacity='0.5'/><text class='sa-muted' x='697.0' y='637.0' text-anchor='middle' font-size='11'>0</text><line class='sa-grid' x1='745.5' x2='745.5' y1='42' y2='621.0'/><text class='sa-muted' x='745.5' y='637.0' text-anchor='middle' font-size='11'>0.5</text><line class='sa-grid' x1='794.0' x2='794.0' y1='42' y2='621.0'/><text class='sa-muted' x='794.0' y='637.0' text-anchor='middle' font-size='11'>1</text><text class='sa-muted' x='697.0' y='654.0' text-anchor='middle' font-size='11'>← better with fewer · more →</text><line x1='701.4' x2='740.2' y1='58.5' y2='58.5' stroke='#0072B2' stroke-width='2' stroke-linecap='round'/><circle cx='720.6' cy='58.5' r='4.5' fill='#0072B2'/><rect class='sa-hit' x='594.0' y='46.0' width='206.0' height='25' data-tip='LGBMGain · Samples per feature Rank correlation +0.24 (95% CI +0.04 to +0.45) Ranks better with more samples per feature 71 datasets'/><line x1='681.0' x2='726.0' y1='83.5' y2='83.5' class='sa-ci-none' stroke-width='2' stroke-linecap='round'/><circle class='sa-hollow' cx='702.9' cy='83.5' r='4' stroke-width='1.5'/><rect class='sa-hit' x='594.0' y='71.0' width='206.0' height='25' data-tip='CD-PFN · Samples per feature Rank correlation +0.06 (95% CI -0.17 to +0.30) No clear trend (the interval includes 0) 71 datasets'/><line x1='656.3' x2='699.0' y1='108.5' y2='108.5' class='sa-ci-none' stroke-width='2' stroke-linecap='round'/><circle class='sa-hollow' cx='676.7' cy='108.5' r='4' stroke-width='1.5'/><rect class='sa-hit' x='594.0' y='96.0' width='206.0' height='25' data-tip='RFImportance · Samples per feature Rank correlation -0.21 (95% CI -0.42 to +0.02) No clear trend (the interval includes 0) 71 datasets'/><line x1='655.0' x2='696.7' y1='133.5' y2='133.5' stroke='#D55E00' stroke-width='2' stroke-linecap='round'/><circle cx='675.2' cy='133.5' r='4.5' fill='#D55E00'/><rect class='sa-hit' x='594.0' y='121.0' width='206.0' height='25' data-tip='PACE-HSIC · Samples per feature Rank correlation -0.22 (95% CI -0.43 to -0.00) Ranks worse with more samples per feature 71 datasets'/><line x1='677.8' x2='723.3' y1='158.5' y2='158.5' class='sa-ci-none' stroke-width='2' stroke-linecap='round'/><circle class='sa-hollow' cx='700.4' cy='158.5' r='4' stroke-width='1.5'/><rect class='sa-hit' x='594.0' y='146.0' width='206.0' height='25' data-tip='LassoNet · Samples per feature Rank correlation +0.03 (95% CI -0.20 to +0.27) No clear trend (the interval includes 0) 71 datasets'/><line x1='649.5' x2='691.5' y1='183.5' y2='183.5' stroke='#D55E00' stroke-width='2' stroke-linecap='round'/><circle cx='669.7' cy='183.5' r='4.5' fill='#D55E00'/><rect class='sa-hit' x='594.0' y='171.0' width='206.0' height='25' data-tip='PACE-DC · Samples per feature Rank correlation -0.28 (95% CI -0.49 to -0.06) Ranks worse with more samples per feature 71 datasets'/><line x1='659.7' x2='701.2' y1='208.5' y2='208.5' class='sa-ci-none' stroke-width='2' stroke-linecap='round'/><circle class='sa-hollow' cx='679.7' cy='208.5' r='4' stroke-width='1.5'/><rect class='sa-hit' x='594.0' y='196.0' width='206.0' height='25' data-tip='MI · Samples per feature Rank correlation -0.18 (95% CI -0.38 to +0.04) No clear trend (the interval includes 0) 71 datasets'/><line x1='690.3' x2='737.7' y1='233.5' y2='233.5' class='sa-ci-none' stroke-width='2' stroke-linecap='round'/><circle class='sa-hollow' cx='714.0' cy='233.5' r='4' stroke-width='1.5'/><rect class='sa-hit' x='594.0' y='221.0' width='206.0' height='25' data-tip='CART · Samples per feature Rank correlation +0.18 (95% CI -0.07 to +0.42) No clear trend (the interval includes 0) 71 datasets'/><line x1='657.5' x2='705.9' y1='258.5' y2='258.5' class='sa-ci-none' stroke-width='2' stroke-linecap='round'/><circle class='sa-hollow' cx='681.2' cy='258.5' r='4' stroke-width='1.5'/><rect class='sa-hit' x='594.0' y='246.0' width='206.0' height='25' data-tip='F-Test · Samples per feature Rank correlation -0.16 (95% CI -0.41 to +0.09) No clear trend (the interval includes 0) 71 datasets'/><line x1='650.9' x2='689.5' y1='283.5' y2='283.5' stroke='#D55E00' stroke-width='2' stroke-linecap='round'/><circle cx='669.2' cy='283.5' r='4.5' fill='#D55E00'/><rect class='sa-hit' x='594.0' y='271.0' width='206.0' height='25' data-tip='PACE-SIS · Samples per feature Rank correlation -0.29 (95% CI -0.48 to -0.08) Ranks worse with more samples per feature 71 datasets'/><line x1='669.4' x2='714.6' y1='308.5' y2='308.5' class='sa-ci-none' stroke-width='2' stroke-linecap='round'/><circle class='sa-hollow' cx='689.9' cy='308.5' r='4' stroke-width='1.5'/><rect class='sa-hit' x='594.0' y='296.0' width='206.0' height='25' data-tip='ElasticNet · Samples per feature Rank correlation -0.07 (95% CI -0.29 to +0.18) No clear trend (the interval includes 0) 71 datasets'/><line x1='647.7' x2='692.2' y1='333.5' y2='333.5' stroke='#D55E00' stroke-width='2' stroke-linecap='round'/><circle cx='667.9' cy='333.5' r='4.5' fill='#D55E00'/><rect class='sa-hit' x='594.0' y='321.0' width='206.0' height='25' data-tip='mRMR · Samples per feature Rank correlation -0.30 (95% CI -0.51 to -0.05) Ranks worse with more samples per feature 71 datasets'/><line x1='674.7' x2='718.4' y1='358.5' y2='358.5' class='sa-ci-none' stroke-width='2' stroke-linecap='round'/><circle class='sa-hollow' cx='696.4' cy='358.5' r='4' stroke-width='1.5'/><rect class='sa-hit' x='594.0' y='346.0' width='206.0' height='25' data-tip='MarkovBlanket · Samples per feature Rank correlation -0.01 (95% CI -0.23 to +0.22) No clear trend (the interval includes 0) 71 datasets'/><line x1='690.6' x2='736.9' y1='383.5' y2='383.5' class='sa-ci-none' stroke-width='2' stroke-linecap='round'/><circle class='sa-hollow' cx='714.4' cy='383.5' r='4' stroke-width='1.5'/><rect class='sa-hit' x='594.0' y='371.0' width='206.0' height='25' data-tip='CPI · Samples per feature Rank correlation +0.18 (95% CI -0.07 to +0.41) No clear trend (the interval includes 0) 71 datasets'/><line x1='667.0' x2='709.4' y1='408.5' y2='408.5' class='sa-ci-none' stroke-width='2' stroke-linecap='round'/><circle class='sa-hollow' cx='687.9' cy='408.5' r='4' stroke-width='1.5'/><rect class='sa-hit' x='594.0' y='396.0' width='206.0' height='25' data-tip='Lasso · Samples per feature Rank correlation -0.09 (95% CI -0.31 to +0.13) No clear trend (the interval includes 0) 71 datasets'/><line x1='721.7' x2='757.8' y1='433.5' y2='433.5' stroke='#0072B2' stroke-width='2' stroke-linecap='round'/><circle cx='741.3' cy='433.5' r='4.5' fill='#0072B2'/><rect class='sa-hit' x='594.0' y='421.0' width='206.0' height='25' data-tip='SHAP · Samples per feature Rank correlation +0.46 (95% CI +0.25 to +0.63) Ranks better with more samples per feature 71 datasets'/><line x1='653.9' x2='699.0' y1='458.5' y2='458.5' class='sa-ci-none' stroke-width='2' stroke-linecap='round'/><circle class='sa-hollow' cx='674.7' cy='458.5' r='4' stroke-width='1.5'/><rect class='sa-hit' x='594.0' y='446.0' width='206.0' height='25' data-tip='GainRatio · Samples per feature Rank correlation -0.23 (95% CI -0.44 to +0.02) No clear trend (the interval includes 0) 71 datasets'/><line x1='648.2' x2='693.1' y1='483.5' y2='483.5' stroke='#D55E00' stroke-width='2' stroke-linecap='round'/><circle cx='669.6' cy='483.5' r='4.5' fill='#D55E00'/><rect class='sa-hit' x='594.0' y='471.0' width='206.0' height='25' data-tip='(R)ReliefF · Samples per feature Rank correlation -0.28 (95% CI -0.50 to -0.04) Ranks worse with more samples per feature 71 datasets'/><line x1='700.1' x2='742.9' y1='508.5' y2='508.5' stroke='#0072B2' stroke-width='2' stroke-linecap='round'/><circle cx='721.7' cy='508.5' r='4.5' fill='#0072B2'/><rect class='sa-hit' x='594.0' y='496.0' width='206.0' height='25' data-tip='SFS · Samples per feature Rank correlation +0.25 (95% CI +0.03 to +0.47) Ranks better with more samples per feature 71 datasets'/><line x1='722.0' x2='760.0' y1='533.5' y2='533.5' stroke='#0072B2' stroke-width='2' stroke-linecap='round'/><circle cx='743.5' cy='533.5' r='4.5' fill='#0072B2'/><rect class='sa-hit' x='594.0' y='521.0' width='206.0' height='25' data-tip='LOCO · Samples per feature Rank correlation +0.48 (95% CI +0.26 to +0.65) Ranks better with more samples per feature 71 datasets'/><line x1='713.4' x2='757.3' y1='558.5' y2='558.5' stroke='#0072B2' stroke-width='2' stroke-linecap='round'/><circle cx='738.1' cy='558.5' r='4.5' fill='#0072B2'/><rect class='sa-hit' x='594.0' y='546.0' width='206.0' height='25' data-tip='SBE · Samples per feature Rank correlation +0.42 (95% CI +0.17 to +0.62) Ranks better with more samples per feature 71 datasets'/><line x1='654.0' x2='693.5' y1='583.5' y2='583.5' stroke='#D55E00' stroke-width='2' stroke-linecap='round'/><circle cx='672.8' cy='583.5' r='4.5' fill='#D55E00'/><rect class='sa-hit' x='594.0' y='571.0' width='206.0' height='25' data-tip='Random · Samples per feature Rank correlation -0.25 (95% CI -0.44 to -0.04) Ranks worse with more samples per feature 71 datasets'/><line x1='655.4' x2='702.9' y1='608.5' y2='608.5' class='sa-ci-none' stroke-width='2' stroke-linecap='round'/><circle class='sa-hollow' cx='678.5' cy='608.5' r='4' stroke-width='1.5'/><rect class='sa-hit' x='594.0' y='596.0' width='206.0' height='25' data-tip='LaplacianScore · Samples per feature Rank correlation -0.19 (95% CI -0.43 to +0.06) No clear trend (the interval includes 0) 71 datasets'/><circle cx='133.0' cy='679.0' r='4.5' fill='#0072B2'/><text class='sa-text' x='142.0' y='683' font-size='12'>Positive correlation</text><circle cx='307.0' cy='679.0' r='4.5' fill='#D55E00'/><text class='sa-text' x='316.0' y='683' font-size='12'>Negative correlation</text><circle class='sa-hollow' cx='481.0' cy='679.0' r='4' stroke-width='1.5'/><text class='sa-text' x='490.0' y='683' font-size='12'>No clear trend</text></svg><script type='text/plain' id='sa-csv'>characteristic,method,rho,ci_low,ci_high,n_datasets | |
| Samples,(R)ReliefF,-0.404,-0.586,-0.189,71 | |
| Samples,CART,0.307,0.038,0.532,71 | |
| Samples,CD-PFN,0.1,-0.127,0.332,71 | |
| Samples,CPI,0.286,0.045,0.497,71 | |
| Samples,ElasticNet,0.131,-0.12,0.36,71 | |
| Samples,F-Test,-0.135,-0.374,0.117,71 | |
| Samples,GainRatio,-0.239,-0.46,-0.002,71 | |
| Samples,LGBMGain,0.561,0.371,0.718,71 | |
| Samples,LOCO,0.216,-0.044,0.437,71 | |
| Samples,LaplacianScore,-0.39,-0.587,-0.143,71 | |
| Samples,Lasso,0.1,-0.138,0.308,71 | |
| Samples,LassoNet,0.222,-0.024,0.44,71 | |
| Samples,MI,-0.224,-0.425,0.001,71 | |
| Samples,MarkovBlanket,0.118,-0.094,0.342,71 | |
| Samples,PACE-DC,-0.339,-0.515,-0.123,71 | |
| Samples,PACE-HSIC,-0.211,-0.438,0.014,71 | |
| Samples,PACE-SIS,-0.355,-0.534,-0.135,71 | |
| Samples,RFImportance,-0.021,-0.263,0.225,71 | |
| Samples,Random,-0.332,-0.523,-0.116,71 | |
| Samples,SBE,0.065,-0.194,0.333,71 | |
| Samples,SFS,0.232,-0.034,0.459,71 | |
| Samples,SHAP,0.498,0.307,0.648,71 | |
| Samples,mRMR,-0.228,-0.444,0.016,71 | |
| Features,(R)ReliefF,0.227,-0.03,0.445,71 | |
| Features,CART,0.068,-0.195,0.337,71 | |
| Features,CD-PFN,-0.137,-0.367,0.088,71 | |
| Features,CPI,-0.144,-0.365,0.099,71 | |
| Features,ElasticNet,0.466,0.284,0.597,71 | |
| Features,F-Test,0.129,-0.116,0.351,71 | |
| Features,GainRatio,0.079,-0.181,0.325,71 | |
| Features,LGBMGain,0.259,0.025,0.483,71 | |
| Features,LOCO,-0.507,-0.659,-0.306,71 | |
| Features,LaplacianScore,-0.173,-0.411,0.071,71 | |
| Features,Lasso,0.421,0.228,0.582,71 | |
| Features,LassoNet,0.292,0.064,0.498,71 | |
| Features,MI,-0.068,-0.309,0.164,71 | |
| Features,MarkovBlanket,0.068,-0.153,0.275,71 | |
| Features,PACE-DC,-0.064,-0.276,0.15,71 | |
| Features,PACE-HSIC,-0.007,-0.227,0.214,71 | |
| Features,PACE-SIS,0.004,-0.197,0.22,71 | |
| Features,RFImportance,0.399,0.199,0.58,71 | |
| Features,Random,-0.072,-0.275,0.162,71 | |
| Features,SBE,-0.658,-0.755,-0.52,71 | |
| Features,SFS,-0.248,-0.434,-0.014,71 | |
| Features,SHAP,-0.082,-0.309,0.172,71 | |
| Features,mRMR,0.171,-0.079,0.425,71 | |
| Samples per feature,(R)ReliefF,-0.282,-0.503,-0.04,71 | |
| Samples per feature,CART,0.175,-0.07,0.42,71 | |
| Samples per feature,CD-PFN,0.061,-0.165,0.299,71 | |
| Samples per feature,CPI,0.18,-0.066,0.411,71 | |
| Samples per feature,ElasticNet,-0.073,-0.285,0.182,71 | |
| Samples per feature,F-Test,-0.163,-0.408,0.091,71 | |
| Samples per feature,GainRatio,-0.23,-0.444,0.02,71 | |
| Samples per feature,LGBMGain,0.243,0.045,0.445,71 | |
| Samples per feature,LOCO,0.479,0.257,0.649,71 | |
| Samples per feature,LaplacianScore,-0.191,-0.429,0.061,71 | |
| Samples per feature,Lasso,-0.094,-0.309,0.128,71 | |
| Samples per feature,LassoNet,0.035,-0.198,0.272,71 | |
| Samples per feature,MI,-0.179,-0.385,0.044,71 | |
| Samples per feature,MarkovBlanket,-0.006,-0.23,0.22,71 | |
| Samples per feature,PACE-DC,-0.281,-0.49,-0.056,71 | |
| Samples per feature,PACE-HSIC,-0.225,-0.433,-0.003,71 | |
| Samples per feature,PACE-SIS,-0.286,-0.476,-0.077,71 | |
| Samples per feature,RFImportance,-0.209,-0.42,0.021,71 | |
| Samples per feature,Random,-0.25,-0.443,-0.036,71 | |
| Samples per feature,SBE,0.424,0.169,0.622,71 | |
| Samples per feature,SFS,0.254,0.032,0.473,71 | |
| Samples per feature,SHAP,0.456,0.254,0.627,71 | |
| Samples per feature,mRMR,-0.3,-0.508,-0.05,71 | |
| </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> | |