Skip to content

Implement a PCA-based dimensionality reduction codec #4

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ members = [
"codecs/identity",
"codecs/linear-quantize",
"codecs/log",
"codecs/pca",
"codecs/random-projection",
"codecs/reinterpret",
"codecs/round",
Expand Down Expand Up @@ -40,6 +41,8 @@ numcodecs-fixed-offset-scale = { version = "0.1", path = "codecs/fixed-offset-sc
numcodecs-identity = { version = "0.1", path = "codecs/identity", default-features = false }
numcodecs-linear-quantize = { version = "0.1", path = "codecs/linear-quantize", default-features = false }
numcodecs-log = { version = "0.2", path = "codecs/log", default-features = false }
numcodecs-pca = { version = "0.1", path = "codecs/pca", default-features = false }
numcodecs-random-projection = { version = "0.1", path = "codecs/random-projection", default-features = false }
numcodecs-reinterpret = { version = "0.1", path = "codecs/reinterpret", default-features = false }
numcodecs-round = { version = "0.1", path = "codecs/round", default-features = false }
numcodecs-swizzle-reshape = { version = "0.1", path = "codecs/swizzle-reshape", default-features = false }
Expand All @@ -53,8 +56,10 @@ numcodecs-zstd = { version = "0.1", path = "codecs/zstd", default-features = fal
convert_case = { version = "0.6", default-features = false }
format_serde_error = { version = "0.3", default-features = false }
miniz_oxide = { version = "0.8", default-features = false }
nalgebra = { version = "0.30", default-features = false } # keep in sync with nshare
ndarray = { version = "0.15", default-features = false } # keep in sync with numpy
ndarray-rand = { version = "0.14", default-features = false }
nshare = { version = "0.9", default-features = false } # keep in sync with ndarray
numpy = { version = "0.21", default-features = false }
num-traits = { version = "0.2", default-features = false }
postcard = { version = "1.0", default-features = false }
Expand Down
31 changes: 31 additions & 0 deletions codecs/pca/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
[package]
name = "numcodecs-pca"
version = "0.1.0"
edition = { workspace = true }
authors = { workspace = true }
repository = { workspace = true }
license = { workspace = true }
rust-version = { workspace = true }

description = "PCA codec implementation for the numcodecs API"
readme = "README.md"
categories = ["compression", "encoding"]
keywords = ["pca", "numcodecs", "compression", "encoding"]

[dependencies]
nalgebra = { workspace = true }
ndarray = { workspace = true, features = ["std"] }
ndarray-rand = { workspace = true }
nshare = { workspace = true, features = ["ndarray", "nalgebra", "nalgebra_std"] }
numcodecs = { workspace = true }
num-traits = { workspace = true, features = ["std"] }
schemars = { workspace = true, features = ["derive", "preserve_order"] }
serde = { workspace = true, features = ["std", "derive"] }
thiserror = { workspace = true }
wyhash = { workspace = true }

[dev-dependencies]
ndarray-rand = { workspace = true }

[lints]
workspace = true
1 change: 1 addition & 0 deletions codecs/pca/LICENSE
32 changes: 32 additions & 0 deletions codecs/pca/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
[![CI Status]][workflow] [![MSRV]][repo] [![Latest Version]][crates.io] [![Rust Doc Crate]][docs.rs] [![Rust Doc Main]][docs]

[CI Status]: https://img.shields.io/github/actions/workflow/status/juntyr/numcodecs-rs/ci.yml?branch=main
[workflow]: https://github.com/juntyr/numcodecs-rs/actions/workflows/ci.yml?query=branch%3Amain

[MSRV]: https://img.shields.io/badge/MSRV-1.76.0-blue
[repo]: https://github.com/juntyr/numcodecs-rs

[Latest Version]: https://img.shields.io/crates/v/numcodecs-pca
[crates.io]: https://crates.io/crates/numcodecs-pca

[Rust Doc Crate]: https://img.shields.io/docsrs/numcodecs-pca
[docs.rs]: https://docs.rs/numcodecs-pca/

[Rust Doc Main]: https://img.shields.io/badge/docs-main-blue
[docs]: https://juntyr.github.io/numcodecs-rs/numcodecs_pca

# numcodecs-pca

PCA codec implementation for the [`numcodecs`] API.

[`numcodecs`]: https://docs.rs/numcodecs/0.1/numcodecs/

## License

Licensed under the Mozilla Public License, Version 2.0 ([LICENSE](LICENSE) or https://www.mozilla.org/en-US/MPL/2.0/).

## Funding

The `numcodecs-pca` crate has been developed as part of [ESiWACE3](https://www.esiwace.eu), the third phase of the Centre of Excellence in Simulation of Weather and Climate in Europe.

Funded by the European Union. This work has received funding from the European High Performance Computing Joint Undertaking (JU) under grant agreement No 101093054.
Loading
Loading