| Crates.io | sklears-cross-decomposition |
| lib.rs | sklears-cross-decomposition |
| version | 0.1.0-beta.1 |
| created_at | 2025-10-13 15:03:08.310166+00 |
| updated_at | 2026-01-01 21:36:48.97094+00 |
| description | Cross decomposition algorithms (PLS, CCA) |
| homepage | https://github.com/cool-japan/sklears |
| repository | https://github.com/cool-japan/sklears |
| max_upload_size | |
| id | 1880641 |
| size | 1,899,103 |
Latest release:
0.1.0-beta.1(January 1, 2026). See the workspace release notes for highlights and upgrade guidance.
sklears-cross-decomposition offers Partial Least Squares (PLS) regressors/classifiers, Canonical Correlation Analysis (CCA), and related cross-decomposition utilities. The APIs mirror scikit-learn 1.5, while Rust-native optimizations deliver consistent performance gains.
use sklears_cross_decomposition::PLSRegression;
use scirs2_core::ndarray::{array, Array2};
let x: Array2<f64> = array![
[0.0, 1.0, 2.0],
[1.0, 2.0, 3.0],
[2.0, 3.0, 4.0],
];
let y: Array2<f64> = array![
[1.0, 0.0],
[2.0, 1.0],
[3.0, 2.0],
];
let pls = PLSRegression::builder()
.n_components(2)
.scale(true)
.max_iter(500)
.tol(1e-6)
.build();
let fitted = pls.fit(&x, &y)?;
let y_pred = fitted.predict(&x)?;
0.1.0-beta.1.TODO.md.