You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit was created on GitHub.com and signed with GitHub’s verified signature.
Changes
Added
Parallel distance computation via Numba prange and the new n_jobs parameter. Set use_numba=True with n_jobs=-1 to use all available CPU cores, providing 2-3x speedups on multi-core machines (Issue #36).
Optional scipy acceleration: uses scipy.spatial.distance.cdist for distance computation and scipy.special.erf for the error function when scipy is available, with graceful fallback to pure NumPy.
Dedicated Numba-specific tests (test_numba_*) that automatically run when Numba is installed and are skipped otherwise.
Changed
Replaced the O(n²) Python nested loop for distance computation with a vectorized NumPy implementation using chunked broadcasting.
Restructured the Numba JIT path from a generator-based approach to non-generator kernels that support numba.prange.
Vectorized _standard_distances, _prob_distances, and _norm_prob_outlier_factor pipeline methods, replacing Python for loops with NumPy array operations.
The n_jobs parameter controls Numba thread-level parallelism via prange, following the scikit-learn convention (-1 for all cores, positive integer for a fixed number of threads). n_jobs only takes effect when use_numba=True.