quantrs2_ml/dimensionality_reduction/
specialized.rs1use crate::error::{MLError, Result};
4use scirs2_core::ndarray::{Array1, Array2};
5
6pub struct QuantumTimeSeriesDR {
8 n_components: usize,
9}
10
11impl QuantumTimeSeriesDR {
12 pub fn new(n_components: usize) -> Self {
13 Self { n_components }
14 }
15
16 pub fn fit_transform(&mut self, data: &Array2<f64>) -> Result<Array2<f64>> {
17 Ok(Array2::zeros((data.nrows(), self.n_components)))
19 }
20}
21
22pub struct QuantumImageTensorDR {
24 n_components: usize,
25}
26
27impl QuantumImageTensorDR {
28 pub fn new(n_components: usize) -> Self {
29 Self { n_components }
30 }
31
32 pub fn fit_transform(&mut self, data: &Array2<f64>) -> Result<Array2<f64>> {
33 Ok(Array2::zeros((data.nrows(), self.n_components)))
35 }
36}
37
38pub struct QuantumGraphDR {
40 n_components: usize,
41}
42
43impl QuantumGraphDR {
44 pub fn new(n_components: usize) -> Self {
45 Self { n_components }
46 }
47
48 pub fn fit_transform(&mut self, data: &Array2<f64>) -> Result<Array2<f64>> {
49 Ok(Array2::zeros((data.nrows(), self.n_components)))
51 }
52}