swix  by stsievert

Swift matrix and machine learning library

created 11 years ago
589 stars

Top 55.0% on SourcePulse

GitHubView on GitHub
1 Expert Loves This Project
Project Summary

This library provides a NumPy-like interface for Swift, enabling efficient matrix and machine learning operations on Apple platforms. It targets developers looking to port Python or MATLAB numerical algorithms to Swift for mobile applications, offering ease of use and performance through underlying frameworks like Accelerate and OpenCV.

How It Works

Swix acts as a high-level wrapper around Apple's Accelerate framework and OpenCV, providing familiar operators and functions for array manipulation and mathematical computations. It aims to mirror NumPy's syntax and functionality, simplifying the transition for developers accustomed to Python's numerical ecosystem. This approach leverages optimized, low-level C libraries for performance while offering a more accessible Swift API.

Quick Start & Requirements

  • Install via Swift Package Manager: swift build
  • Requires macOS or iOS development environment.
  • Accelerate and OpenCV are used as underlying dependencies.
  • Official documentation: Install

Highlighted Details

  • NumPy-like syntax and functionality for array operations.
  • Support for common mathematical functions (sin, dot product, matrix inversion, eigenvalues).
  • Includes machine learning algorithms like SVM, kNN, SVD/PCA.
  • Leverages Accelerate and OpenCV for performance optimization.

Maintenance & Community

  • Primarily maintained by stsievert.
  • No explicit community channels (Discord/Slack) or roadmap mentioned in the README.

Licensing & Compatibility

  • The README does not explicitly state a license. The repository's license file indicates MIT.
  • Compatible with Swift projects, suitable for commercial use under MIT license terms.

Limitations & Caveats

The project notes that TensorFlow/Swift and Apple's Swift-Numerics may offer more complete ndarray and autodiff support. Some complex functions like SVD were tested against NumPy, with minor differences noted compared to MATLAB's output.

Health Check
Last commit

5 years ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
0
Star History
0 stars in the last 30 days

Explore Similar Projects

Starred by George Hotz George Hotz(Author of tinygrad; Founder of the tiny corp, comma.ai), Andrej Karpathy Andrej Karpathy(Founder of Eureka Labs; Formerly at Tesla, OpenAI; Author of CS 231n), and
28 more.

mlx by ml-explore

0.3%
22k
Array framework for machine learning on Apple silicon
created 1 year ago
updated 2 days ago
Feedback? Help us improve.