Skip to content

general_stat()/sample_count_stat() and f(0)=0 requirement #1188

Answered by petrelharp
grahamgower asked this question in Q&A
Discussion options

You must be logged in to vote

Hm, ok: this is a documentation bug, for sure. Let's see:

What if the docs said:

The summary function `f` should return zero (i.e., an array of zeros of appropriate length)
when given either zero or the sample size: i.e., both `f([0 for _ in sample_sets])` and `f([len(x) for x in sample_sets])`
should return zero.

I'm curious why this requirement exists, but this isn't automatically done for the user? Instead of strict=True checking for this behaviour, why doesn't it just implement this behaviour?

The requirement exists because statistics with this requirement are insensitive to parts of the tree that are not segregating between any of the samples. So, if you've got a summary funciton …

Replies: 1 comment 11 replies

Comment options

You must be logged in to vote
11 replies
@petrelharp
Comment options

@petrelharp
Comment options

@grahamgower
Comment options

grahamgower Feb 5, 2021
Collaborator Author

@grahamgower
Comment options

grahamgower Feb 5, 2021
Collaborator Author

@jeromekelleher
Comment options

Answer selected by grahamgower
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants