Shannon entropy of categorical labels in bits, with normalized entropy.
Part of StatLab — twenty standalone statistical analysis tools for Windows, each shipped as a native executable with no runtime dependencies. Author: S M Nazmuz Sakib · [email protected]
- Feature analysis — measure impurity of a categorical column.
- Text diversity — compare vocabulary richness across documents.
- Decision trees — compute the splitting criterion before implementing ID3.
Download entropy.exe from the Releases page, then:
Get-Content data.csv | .\entropy.exe
# or
.\entropy.exe -f data.csvThe executable is a native Windows binary — no Python, no installer, no DLLs.
go test ./...
go build -o entropy.exe .{
"labels": 4,
"entropy_bits": 2,
"normalized": 1
}
One category label per line. Blank lines are ignored.
main_test.go covers the core algorithm with deterministic cases. Run go test ./....
MIT © S M Nazmuz Sakib (2026). Questions: [email protected].
