Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/KevinCoble/AIToolbox
A toolbox of AI modules written in Swift: Graphs/Trees, Support Vector Machines, Neural Networks, PCA, K-Means, Genetic Algorithms
https://github.com/KevinCoble/AIToolbox
Last synced: about 1 month ago
JSON representation
A toolbox of AI modules written in Swift: Graphs/Trees, Support Vector Machines, Neural Networks, PCA, K-Means, Genetic Algorithms
- Host: GitHub
- URL: https://github.com/KevinCoble/AIToolbox
- Owner: KevinCoble
- License: apache-2.0
- Created: 2016-03-27T21:52:53.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2020-08-09T19:45:37.000Z (over 4 years ago)
- Last Synced: 2024-08-15T17:57:41.957Z (5 months ago)
- Language: Swift
- Size: 620 KB
- Stars: 792
- Watchers: 44
- Forks: 87
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
- awesome-ios - AIToolbox - A toolbox of AI modules written in Swift: Graphs/Trees, Linear Regression, Support Vector Machines, Neural Networks, PCA, KMeans, Genetic Algorithms, MDP, Mixture of Gaussians. (Machine Learning / Other Hardware)
- awesome-machine-learning - AIToolbox - A toolbox framework of AI modules written in Swift: Graphs/Trees, Linear Regression, Support Vector Machines, Neural Networks, PCA, KMeans, Genetic Algorithms, MDP, Mixture of Gaussians. (Swift / General-Purpose Machine Learning)
- awesome-machine-learning - AIToolbox - A toolbox framework of AI modules written in Swift: Graphs/Trees, Linear Regression, Support Vector Machines, Neural Networks, PCA, KMeans, Genetic Algorithms, MDP, Mixture of Gaussians. (Swift / General-Purpose Machine Learning)
- awesome-machine-learning - AIToolbox - Means, Genetic Algorithms (Misc / Other ML frameworks)
- awesome-ios-star - AIToolbox - A toolbox of AI modules written in Swift: Graphs/Trees, Linear Regression, Support Vector Machines, Neural Networks, PCA, KMeans, Genetic Algorithms, MDP, Mixture of Gaussians. (Machine Learning / Other Hardware)
- awesome-machine-learning - AIToolbox - A toolbox framework of AI modules written in Swift: Graphs/Trees, Linear Regression, Support Vector Machines, Neural Networks, PCA, KMeans, Genetic Algorithms, MDP, Mixture of Gaussians. (Swift / General-Purpose Machine Learning)
- awesome-machine-learning - AIToolbox - A toolbox framework of AI modules written in Swift: Graphs/Trees, Linear Regression, Support Vector Machines, Neural Networks, PCA, KMeans, Genetic Algorithms, MDP, Mixture of Gaussians. (Swift / General-Purpose Machine Learning)
- awesome-machine-learning - AIToolbox - A toolbox framework of AI modules written in Swift: Graphs/Trees, Linear Regression, Support Vector Machines, Neural Networks, PCA, KMeans, Genetic Algorithms, MDP, Mixture of Gaussians. (Swift / General-Purpose Machine Learning)
README
# AIToolbox
A toolbox of AI modules written in Swift: Graphs/Trees, Linear Regression, Support Vector Machines, Neural Networks, PCA, KMeans, Genetic Algorithms, MDP, Mixture of Gaussians, Logistic RegressionThis framework uses the Accelerate library to speed up computations, except the Linux package versions.
Written for Swift 3.0. Earlier versions are Swift 2.2 compatibleSVM ported from the public domain LIBSVM repository
See https://www.csie.ntu.edu.tw/~cjlin/libsvm/ for more informationThe Metal Neural Network uses the Metal framework for a Neural Network using the GPU. While it works in preliminary testing, more work could be done with this class
Use the XCTest files for examples on how to use the classes
Playgrounds for Linear Regression, SVM, and Neural Networks are available. Now available in both macOS and iOS versions.
###New - Convolution Program
For the Deep Network classes, please look at the [Convolution](https://github.com/KevinCoble/Convolution) project that uses the AIToolbox library to do image recognition.### New Swift Package - Mac and Linux compatible!
The package is a sub-set of the full framework. Classes that require GCD or LAPACK have not been ported. I am investigating LAPACK on Linux alternatives, and may someday figure out how to get libdispatch to compile on Ubuntu...
Use [this subdirectory](Package) to reference the package from your code.## Manual
I have started a [manual](Manual/AIToolbox.md) for the framework. It is a work-in-progress, but adds some useful explanation to pieces of the framework. All protocols, structures, and enumerations are well defined. Class descriptions are there, but not class variables and methods.
## Classes/Algorithms supported:
Graphs/Trees
Depth-first search
Breadth-first search
Hill-climb search
Beam Search
Optimal Path searchAlpha-Beta (game tree)
Genetic Algorithms
mutations
mating
integer/double allelesConstraint Propogation
i.e. 3-color map problemLinear Regression
arbitrary function in model
regularization can be used
convenience constructor for standard polygons
Least-squares errorNon-Linear Regression
parameter-delta
Gradient-Descent
Gauss-NewtonLogistic Regression
Use any non-linear solution method
Multi-class capabilityNeural Networks
multiple layers, several non-linearity models
on-line and batch training
feed-forward or simple recurrent layers can be mixed in one network
simple network training using GPU via Apple's Metal
LSTM network layer implemented - needs more testing
gradient check routinesSupport Vector Machine
Classification
Regression
More-than-2 classes classificationK-Means
unlabelled data groupingPrincipal Component Analysis
data dimension reductionMarkov Decision Process
value iteration
policy iteration
fitted value iteration for continuous state MDPs - uses any Regression class for fit
(see my MDPRobot project on github for an example use)
Monte-Carlo (every-visit, and first-visit)
SARSAGaussians
Single variable
Multivariate - with full covariance matrix or diagonal onlyMixture Of Gaussians
Learn density function of a mixture of gaussians from data
EM algorithm to converge model with dataValidation
Use to select model or parameters of model
Simple validation (percentage of data becomes test data)
N-Fold validationDeep-Network
Convolution layers
Pooling layers
Fully-connected NN layers
multi-threadedPlotting
NSView based MLView for displaying regression data, classification data, functions, and classifier areas!
UIView based MLView for iOS applications, same as NSView based for macOS
![Regression Plot Image](PlotImage.png)
![Classification Plot Image](PlotImage2.png)## License
This framework is made available with the [Apache license](LICENSE.md).
## Contributions
See the [contribution document](CONTRIBUTIONS.md) for information on contributing to this framework