Created
June 24, 2024 21:38
-
-
Save quantra-go-algo/134f005e7732d3bc83356823c926be20 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Set the minimum number of trials as a threshold number to accept an input feature as a selected feature | |
def get_tail_items(pmf, significance_level=0.05): | |
# Set total to zero | |
total = 0 | |
# Create a loop based on the probability mass function | |
for i, x in enumerate(pmf): | |
# Increment the total variable with the probability “x” of i | |
total += x | |
# If total is higher than the significance level | |
if total >= significance_level: | |
# Break the code | |
break | |
# Return i | |
return i |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment