-
-
Notifications
You must be signed in to change notification settings - Fork 7.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
<!--more-->
divider behaves differently for html and markdown content
#9413
Comments
Can you maybe add a sample of your code? The https://gohugo.io/content-management/summaries/#summary-selection-order |
sure, this is the file (two summaries to get one in the end), and this is the result: https://www.unassuming.page/blog/tools/bayes-helper/ (not pretty but it was my first attempt at interactivity 🤷 ) ---
title: Bayes Helper
date: "2022-01-22"
tags: [maths, tools, health]
---
If you use a test with 95% sensitivity and 95% specificity, and it is positive
then you are surly more likely sick than not, right? Well, ... it depends.
On the prior probability to be sick (or incidence rate) to be precise. And
humans are really bad assessing the meaning of a test result.
<!--more-->
If you use a test with 95% sensitivity and 95% specificity, and it is positive
then you are surly more likely sick than not, right? Well, ... it depends.
On the prior probability to be sick (or incidence rate) to be precise. And
humans are really bad assessing the meaning of a test result.
Here is a bayes calculator to make this easer:
<form id="bayes-form">
<label for="incidence">Incidence Rate</label>
<input type="number", id="incidence", name="incidence", min="0", max="100000", step="1", placeholder="per 100 000", required>
<br>
<label for="sensitivity">Sensitivity</label>
<input type="number", id="sensitivity", name="sensitivity", min="0", max="100", step=".01", placeholder="in percent", required>
<br>
<label for="specificity">Specificity</label>
<input type="number", id="specificity", name="specificity", min="0", max="100", step=".01", placeholder="in percent", required>
<br>
<label for="test_positive">Test positive?</label>
<input type="checkbox", id="test_positive", name="test_positive">
<br>
<label for="posterior" >Likelihood to be infected:</label>
<output id="posterior" name="posterior">Input not Valid</output>
</form>
<script>
function _calculatePosterior(prior, sensitivity, specificity, test_positive) {
const p_test_given_pos = test_positive ? sensitivity : 1-sensitivity
if (prior==0 || p_test_given_pos == 0){
return 0
}
const p_test_given_neg = test_positive ? 1-specificity : specificity
return 1/(1+ p_test_given_neg*(1-prior)/(p_test_given_pos*prior))
}
function calculatePosterior() {
this.posterior.value = _calculatePosterior(
this.incidence.value/100000.0,
this.sensitivity.value/100.0,
this.specificity.value/100.0,
this.test_positive.checked
) *100 + "%";
}
document.getElementById("bayes-form").oninput = calculatePosterior
function add_wasModified() {
this.classList.add("wasModified");
}
for (const input of document.getElementsByTagName("input")) {
input.oninput = add_wasModified;
}
</script> |
I am looking into issue #6513, and I'm pretty sure these two issues have the same cause. I should have a PR up this weekend. |
This is a duplicate of #6686. |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
I tried to write my first html content page today and realized that the content above
<!--more-->
is removed from the page. It is only displayed in the article list. This is not how the divider works for Markdown content where the content before<!--more-->
is retained in the article as well. So I think this is a bug. Although it might be a bug of the theme (https://github.com/dsrkafuu/hugo-theme-fuji/)What version of Hugo are you using (
hugo version
)?The text was updated successfully, but these errors were encountered: