Threshold of `false` seems confusing
See original GitHub issueIs threshold
option being false
means never compress no matter response size, or default threshold of 1 KiB, or something else?
// will compress any size
app.use(compression({threshold: 0}))
// returns JSON as plain text
app.use(compression({threshold: false}))
Makes sense to me that above two lines should be equivalent, but doesn’t seem to be the case. Should either change this, or add more detailed description into README.
❤️ to everyone working on this 😊
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (1 by maintainers)
Top Results From Across the Web
Discrimination threshold false positive & negative - Kaggle
The confusion matrix goes into a little more detail; this time it provides us with four values: The number of times our classifier...
Read more >Demystifying ROC Curves. How to interpret and when to use…
The ROC curve shows a trade-off between TPR and FPR (or false negatives and false positives). It plots TPR vs FPR at different...
Read more >A Gentle Introduction to Threshold-Moving for Imbalanced ...
Firstly, the true positive rate is called the Sensitivity. The inverse of the false-positive rate is called the Specificity.
Read more >Manipulating class weights and decision threshold - Medium
It seems logical because y=0 entries have greater influence over the ... From the confusion matrix, the false negative and true positive ...
Read more >Overcoming the effects of false positives and threshold bias in ...
False positives (FPs) have profound effects on graph theoretical (GT) analysis. ... However, the thresholds at which the group differences appear ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi @elmigranto sorry you were having trouble using the module. At first when I read your issue I was confused because I didn’t even know that
false
was a value allowed for thethreshold
option at all. I looked at it was indeed listed in the docs as a value, though when I checked in the tests there is no tests for such a value.The implementation clearly does not support the value, as you observed.
I took a look back at the history of this project, various points in time of the implementation show that
false
has never been a supported value and looking at how it got added in the readme, it looks like a mistake that it got there at all.I’m going to fix the readme for the time being.
I never thought about
false
being a possible value, but I think that makes sense I suppose. If you are interested in seeingfalse
be a supported value, you’re welcome to make a pull request to support it, of course 👍0
does the trick for me, so I think simply dropping that bit from the docs is just fine. Thanks, Doug.