{"id":1366,"url":"https://github.com/KevinCoble/AIToolbox","last_synced_at":"2025-08-02T04:30:58.209Z","repository":{"id":44416510,"uuid":"54849747","full_name":"KevinCoble/AIToolbox","owner":"KevinCoble","description":"A toolbox of AI modules written in Swift:  Graphs/Trees, Support Vector Machines, Neural Networks, PCA, K-Means, Genetic Algorithms","archived":false,"fork":false,"pushed_at":"2020-08-09T19:45:37.000Z","size":635,"stargazers_count":794,"open_issues_count":6,"forks_count":87,"subscribers_count":44,"default_branch":"master","last_synced_at":"2024-12-06T08:34:35.457Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/KevinCoble.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-03-27T21:52:53.000Z","updated_at":"2024-11-10T06:29:21.000Z","dependencies_parsed_at":"2022-09-22T06:21:10.081Z","dependency_job_id":null,"html_url":"https://github.com/KevinCoble/AIToolbox","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/KevinCoble/AIToolbox","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KevinCoble%2FAIToolbox","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KevinCoble%2FAIToolbox/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KevinCoble%2FAIToolbox/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KevinCoble%2FAIToolbox/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/KevinCoble","download_url":"https://codeload.github.com/KevinCoble/AIToolbox/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KevinCoble%2FAIToolbox/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268334609,"owners_count":24233793,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-02T02:00:12.353Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-01-05T20:15:44.805Z","updated_at":"2025-08-02T04:30:57.840Z","avatar_url":"https://github.com/KevinCoble.png","language":"Swift","funding_links":[],"categories":["Machine Learning","Swift","Misc"],"sub_categories":["Other Hardware","General-Purpose Machine Learning","Other free courses","Other ML frameworks"],"readme":"# AIToolbox\nA 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 Regression\n\nThis framework uses the Accelerate library to speed up computations, except the Linux package versions.\nWritten for Swift 3.0.  Earlier versions are Swift 2.2 compatible\n\nSVM ported from the public domain LIBSVM repository\nSee https://www.csie.ntu.edu.tw/~cjlin/libsvm/ for more information\n\nThe 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\n\nUse the XCTest files for examples on how to use the classes\n\nPlaygrounds for Linear Regression, SVM, and Neural Networks are available.  Now available in both macOS and iOS versions.\n\n###New - Convolution Program\nFor the Deep Network classes, please look at the [Convolution](https://github.com/KevinCoble/Convolution) project that uses the AIToolbox library to do image recognition.\n\n### New Swift Package - Mac and Linux compatible!\nThe 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...\nUse [this subdirectory](Package) to reference the package from your code.\n\n\n##  Manual\n\nI 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.\n\n## Classes/Algorithms supported:\n\n    Graphs/Trees\n        Depth-first search\n        Breadth-first search\n        Hill-climb search\n        Beam Search\n        Optimal Path search\n\n    Alpha-Beta (game tree)\n\n    Genetic Algorithms\n        mutations\n        mating\n        integer/double alleles\n\n    Constraint Propogation\n        i.e. 3-color map problem\n\n    Linear Regression\n        arbitrary function in model\n        regularization can be used\n        convenience constructor for standard polygons\n        Least-squares error\n\n    Non-Linear Regression\n        parameter-delta\n        Gradient-Descent\n        Gauss-Newton\n\n    Logistic Regression\n        Use any non-linear solution method\n        Multi-class capability\n\n    Neural Networks\n        multiple layers, several non-linearity models\n        on-line and batch training\n        feed-forward or simple recurrent layers can be mixed in one network\n        simple network training using GPU via Apple's Metal\n        LSTM network layer implemented - needs more testing\n        gradient check routines\n\n    Support Vector Machine\n        Classification\n        Regression\n        More-than-2 classes classification\n\n    K-Means\n        unlabelled data grouping\n\n    Principal Component Analysis\n        data dimension reduction\n\n    Markov Decision Process\n        value iteration\n        policy iteration\n        fitted value iteration for continuous state MDPs - uses any Regression class for fit\n                (see my MDPRobot project on github for an example use)\n        Monte-Carlo (every-visit, and first-visit)\n        SARSA\n\n    Gaussians\n        Single variable\n        Multivariate - with full covariance matrix or diagonal only\n\n    Mixture Of Gaussians\n        Learn density function of a mixture of gaussians from data\n        EM algorithm to converge model with data\n\n    Validation\n        Use to select model or parameters of model\n        Simple validation (percentage of data becomes test data)\n        N-Fold validation\n\n    Deep-Network\n        Convolution layers\n        Pooling layers\n        Fully-connected NN layers\n        multi-threaded\n\n    Plotting\n        NSView based MLView for displaying regression data, classification data, functions, and classifier areas!\n        UIView based MLView for iOS applications, same as NSView based for macOS\n![Regression Plot Image](PlotImage.png)\n![Classification Plot Image](PlotImage2.png)\n\n## License\n\nThis framework is made available with the [Apache license](LICENSE.md).\n\n##  Contributions\n\nSee the [contribution document](CONTRIBUTIONS.md) for information on contributing to this framework\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FKevinCoble%2FAIToolbox","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FKevinCoble%2FAIToolbox","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FKevinCoble%2FAIToolbox/lists"}