🚀 SwiftSci v1.4.0 Release Notes
📦 Key Additions & Features
SystemsCSVParser(SwiftDataFrame): High-performance zero-copy memory-mapped RFC 4180 DFA byte parser, speeding up CSV ingestion by ~10× on large datasets.- Vectorized Byte Parsers (
SwiftDataFrame): Zero-allocation ASCII parsers (VectorizedByteParsers) for fastDouble,Int, and string decoding from unmanaged byte buffers. - vDSP Reductions (
SwiftDataFrame): AcceleratedTypedColumn<Double>mean(),variance(), andstdDev()using Apple AcceleratevDSPreductions. - DataFrame Index Filtering & Argsort (
SwiftDataFrame): AddedfilterRows(by:)index-based boolean mask filtering andargsort()column index sorting. - Recursive Feature Elimination RFE (
SwiftPreprocessing): AddedRecursiveFeatureElimination(RFE) for iterative feature selection based on estimator feature importances. - Feature Importances & Model Persistence (
SwiftML): Added GinifeatureImportancesproperty toDecisionTreeClassifier,DecisionTreeRegressor,RandomForestClassifier,RandomForestRegressor, and addedCodableserialization (save(to:)/load(from:)) across classical estimators. - NLP Text Tokenizers & Feature Extraction (
SwiftNLP): AddedNGramTokenizer(word & char n-grams) andHashingVectorizer(MurmurHash3 memory-bounded token hashing). - Time Series Windowing (
SwiftForecast): AddedExpandingWindowfeature transformer for cumulative time-series feature generation. - Swift DocC Integration & Multi-Module Site: Integrated
swift-docc-plugin(v1.5.0) and deployed unified 10-module static web documentation to GitHub Pages.
🛠️ Fixes & Concurrency Improvements
- GradientBoostedTrees Bounds Check (
SwiftML): Enforced bounds checking inGradientBoostedTreesRegressor. - Seeded Random Number Generators (
SwiftPreprocessing): Fixed deterministic seeding inSMOTEandRandomUndersamplerusingLCG. - SelectKBest ANOVA Scoring (
SwiftPreprocessing): Fixed ANOVA F-statistic calculation inSelectKBestand added explicitSwiftStatsdependency toSwiftPreprocessing. - CalibratedClassifier Concurrency (
SwiftML): ConvertedCalibratedClassifiertoactorto guarantee thread safety under Swift 6 strict concurrency rules. - Wired Memory Scaling (
SwiftPreprocessing): Dynamically scaledWiredMemoryManagerdefault limits usingProcessInfo.processInfo.activeProcessorCount.
📊 Benchmark Performance Summary (v1.4.0 vs Python)
| Benchmark Test | Swift (ms) | Python (ms) | Speedup | Winner |
|---|---|---|---|---|
| ARIMA(1,1,1) Fit (50k pts) | 2.228 ms | 206.414 ms | 92.66x | 🟢 Swift |
| ARIMA(1,1,1) Forecast (horizon=24) | 2.297 ms | 209.709 ms | 91.28x | 🟢 Swift |
| Holt-Winters Fit (50k pts, period=12) | 6.823 ms | 138.947 ms | 20.37x | 🟢 Swift |
| Random Forest Fit (1k×4, 50 trees) | 4.580 ms | 24.217 ms | 5.29x | 🟢 Swift |
| KernelSHAP Explain (5 feats, 100 coalitions) | 0.148 ms | 0.452 ms | 3.05x | 🟢 Swift |
| Kalman Filter 1D (10k obs) | 56.508 ms | 84.692 ms | 1.50x | 🟢 Swift |
| Mean (vDSP, 1M elements) | 0.083 ms | 0.119 ms | 1.44x | 🟢 Swift |
🌐 Live Documentation: https://nodibell.github.io/SwiftSci/
Full Changelog: v1.3.0...v1.4.0