macro_rules! quick_dataset {
(data: $data:expr, target: $target:expr) => { ... };
(data: $data:expr) => { ... };
}Expand description
Advanced macro definitions for sklears-core
This module provides powerful declarative macros for common patterns in machine learning code, validation, builder patterns, code generation utilities, and advanced ML algorithm scaffolding.
§Key Features
- Dataset Creation: Quick dataset macros for testing and prototyping
- Type System Helpers: Trait bound definitions and complex type constraints
- Configuration Management: Parameter mapping and validation macros
- Code Generation: Boilerplate reduction for ML algorithms
- Testing Infrastructure: Comprehensive test suite generation
- Performance Optimizations: SIMD and parallel processing macros
Creates a quick dataset for testing and demonstration purposes
§Examples
ⓘ
use sklears_core::quick_dataset;
// SciRS2 Policy: Using scirs2_core::ndarray (COMPLIANT)
use scirs2_core::ndarray::{arr1, arr2};
let dataset = quick_dataset!(
data: arr2(&[[1.0, 2.0], [3.0, 4.0], [5.0, 6.0]]),
target: arr1(&[0.0, 1.0, 0.0])
);