Two-dimensional principal component analysis via covariance and power iteration.
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]
- Projection — reduce 2D points to one axis that preserves most variance.
- Data compression — compute the leading component for a plotting transform.
- Signal processing — find the dominant direction in paired sensor readings.
Download pca.exe from the Releases page, then:
Get-Content data.csv | .\pca.exe
# or
.\pca.exe -f data.csvThe executable is a native Windows binary — no Python, no installer, no DLLs.
go test ./...
go build -o pca.exe .{
"vx": 0.7071,
"vy": 0.7071,
"explained_variance": 1
}
CSV with x,y points, one per row.
main_test.go covers the core algorithm with deterministic cases. Run go test ./....
MIT © S M Nazmuz Sakib (2026). Questions: [email protected].
