1#![allow(dead_code)]
2#![allow(non_snake_case)]
3#![allow(missing_docs)]
4#![allow(deprecated)]
5#![allow(clippy::all)]
6#![allow(clippy::pedantic)]
7#![allow(clippy::nursery)]
8pub mod generators;
12pub mod parallel_rng;
13pub mod simd_gen;
14pub mod traits;
15pub mod validation;
16pub mod versioning;
17pub mod viz;
18
19pub use parallel_rng::ParallelRng;
21pub use simd_gen::SimdCapabilities;
22pub use traits::{Dataset, DatasetGenerator, InMemoryDataset};
23pub use versioning::{DatasetVersion, ProvenanceInfo};
24pub use viz::PlotConfig;
25
26pub use generators::basic::{
28 make_blobs, make_circles, make_classification, make_moons, make_regression,
29};
30pub use generators::performance::{parallel_generate, DatasetStream, LazyDatasetGenerator};
31pub use generators::type_safe::{
32 make_typed_blobs, make_typed_classification, make_typed_regression,
33};
34
35use scirs2_core::ndarray::{Array1, Array2};
37
38#[derive(Debug, Clone)]
39pub struct SimpleDataset {
40 pub features: Array2<f64>,
41 pub targets: Option<Array1<f64>>,
42}
43
44impl SimpleDataset {
45 pub fn new(features: Array2<f64>, targets: Option<Array1<f64>>) -> Self {
46 Self { features, targets }
47 }
48 pub fn n_samples(&self) -> usize {
49 self.features.nrows()
50 }
51 pub fn n_features(&self) -> usize {
52 self.features.ncols()
53 }
54}