Mercurial > repos > goeckslab > pycaret_predict
annotate feature_help_modal.py @ 12:e674b9e946fb draft default tip
planemo upload for repository https://github.com/goeckslab/gleam commit 1594d503179f28987720594eb49b48a15486f073
| author | goeckslab | 
|---|---|
| date | Mon, 08 Sep 2025 22:39:12 +0000 | 
| parents | 1aed7d47c5ec | 
| children | 
| rev | line source | 
|---|---|
| 6 
a32ff7201629
planemo upload for repository https://github.com/goeckslab/gleam commit 06c0da44ac93256dfb616a6b40276b5485a71e8e
 goeckslab parents: diff
changeset | 1 def get_feature_metrics_help_modal() -> str: | 
| 
a32ff7201629
planemo upload for repository https://github.com/goeckslab/gleam commit 06c0da44ac93256dfb616a6b40276b5485a71e8e
 goeckslab parents: diff
changeset | 2 modal_html = """ | 
| 8 
1aed7d47c5ec
planemo upload for repository https://github.com/goeckslab/gleam commit 8112548ac44b7a4769093d76c722c8fcdeaaef54
 goeckslab parents: 
6diff
changeset | 3 <div id="metricsHelpModal" class="modal"> | 
| 6 
a32ff7201629
planemo upload for repository https://github.com/goeckslab/gleam commit 06c0da44ac93256dfb616a6b40276b5485a71e8e
 goeckslab parents: diff
changeset | 4 <div class="modal-content"> | 
| 8 
1aed7d47c5ec
planemo upload for repository https://github.com/goeckslab/gleam commit 8112548ac44b7a4769093d76c722c8fcdeaaef54
 goeckslab parents: 
6diff
changeset | 5 <span class="close">×</span> | 
| 6 
a32ff7201629
planemo upload for repository https://github.com/goeckslab/gleam commit 06c0da44ac93256dfb616a6b40276b5485a71e8e
 goeckslab parents: diff
changeset | 6 <h2>Help Guide: Common Model Metrics</h2> | 
| 8 
1aed7d47c5ec
planemo upload for repository https://github.com/goeckslab/gleam commit 8112548ac44b7a4769093d76c722c8fcdeaaef54
 goeckslab parents: 
6diff
changeset | 7 <div class="metrics-guide"> | 
| 
1aed7d47c5ec
planemo upload for repository https://github.com/goeckslab/gleam commit 8112548ac44b7a4769093d76c722c8fcdeaaef54
 goeckslab parents: 
6diff
changeset | 8 | 
| 
1aed7d47c5ec
planemo upload for repository https://github.com/goeckslab/gleam commit 8112548ac44b7a4769093d76c722c8fcdeaaef54
 goeckslab parents: 
6diff
changeset | 9 <!-- Classification Metrics --> | 
| 
1aed7d47c5ec
planemo upload for repository https://github.com/goeckslab/gleam commit 8112548ac44b7a4769093d76c722c8fcdeaaef54
 goeckslab parents: 
6diff
changeset | 10 <h3>1) Classification Metrics</h3> | 
| 
1aed7d47c5ec
planemo upload for repository https://github.com/goeckslab/gleam commit 8112548ac44b7a4769093d76c722c8fcdeaaef54
 goeckslab parents: 
6diff
changeset | 11 | 
| 
1aed7d47c5ec
planemo upload for repository https://github.com/goeckslab/gleam commit 8112548ac44b7a4769093d76c722c8fcdeaaef54
 goeckslab parents: 
6diff
changeset | 12 <p><strong>Accuracy:</strong> | 
| 
1aed7d47c5ec
planemo upload for repository https://github.com/goeckslab/gleam commit 8112548ac44b7a4769093d76c722c8fcdeaaef54
 goeckslab parents: 
6diff
changeset | 13 The proportion of correct predictions over all predictions:<br> | 
| 
1aed7d47c5ec
planemo upload for repository https://github.com/goeckslab/gleam commit 8112548ac44b7a4769093d76c722c8fcdeaaef54
 goeckslab parents: 
6diff
changeset | 14 <code>(TP + TN) / (TP + TN + FP + FN)</code>. | 
| 
1aed7d47c5ec
planemo upload for repository https://github.com/goeckslab/gleam commit 8112548ac44b7a4769093d76c722c8fcdeaaef54
 goeckslab parents: 
6diff
changeset | 15 <em>Use when</em> classes are balanced and you want a single easy‐to‐interpret number.</p> | 
| 
1aed7d47c5ec
planemo upload for repository https://github.com/goeckslab/gleam commit 8112548ac44b7a4769093d76c722c8fcdeaaef54
 goeckslab parents: 
6diff
changeset | 16 | 
| 
1aed7d47c5ec
planemo upload for repository https://github.com/goeckslab/gleam commit 8112548ac44b7a4769093d76c722c8fcdeaaef54
 goeckslab parents: 
6diff
changeset | 17 <p><strong>Precision:</strong> | 
| 
1aed7d47c5ec
planemo upload for repository https://github.com/goeckslab/gleam commit 8112548ac44b7a4769093d76c722c8fcdeaaef54
 goeckslab parents: 
6diff
changeset | 18 The fraction of positive predictions that are actually positive:<br> | 
| 
1aed7d47c5ec
planemo upload for repository https://github.com/goeckslab/gleam commit 8112548ac44b7a4769093d76c722c8fcdeaaef54
 goeckslab parents: 
6diff
changeset | 19 <code>TP / (TP + FP)</code>. | 
| 
1aed7d47c5ec
planemo upload for repository https://github.com/goeckslab/gleam commit 8112548ac44b7a4769093d76c722c8fcdeaaef54
 goeckslab parents: 
6diff
changeset | 20 <em>Use when</em> false positives are costly (e.g. spam filter—better to miss some spam than flag good mail).</p> | 
| 6 
a32ff7201629
planemo upload for repository https://github.com/goeckslab/gleam commit 06c0da44ac93256dfb616a6b40276b5485a71e8e
 goeckslab parents: diff
changeset | 21 | 
| 8 
1aed7d47c5ec
planemo upload for repository https://github.com/goeckslab/gleam commit 8112548ac44b7a4769093d76c722c8fcdeaaef54
 goeckslab parents: 
6diff
changeset | 22 <p><strong>Recall (Sensitivity):</strong> | 
| 
1aed7d47c5ec
planemo upload for repository https://github.com/goeckslab/gleam commit 8112548ac44b7a4769093d76c722c8fcdeaaef54
 goeckslab parents: 
6diff
changeset | 23 The fraction of actual positives correctly identified:<br> | 
| 
1aed7d47c5ec
planemo upload for repository https://github.com/goeckslab/gleam commit 8112548ac44b7a4769093d76c722c8fcdeaaef54
 goeckslab parents: 
6diff
changeset | 24 <code>TP / (TP + FN)</code> | 
| 
1aed7d47c5ec
planemo upload for repository https://github.com/goeckslab/gleam commit 8112548ac44b7a4769093d76c722c8fcdeaaef54
 goeckslab parents: 
6diff
changeset | 25 <em>Use when</em> false negatives are costly (e.g. disease screening—don’t miss sick patients).</p> | 
| 
1aed7d47c5ec
planemo upload for repository https://github.com/goeckslab/gleam commit 8112548ac44b7a4769093d76c722c8fcdeaaef54
 goeckslab parents: 
6diff
changeset | 26 | 
| 
1aed7d47c5ec
planemo upload for repository https://github.com/goeckslab/gleam commit 8112548ac44b7a4769093d76c722c8fcdeaaef54
 goeckslab parents: 
6diff
changeset | 27 <p><strong>F1 Score:</strong> | 
| 
1aed7d47c5ec
planemo upload for repository https://github.com/goeckslab/gleam commit 8112548ac44b7a4769093d76c722c8fcdeaaef54
 goeckslab parents: 
6diff
changeset | 28 The harmonic mean of Precision and Recall:<br> | 
| 
1aed7d47c5ec
planemo upload for repository https://github.com/goeckslab/gleam commit 8112548ac44b7a4769093d76c722c8fcdeaaef54
 goeckslab parents: 
6diff
changeset | 29 <code>2·(Precision·Recall)/(Precision+Recall)</code> | 
| 
1aed7d47c5ec
planemo upload for repository https://github.com/goeckslab/gleam commit 8112548ac44b7a4769093d76c722c8fcdeaaef54
 goeckslab parents: 
6diff
changeset | 30 <em>Use when</em> you need a balance between Precision & Recall on an imbalanced dataset.</p> | 
| 
1aed7d47c5ec
planemo upload for repository https://github.com/goeckslab/gleam commit 8112548ac44b7a4769093d76c722c8fcdeaaef54
 goeckslab parents: 
6diff
changeset | 31 | 
| 
1aed7d47c5ec
planemo upload for repository https://github.com/goeckslab/gleam commit 8112548ac44b7a4769093d76c722c8fcdeaaef54
 goeckslab parents: 
6diff
changeset | 32 <p><strong>ROC-AUC (Area Under ROC Curve):</strong> | 
| 
1aed7d47c5ec
planemo upload for repository https://github.com/goeckslab/gleam commit 8112548ac44b7a4769093d76c722c8fcdeaaef54
 goeckslab parents: 
6diff
changeset | 33 Measures ability to distinguish classes across all thresholds. | 
| 
1aed7d47c5ec
planemo upload for repository https://github.com/goeckslab/gleam commit 8112548ac44b7a4769093d76c722c8fcdeaaef54
 goeckslab parents: 
6diff
changeset | 34 Ranges from 0.5 (random) to 1 (perfect). | 
| 
1aed7d47c5ec
planemo upload for repository https://github.com/goeckslab/gleam commit 8112548ac44b7a4769093d76c722c8fcdeaaef54
 goeckslab parents: 
6diff
changeset | 35 <em>Use when</em> you care about ranking positives above negatives.</p> | 
| 
1aed7d47c5ec
planemo upload for repository https://github.com/goeckslab/gleam commit 8112548ac44b7a4769093d76c722c8fcdeaaef54
 goeckslab parents: 
6diff
changeset | 36 | 
| 
1aed7d47c5ec
planemo upload for repository https://github.com/goeckslab/gleam commit 8112548ac44b7a4769093d76c722c8fcdeaaef54
 goeckslab parents: 
6diff
changeset | 37 <p><strong>PR-AUC (Area Under Precision-Recall Curve):</strong> | 
| 
1aed7d47c5ec
planemo upload for repository https://github.com/goeckslab/gleam commit 8112548ac44b7a4769093d76c722c8fcdeaaef54
 goeckslab parents: 
6diff
changeset | 38 Summarizes Precision vs. Recall trade-off. | 
| 
1aed7d47c5ec
planemo upload for repository https://github.com/goeckslab/gleam commit 8112548ac44b7a4769093d76c722c8fcdeaaef54
 goeckslab parents: 
6diff
changeset | 39 More informative than ROC-AUC when positives are rare. | 
| 
1aed7d47c5ec
planemo upload for repository https://github.com/goeckslab/gleam commit 8112548ac44b7a4769093d76c722c8fcdeaaef54
 goeckslab parents: 
6diff
changeset | 40 <em>Use when</em> dealing with highly imbalanced data.</p> | 
| 6 
a32ff7201629
planemo upload for repository https://github.com/goeckslab/gleam commit 06c0da44ac93256dfb616a6b40276b5485a71e8e
 goeckslab parents: diff
changeset | 41 | 
| 8 
1aed7d47c5ec
planemo upload for repository https://github.com/goeckslab/gleam commit 8112548ac44b7a4769093d76c722c8fcdeaaef54
 goeckslab parents: 
6diff
changeset | 42 <p><strong>Log Loss:</strong> | 
| 
1aed7d47c5ec
planemo upload for repository https://github.com/goeckslab/gleam commit 8112548ac44b7a4769093d76c722c8fcdeaaef54
 goeckslab parents: 
6diff
changeset | 43 Penalizes confident wrong predictions via negative log-likelihood. | 
| 
1aed7d47c5ec
planemo upload for repository https://github.com/goeckslab/gleam commit 8112548ac44b7a4769093d76c722c8fcdeaaef54
 goeckslab parents: 
6diff
changeset | 44 Lower is better. | 
| 
1aed7d47c5ec
planemo upload for repository https://github.com/goeckslab/gleam commit 8112548ac44b7a4769093d76c722c8fcdeaaef54
 goeckslab parents: 
6diff
changeset | 45 <em>Use when</em> you need well-calibrated probability estimates.</p> | 
| 
1aed7d47c5ec
planemo upload for repository https://github.com/goeckslab/gleam commit 8112548ac44b7a4769093d76c722c8fcdeaaef54
 goeckslab parents: 
6diff
changeset | 46 | 
| 
1aed7d47c5ec
planemo upload for repository https://github.com/goeckslab/gleam commit 8112548ac44b7a4769093d76c722c8fcdeaaef54
 goeckslab parents: 
6diff
changeset | 47 <p><strong>Cohen’s Kappa:</strong> | 
| 
1aed7d47c5ec
planemo upload for repository https://github.com/goeckslab/gleam commit 8112548ac44b7a4769093d76c722c8fcdeaaef54
 goeckslab parents: 
6diff
changeset | 48 Measures agreement between predictions and true labels accounting for chance. | 
| 
1aed7d47c5ec
planemo upload for repository https://github.com/goeckslab/gleam commit 8112548ac44b7a4769093d76c722c8fcdeaaef54
 goeckslab parents: 
6diff
changeset | 49 1 is perfect, 0 is random. | 
| 
1aed7d47c5ec
planemo upload for repository https://github.com/goeckslab/gleam commit 8112548ac44b7a4769093d76c722c8fcdeaaef54
 goeckslab parents: 
6diff
changeset | 50 <em>Use when</em> you want to factor out chance agreement.</p> | 
| 6 
a32ff7201629
planemo upload for repository https://github.com/goeckslab/gleam commit 06c0da44ac93256dfb616a6b40276b5485a71e8e
 goeckslab parents: diff
changeset | 51 | 
| 8 
1aed7d47c5ec
planemo upload for repository https://github.com/goeckslab/gleam commit 8112548ac44b7a4769093d76c722c8fcdeaaef54
 goeckslab parents: 
6diff
changeset | 52 <hr> | 
| 
1aed7d47c5ec
planemo upload for repository https://github.com/goeckslab/gleam commit 8112548ac44b7a4769093d76c722c8fcdeaaef54
 goeckslab parents: 
6diff
changeset | 53 | 
| 
1aed7d47c5ec
planemo upload for repository https://github.com/goeckslab/gleam commit 8112548ac44b7a4769093d76c722c8fcdeaaef54
 goeckslab parents: 
6diff
changeset | 54 <!-- Regression Metrics --> | 
| 
1aed7d47c5ec
planemo upload for repository https://github.com/goeckslab/gleam commit 8112548ac44b7a4769093d76c722c8fcdeaaef54
 goeckslab parents: 
6diff
changeset | 55 <h3>2) Regression Metrics</h3> | 
| 
1aed7d47c5ec
planemo upload for repository https://github.com/goeckslab/gleam commit 8112548ac44b7a4769093d76c722c8fcdeaaef54
 goeckslab parents: 
6diff
changeset | 56 | 
| 
1aed7d47c5ec
planemo upload for repository https://github.com/goeckslab/gleam commit 8112548ac44b7a4769093d76c722c8fcdeaaef54
 goeckslab parents: 
6diff
changeset | 57 <p><strong>R² (Coefficient of Determination):</strong> | 
| 
1aed7d47c5ec
planemo upload for repository https://github.com/goeckslab/gleam commit 8112548ac44b7a4769093d76c722c8fcdeaaef54
 goeckslab parents: 
6diff
changeset | 58 Proportion of variance in the target explained by features:<br> | 
| 
1aed7d47c5ec
planemo upload for repository https://github.com/goeckslab/gleam commit 8112548ac44b7a4769093d76c722c8fcdeaaef54
 goeckslab parents: 
6diff
changeset | 59 1 is perfect, 0 means no better than predicting the mean, negative is worse than mean. | 
| 
1aed7d47c5ec
planemo upload for repository https://github.com/goeckslab/gleam commit 8112548ac44b7a4769093d76c722c8fcdeaaef54
 goeckslab parents: 
6diff
changeset | 60 <em>Use when</em> you want a normalized measure of fit.</p> | 
| 6 
a32ff7201629
planemo upload for repository https://github.com/goeckslab/gleam commit 06c0da44ac93256dfb616a6b40276b5485a71e8e
 goeckslab parents: diff
changeset | 61 | 
| 8 
1aed7d47c5ec
planemo upload for repository https://github.com/goeckslab/gleam commit 8112548ac44b7a4769093d76c722c8fcdeaaef54
 goeckslab parents: 
6diff
changeset | 62 <p><strong>MAE (Mean Absolute Error):</strong> | 
| 
1aed7d47c5ec
planemo upload for repository https://github.com/goeckslab/gleam commit 8112548ac44b7a4769093d76c722c8fcdeaaef54
 goeckslab parents: 
6diff
changeset | 63 Average absolute difference between predictions and actual values:<br> | 
| 
1aed7d47c5ec
planemo upload for repository https://github.com/goeckslab/gleam commit 8112548ac44b7a4769093d76c722c8fcdeaaef54
 goeckslab parents: 
6diff
changeset | 64 <code>mean(|y_pred − y_true|)</code> | 
| 
1aed7d47c5ec
planemo upload for repository https://github.com/goeckslab/gleam commit 8112548ac44b7a4769093d76c722c8fcdeaaef54
 goeckslab parents: 
6diff
changeset | 65 <em>Use when</em> you need an interpretable “average” error and want to downweight outliers.</p> | 
| 
1aed7d47c5ec
planemo upload for repository https://github.com/goeckslab/gleam commit 8112548ac44b7a4769093d76c722c8fcdeaaef54
 goeckslab parents: 
6diff
changeset | 66 | 
| 
1aed7d47c5ec
planemo upload for repository https://github.com/goeckslab/gleam commit 8112548ac44b7a4769093d76c722c8fcdeaaef54
 goeckslab parents: 
6diff
changeset | 67 <p><strong>RMSE (Root Mean Squared Error):</strong> | 
| 
1aed7d47c5ec
planemo upload for repository https://github.com/goeckslab/gleam commit 8112548ac44b7a4769093d76c722c8fcdeaaef54
 goeckslab parents: 
6diff
changeset | 68 Square root of the average squared errors:<br> | 
| 
1aed7d47c5ec
planemo upload for repository https://github.com/goeckslab/gleam commit 8112548ac44b7a4769093d76c722c8fcdeaaef54
 goeckslab parents: 
6diff
changeset | 69 <code>√mean((y_pred − y_true)²)</code>. | 
| 
1aed7d47c5ec
planemo upload for repository https://github.com/goeckslab/gleam commit 8112548ac44b7a4769093d76c722c8fcdeaaef54
 goeckslab parents: 
6diff
changeset | 70 Penalizes large errors more heavily. | 
| 
1aed7d47c5ec
planemo upload for repository https://github.com/goeckslab/gleam commit 8112548ac44b7a4769093d76c722c8fcdeaaef54
 goeckslab parents: 
6diff
changeset | 71 <em>Use when</em> large deviations are especially undesirable.</p> | 
| 6 
a32ff7201629
planemo upload for repository https://github.com/goeckslab/gleam commit 06c0da44ac93256dfb616a6b40276b5485a71e8e
 goeckslab parents: diff
changeset | 72 | 
| 8 
1aed7d47c5ec
planemo upload for repository https://github.com/goeckslab/gleam commit 8112548ac44b7a4769093d76c722c8fcdeaaef54
 goeckslab parents: 
6diff
changeset | 73 <p><strong>MSE (Mean Squared Error):</strong> | 
| 
1aed7d47c5ec
planemo upload for repository https://github.com/goeckslab/gleam commit 8112548ac44b7a4769093d76c722c8fcdeaaef54
 goeckslab parents: 
6diff
changeset | 74 The average squared error:<br> | 
| 
1aed7d47c5ec
planemo upload for repository https://github.com/goeckslab/gleam commit 8112548ac44b7a4769093d76c722c8fcdeaaef54
 goeckslab parents: 
6diff
changeset | 75 <code>mean((y_pred − y_true)²)</code>. | 
| 
1aed7d47c5ec
planemo upload for repository https://github.com/goeckslab/gleam commit 8112548ac44b7a4769093d76c722c8fcdeaaef54
 goeckslab parents: 
6diff
changeset | 76 Similar to RMSE but in squared units; often used in optimization.</p> | 
| 6 
a32ff7201629
planemo upload for repository https://github.com/goeckslab/gleam commit 06c0da44ac93256dfb616a6b40276b5485a71e8e
 goeckslab parents: diff
changeset | 77 | 
| 8 
1aed7d47c5ec
planemo upload for repository https://github.com/goeckslab/gleam commit 8112548ac44b7a4769093d76c722c8fcdeaaef54
 goeckslab parents: 
6diff
changeset | 78 <p><strong>RMSLE (Root Mean Squared Log Error):</strong> | 
| 
1aed7d47c5ec
planemo upload for repository https://github.com/goeckslab/gleam commit 8112548ac44b7a4769093d76c722c8fcdeaaef54
 goeckslab parents: 
6diff
changeset | 79 <code>√mean((log(1+y_pred) − log(1+y_true))²)</code>. | 
| 
1aed7d47c5ec
planemo upload for repository https://github.com/goeckslab/gleam commit 8112548ac44b7a4769093d76c722c8fcdeaaef54
 goeckslab parents: 
6diff
changeset | 80 Less sensitive to large differences when both true and predicted are large. | 
| 
1aed7d47c5ec
planemo upload for repository https://github.com/goeckslab/gleam commit 8112548ac44b7a4769093d76c722c8fcdeaaef54
 goeckslab parents: 
6diff
changeset | 81 <em>Use when</em> target spans several orders of magnitude.</p> | 
| 
1aed7d47c5ec
planemo upload for repository https://github.com/goeckslab/gleam commit 8112548ac44b7a4769093d76c722c8fcdeaaef54
 goeckslab parents: 
6diff
changeset | 82 | 
| 
1aed7d47c5ec
planemo upload for repository https://github.com/goeckslab/gleam commit 8112548ac44b7a4769093d76c722c8fcdeaaef54
 goeckslab parents: 
6diff
changeset | 83 <p><strong>MAPE (Mean Absolute Percentage Error):</strong> | 
| 
1aed7d47c5ec
planemo upload for repository https://github.com/goeckslab/gleam commit 8112548ac44b7a4769093d76c722c8fcdeaaef54
 goeckslab parents: 
6diff
changeset | 84 <code>mean(|(y_true − y_pred)/y_true|)·100</code>. | 
| 
1aed7d47c5ec
planemo upload for repository https://github.com/goeckslab/gleam commit 8112548ac44b7a4769093d76c722c8fcdeaaef54
 goeckslab parents: 
6diff
changeset | 85 Expresses error as a percentage. | 
| 
1aed7d47c5ec
planemo upload for repository https://github.com/goeckslab/gleam commit 8112548ac44b7a4769093d76c722c8fcdeaaef54
 goeckslab parents: 
6diff
changeset | 86 <em>Use when</em> relative error matters—but avoid if y_true≈0.</p> | 
| 
1aed7d47c5ec
planemo upload for repository https://github.com/goeckslab/gleam commit 8112548ac44b7a4769093d76c722c8fcdeaaef54
 goeckslab parents: 
6diff
changeset | 87 | 
| 6 
a32ff7201629
planemo upload for repository https://github.com/goeckslab/gleam commit 06c0da44ac93256dfb616a6b40276b5485a71e8e
 goeckslab parents: diff
changeset | 88 </div> | 
| 
a32ff7201629
planemo upload for repository https://github.com/goeckslab/gleam commit 06c0da44ac93256dfb616a6b40276b5485a71e8e
 goeckslab parents: diff
changeset | 89 </div> | 
| 
a32ff7201629
planemo upload for repository https://github.com/goeckslab/gleam commit 06c0da44ac93256dfb616a6b40276b5485a71e8e
 goeckslab parents: diff
changeset | 90 </div> | 
| 
a32ff7201629
planemo upload for repository https://github.com/goeckslab/gleam commit 06c0da44ac93256dfb616a6b40276b5485a71e8e
 goeckslab parents: diff
changeset | 91 """ | 
| 8 
1aed7d47c5ec
planemo upload for repository https://github.com/goeckslab/gleam commit 8112548ac44b7a4769093d76c722c8fcdeaaef54
 goeckslab parents: 
6diff
changeset | 92 | 
| 6 
a32ff7201629
planemo upload for repository https://github.com/goeckslab/gleam commit 06c0da44ac93256dfb616a6b40276b5485a71e8e
 goeckslab parents: diff
changeset | 93 modal_css = """ | 
| 
a32ff7201629
planemo upload for repository https://github.com/goeckslab/gleam commit 06c0da44ac93256dfb616a6b40276b5485a71e8e
 goeckslab parents: diff
changeset | 94 <style> | 
| 8 
1aed7d47c5ec
planemo upload for repository https://github.com/goeckslab/gleam commit 8112548ac44b7a4769093d76c722c8fcdeaaef54
 goeckslab parents: 
6diff
changeset | 95 .modal { | 
| 6 
a32ff7201629
planemo upload for repository https://github.com/goeckslab/gleam commit 06c0da44ac93256dfb616a6b40276b5485a71e8e
 goeckslab parents: diff
changeset | 96 display: none; | 
| 
a32ff7201629
planemo upload for repository https://github.com/goeckslab/gleam commit 06c0da44ac93256dfb616a6b40276b5485a71e8e
 goeckslab parents: diff
changeset | 97 position: fixed; | 
| 8 
1aed7d47c5ec
planemo upload for repository https://github.com/goeckslab/gleam commit 8112548ac44b7a4769093d76c722c8fcdeaaef54
 goeckslab parents: 
6diff
changeset | 98 z-index: 1; | 
| 
1aed7d47c5ec
planemo upload for repository https://github.com/goeckslab/gleam commit 8112548ac44b7a4769093d76c722c8fcdeaaef54
 goeckslab parents: 
6diff
changeset | 99 left: 0; | 
| 
1aed7d47c5ec
planemo upload for repository https://github.com/goeckslab/gleam commit 8112548ac44b7a4769093d76c722c8fcdeaaef54
 goeckslab parents: 
6diff
changeset | 100 top: 0; | 
| 
1aed7d47c5ec
planemo upload for repository https://github.com/goeckslab/gleam commit 8112548ac44b7a4769093d76c722c8fcdeaaef54
 goeckslab parents: 
6diff
changeset | 101 width: 100%; | 
| 
1aed7d47c5ec
planemo upload for repository https://github.com/goeckslab/gleam commit 8112548ac44b7a4769093d76c722c8fcdeaaef54
 goeckslab parents: 
6diff
changeset | 102 height: 100%; | 
| 6 
a32ff7201629
planemo upload for repository https://github.com/goeckslab/gleam commit 06c0da44ac93256dfb616a6b40276b5485a71e8e
 goeckslab parents: diff
changeset | 103 overflow: auto; | 
| 8 
1aed7d47c5ec
planemo upload for repository https://github.com/goeckslab/gleam commit 8112548ac44b7a4769093d76c722c8fcdeaaef54
 goeckslab parents: 
6diff
changeset | 104 background-color: rgba(0,0,0,0.4); | 
| 6 
a32ff7201629
planemo upload for repository https://github.com/goeckslab/gleam commit 06c0da44ac93256dfb616a6b40276b5485a71e8e
 goeckslab parents: diff
changeset | 105 } | 
| 8 
1aed7d47c5ec
planemo upload for repository https://github.com/goeckslab/gleam commit 8112548ac44b7a4769093d76c722c8fcdeaaef54
 goeckslab parents: 
6diff
changeset | 106 .modal-content { | 
| 6 
a32ff7201629
planemo upload for repository https://github.com/goeckslab/gleam commit 06c0da44ac93256dfb616a6b40276b5485a71e8e
 goeckslab parents: diff
changeset | 107 background-color: #fefefe; | 
| 8 
1aed7d47c5ec
planemo upload for repository https://github.com/goeckslab/gleam commit 8112548ac44b7a4769093d76c722c8fcdeaaef54
 goeckslab parents: 
6diff
changeset | 108 margin: 15% auto; | 
| 
1aed7d47c5ec
planemo upload for repository https://github.com/goeckslab/gleam commit 8112548ac44b7a4769093d76c722c8fcdeaaef54
 goeckslab parents: 
6diff
changeset | 109 padding: 20px; | 
| 
1aed7d47c5ec
planemo upload for repository https://github.com/goeckslab/gleam commit 8112548ac44b7a4769093d76c722c8fcdeaaef54
 goeckslab parents: 
6diff
changeset | 110 border: 1px solid #888; | 
| 
1aed7d47c5ec
planemo upload for repository https://github.com/goeckslab/gleam commit 8112548ac44b7a4769093d76c722c8fcdeaaef54
 goeckslab parents: 
6diff
changeset | 111 width: 80%; | 
| 6 
a32ff7201629
planemo upload for repository https://github.com/goeckslab/gleam commit 06c0da44ac93256dfb616a6b40276b5485a71e8e
 goeckslab parents: diff
changeset | 112 max-width: 800px; | 
| 
a32ff7201629
planemo upload for repository https://github.com/goeckslab/gleam commit 06c0da44ac93256dfb616a6b40276b5485a71e8e
 goeckslab parents: diff
changeset | 113 } | 
| 8 
1aed7d47c5ec
planemo upload for repository https://github.com/goeckslab/gleam commit 8112548ac44b7a4769093d76c722c8fcdeaaef54
 goeckslab parents: 
6diff
changeset | 114 .close { | 
| 
1aed7d47c5ec
planemo upload for repository https://github.com/goeckslab/gleam commit 8112548ac44b7a4769093d76c722c8fcdeaaef54
 goeckslab parents: 
6diff
changeset | 115 color: #aaa; | 
| 6 
a32ff7201629
planemo upload for repository https://github.com/goeckslab/gleam commit 06c0da44ac93256dfb616a6b40276b5485a71e8e
 goeckslab parents: diff
changeset | 116 float: right; | 
| 
a32ff7201629
planemo upload for repository https://github.com/goeckslab/gleam commit 06c0da44ac93256dfb616a6b40276b5485a71e8e
 goeckslab parents: diff
changeset | 117 font-size: 28px; | 
| 
a32ff7201629
planemo upload for repository https://github.com/goeckslab/gleam commit 06c0da44ac93256dfb616a6b40276b5485a71e8e
 goeckslab parents: diff
changeset | 118 font-weight: bold; | 
| 8 
1aed7d47c5ec
planemo upload for repository https://github.com/goeckslab/gleam commit 8112548ac44b7a4769093d76c722c8fcdeaaef54
 goeckslab parents: 
6diff
changeset | 119 } | 
| 
1aed7d47c5ec
planemo upload for repository https://github.com/goeckslab/gleam commit 8112548ac44b7a4769093d76c722c8fcdeaaef54
 goeckslab parents: 
6diff
changeset | 120 .close:hover, | 
| 
1aed7d47c5ec
planemo upload for repository https://github.com/goeckslab/gleam commit 8112548ac44b7a4769093d76c722c8fcdeaaef54
 goeckslab parents: 
6diff
changeset | 121 .close:focus { | 
| 
1aed7d47c5ec
planemo upload for repository https://github.com/goeckslab/gleam commit 8112548ac44b7a4769093d76c722c8fcdeaaef54
 goeckslab parents: 
6diff
changeset | 122 color: black; | 
| 
1aed7d47c5ec
planemo upload for repository https://github.com/goeckslab/gleam commit 8112548ac44b7a4769093d76c722c8fcdeaaef54
 goeckslab parents: 
6diff
changeset | 123 text-decoration: none; | 
| 6 
a32ff7201629
planemo upload for repository https://github.com/goeckslab/gleam commit 06c0da44ac93256dfb616a6b40276b5485a71e8e
 goeckslab parents: diff
changeset | 124 cursor: pointer; | 
| 
a32ff7201629
planemo upload for repository https://github.com/goeckslab/gleam commit 06c0da44ac93256dfb616a6b40276b5485a71e8e
 goeckslab parents: diff
changeset | 125 } | 
| 8 
1aed7d47c5ec
planemo upload for repository https://github.com/goeckslab/gleam commit 8112548ac44b7a4769093d76c722c8fcdeaaef54
 goeckslab parents: 
6diff
changeset | 126 .metrics-guide h3 { | 
| 
1aed7d47c5ec
planemo upload for repository https://github.com/goeckslab/gleam commit 8112548ac44b7a4769093d76c722c8fcdeaaef54
 goeckslab parents: 
6diff
changeset | 127 margin-top: 20px; | 
| 6 
a32ff7201629
planemo upload for repository https://github.com/goeckslab/gleam commit 06c0da44ac93256dfb616a6b40276b5485a71e8e
 goeckslab parents: diff
changeset | 128 } | 
| 8 
1aed7d47c5ec
planemo upload for repository https://github.com/goeckslab/gleam commit 8112548ac44b7a4769093d76c722c8fcdeaaef54
 goeckslab parents: 
6diff
changeset | 129 .metrics-guide p { | 
| 
1aed7d47c5ec
planemo upload for repository https://github.com/goeckslab/gleam commit 8112548ac44b7a4769093d76c722c8fcdeaaef54
 goeckslab parents: 
6diff
changeset | 130 margin: 5px 0; | 
| 
1aed7d47c5ec
planemo upload for repository https://github.com/goeckslab/gleam commit 8112548ac44b7a4769093d76c722c8fcdeaaef54
 goeckslab parents: 
6diff
changeset | 131 } | 
| 
1aed7d47c5ec
planemo upload for repository https://github.com/goeckslab/gleam commit 8112548ac44b7a4769093d76c722c8fcdeaaef54
 goeckslab parents: 
6diff
changeset | 132 .metrics-guide ul { | 
| 
1aed7d47c5ec
planemo upload for repository https://github.com/goeckslab/gleam commit 8112548ac44b7a4769093d76c722c8fcdeaaef54
 goeckslab parents: 
6diff
changeset | 133 margin: 10px 0; | 
| 
1aed7d47c5ec
planemo upload for repository https://github.com/goeckslab/gleam commit 8112548ac44b7a4769093d76c722c8fcdeaaef54
 goeckslab parents: 
6diff
changeset | 134 padding-left: 20px; | 
| 
1aed7d47c5ec
planemo upload for repository https://github.com/goeckslab/gleam commit 8112548ac44b7a4769093d76c722c8fcdeaaef54
 goeckslab parents: 
6diff
changeset | 135 } | 
| 6 
a32ff7201629
planemo upload for repository https://github.com/goeckslab/gleam commit 06c0da44ac93256dfb616a6b40276b5485a71e8e
 goeckslab parents: diff
changeset | 136 </style> | 
| 
a32ff7201629
planemo upload for repository https://github.com/goeckslab/gleam commit 06c0da44ac93256dfb616a6b40276b5485a71e8e
 goeckslab parents: diff
changeset | 137 """ | 
| 
a32ff7201629
planemo upload for repository https://github.com/goeckslab/gleam commit 06c0da44ac93256dfb616a6b40276b5485a71e8e
 goeckslab parents: diff
changeset | 138 modal_js = """ | 
| 
a32ff7201629
planemo upload for repository https://github.com/goeckslab/gleam commit 06c0da44ac93256dfb616a6b40276b5485a71e8e
 goeckslab parents: diff
changeset | 139 <script> | 
| 
a32ff7201629
planemo upload for repository https://github.com/goeckslab/gleam commit 06c0da44ac93256dfb616a6b40276b5485a71e8e
 goeckslab parents: diff
changeset | 140 document.addEventListener("DOMContentLoaded", function() { | 
| 8 
1aed7d47c5ec
planemo upload for repository https://github.com/goeckslab/gleam commit 8112548ac44b7a4769093d76c722c8fcdeaaef54
 goeckslab parents: 
6diff
changeset | 141 var modal = document.getElementById("metricsHelpModal"); | 
| 
1aed7d47c5ec
planemo upload for repository https://github.com/goeckslab/gleam commit 8112548ac44b7a4769093d76c722c8fcdeaaef54
 goeckslab parents: 
6diff
changeset | 142 var openBtn = document.getElementById("openMetricsHelp"); | 
| 
1aed7d47c5ec
planemo upload for repository https://github.com/goeckslab/gleam commit 8112548ac44b7a4769093d76c722c8fcdeaaef54
 goeckslab parents: 
6diff
changeset | 143 var span = document.getElementsByClassName("close")[0]; | 
| 6 
a32ff7201629
planemo upload for repository https://github.com/goeckslab/gleam commit 06c0da44ac93256dfb616a6b40276b5485a71e8e
 goeckslab parents: diff
changeset | 144 if (openBtn && modal) { | 
| 
a32ff7201629
planemo upload for repository https://github.com/goeckslab/gleam commit 06c0da44ac93256dfb616a6b40276b5485a71e8e
 goeckslab parents: diff
changeset | 145 openBtn.onclick = function() { | 
| 
a32ff7201629
planemo upload for repository https://github.com/goeckslab/gleam commit 06c0da44ac93256dfb616a6b40276b5485a71e8e
 goeckslab parents: diff
changeset | 146 modal.style.display = "block"; | 
| 
a32ff7201629
planemo upload for repository https://github.com/goeckslab/gleam commit 06c0da44ac93256dfb616a6b40276b5485a71e8e
 goeckslab parents: diff
changeset | 147 }; | 
| 
a32ff7201629
planemo upload for repository https://github.com/goeckslab/gleam commit 06c0da44ac93256dfb616a6b40276b5485a71e8e
 goeckslab parents: diff
changeset | 148 } | 
| 
a32ff7201629
planemo upload for repository https://github.com/goeckslab/gleam commit 06c0da44ac93256dfb616a6b40276b5485a71e8e
 goeckslab parents: diff
changeset | 149 if (span && modal) { | 
| 
a32ff7201629
planemo upload for repository https://github.com/goeckslab/gleam commit 06c0da44ac93256dfb616a6b40276b5485a71e8e
 goeckslab parents: diff
changeset | 150 span.onclick = function() { | 
| 
a32ff7201629
planemo upload for repository https://github.com/goeckslab/gleam commit 06c0da44ac93256dfb616a6b40276b5485a71e8e
 goeckslab parents: diff
changeset | 151 modal.style.display = "none"; | 
| 
a32ff7201629
planemo upload for repository https://github.com/goeckslab/gleam commit 06c0da44ac93256dfb616a6b40276b5485a71e8e
 goeckslab parents: diff
changeset | 152 }; | 
| 
a32ff7201629
planemo upload for repository https://github.com/goeckslab/gleam commit 06c0da44ac93256dfb616a6b40276b5485a71e8e
 goeckslab parents: diff
changeset | 153 } | 
| 
a32ff7201629
planemo upload for repository https://github.com/goeckslab/gleam commit 06c0da44ac93256dfb616a6b40276b5485a71e8e
 goeckslab parents: diff
changeset | 154 window.onclick = function(event) { | 
| 
a32ff7201629
planemo upload for repository https://github.com/goeckslab/gleam commit 06c0da44ac93256dfb616a6b40276b5485a71e8e
 goeckslab parents: diff
changeset | 155 if (event.target == modal) { | 
| 
a32ff7201629
planemo upload for repository https://github.com/goeckslab/gleam commit 06c0da44ac93256dfb616a6b40276b5485a71e8e
 goeckslab parents: diff
changeset | 156 modal.style.display = "none"; | 
| 
a32ff7201629
planemo upload for repository https://github.com/goeckslab/gleam commit 06c0da44ac93256dfb616a6b40276b5485a71e8e
 goeckslab parents: diff
changeset | 157 } | 
| 
a32ff7201629
planemo upload for repository https://github.com/goeckslab/gleam commit 06c0da44ac93256dfb616a6b40276b5485a71e8e
 goeckslab parents: diff
changeset | 158 } | 
| 
a32ff7201629
planemo upload for repository https://github.com/goeckslab/gleam commit 06c0da44ac93256dfb616a6b40276b5485a71e8e
 goeckslab parents: diff
changeset | 159 }); | 
| 
a32ff7201629
planemo upload for repository https://github.com/goeckslab/gleam commit 06c0da44ac93256dfb616a6b40276b5485a71e8e
 goeckslab parents: diff
changeset | 160 </script> | 
| 
a32ff7201629
planemo upload for repository https://github.com/goeckslab/gleam commit 06c0da44ac93256dfb616a6b40276b5485a71e8e
 goeckslab parents: diff
changeset | 161 """ | 
| 
a32ff7201629
planemo upload for repository https://github.com/goeckslab/gleam commit 06c0da44ac93256dfb616a6b40276b5485a71e8e
 goeckslab parents: diff
changeset | 162 return modal_css + modal_html + modal_js | 
