{"id":22979523,"url":"https://github.com/petabi/petal-decomposition","last_synced_at":"2025-04-09T20:12:24.445Z","repository":{"id":40477244,"uuid":"265089403","full_name":"petabi/petal-decomposition","owner":"petabi","description":"Matrix decomposition algorithms including PCA (principal component analysis) and ICA (independent component analysis)","archived":false,"fork":false,"pushed_at":"2025-04-06T03:03:24.000Z","size":125,"stargazers_count":21,"open_issues_count":4,"forks_count":5,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-09T20:12:20.420Z","etag":null,"topics":["decomposition","dimensionality-reduction","ica","matrix","pca"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/petabi.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-05-18T23:35:40.000Z","updated_at":"2025-04-06T03:00:58.000Z","dependencies_parsed_at":"2024-12-15T01:31:58.309Z","dependency_job_id":"c3a3b96a-7a8a-4386-8066-f5afceebbb43","html_url":"https://github.com/petabi/petal-decomposition","commit_stats":{"total_commits":84,"total_committers":3,"mean_commits":28.0,"dds":0.09523809523809523,"last_synced_commit":"3eb2b634da90c1ab34c5518f6e2387f882e36df1"},"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/petabi%2Fpetal-decomposition","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/petabi%2Fpetal-decomposition/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/petabi%2Fpetal-decomposition/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/petabi%2Fpetal-decomposition/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/petabi","download_url":"https://codeload.github.com/petabi/petal-decomposition/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248103872,"owners_count":21048245,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["decomposition","dimensionality-reduction","ica","matrix","pca"],"created_at":"2024-12-15T01:31:47.150Z","updated_at":"2025-04-09T20:12:24.421Z","avatar_url":"https://github.com/petabi.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# petal-decomposition\n\npetal-decomposition provides matrix decomposition algorithms including PCA\n(principal component analysis) and ICA (independent component analysis).\n\n[![crates.io](https://img.shields.io/crates/v/petal-decomposition)](https://crates.io/crates/petal-decomposition)\n[![Documentation](https://docs.rs/petal-decomposition/badge.svg)](https://docs.rs/petal-decomposition)\n[![Coverage Status](https://codecov.io/gh/petabi/petal-decomposition/branch/master/graphs/badge.svg)](https://codecov.io/gh/petabi/petal-decomposition)\n\n## Requirements\n\n* BLAS/LAPACK backend (OpenBLAS, Netlib, Intel MKL, or the Accelerate Framework)\n\n## Features\n\n* PCA with exact, full SVD (singular value decomposition)\n* PCA with randomized, truncated SVD\n* [FastICA](https://www.cs.helsinki.fi/u/ahyvarin/papers/NN00new.pdf)\n\n## Crate Features\n\n* Use one of `intel-mkl-static`, `intel-mkl-system`, `netlib-static`, `netlib-system`,\n  `openblas-static`, and `openblas-system` to select a BLAS/LAPACK\n  backend.\n  See [ndarray-linalg's documentation][ndarray-linalg-features] for details.\n\n  **Note:** On macOS, the Accelerate Framework is used by default, so these\n  features are not needed.\n\n* `serialization` enables serialization/deserialization using [serde](https://crates.io/crates/serde).\n\n## Examples\n\nThe following example shows how to apply PCA to an array of three samples, and\nobtain singular values as well as how much variance each component explains.\n\n```rust\nuse ndarray::arr2;\nuse petal_decomposition::Pca;\n\nlet x = arr2(\u0026[[0_f64, 0_f64], [1_f64, 1_f64], [2_f64, 2_f64]]);\nlet mut pca = PcaBuilder::new(2).build(); // Keep two dimensions.\npca.fit(\u0026x).unwrap();\n\nlet s = pca.singular_values();            // [2_f64, 0_f64]\nlet v = pca.explained_variance_ratio();   // [1_f64, 0_f64]\nlet y = pca.transform(\u0026x).unwrap();       // [-2_f64.sqrt(), 0_f64, 2_f64.sqrt()]\n```\n\n## License\n\nCopyright 2020-2024 Petabi, Inc.\n\nLicensed under [Apache License, Version 2.0][apache-license] (the \"License\");\nyou may not use this crate except in compliance with the License.\n\nUnless required by applicable law or agreed to in writing, software distributed\nunder the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\nCONDITIONS OF ANY KIND, either express or implied. See [LICENSE](LICENSE) for\nthe specific language governing permissions and limitations under the License.\n\n## Contribution\n\nUnless you explicitly state otherwise, any contribution intentionally submitted\nfor inclusion in the work by you, as defined in the [Apache-2.0\nlicense][apache-license], shall be licensed as above, without any additional\nterms or conditions.\n\n[apache-license]: http://www.apache.org/licenses/LICENSE-2.0\n[ndarray-linalg-features]: https://github.com/rust-ndarray/ndarray-linalg#backend-features\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpetabi%2Fpetal-decomposition","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpetabi%2Fpetal-decomposition","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpetabi%2Fpetal-decomposition/lists"}