Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mossr/beautifulalgorithms.jl
Concise and beautiful algorithms written in Julia
https://github.com/mossr/beautifulalgorithms.jl
algorithms decision-making-under-uncertainty julia machine-learning neural-network optimization quine regression reinforcement-learning sorting
Last synced: about 1 month ago
JSON representation
Concise and beautiful algorithms written in Julia
- Host: GitHub
- URL: https://github.com/mossr/beautifulalgorithms.jl
- Owner: mossr
- Created: 2020-09-15T19:58:22.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2023-12-17T17:11:46.000Z (11 months ago)
- Last Synced: 2024-10-01T12:23:26.491Z (about 1 month ago)
- Topics: algorithms, decision-making-under-uncertainty, julia, machine-learning, neural-network, optimization, quine, regression, reinforcement-learning, sorting
- Language: Julia
- Homepage:
- Size: 2.37 MB
- Stars: 1,323
- Watchers: 22
- Forks: 91
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# BeautifulAlgorithms.jl
[![Build Status](https://github.com/mossr/BeautifulAlgorithms.jl/workflows/CI/badge.svg)](https://github.com/mossr/BeautifulAlgorithms.jl/actions)
[![codecov](https://codecov.io/github/mossr/BeautifulAlgorithms.jl/coverage.svg?branch=master)](https://codecov.io/gh/mossr/BeautifulAlgorithms.jl)Concise algorithms written in Julia and formatted with [Carbon](https://carbon.now.sh/).
Algorithms for machine learning, optimization, reinforcement learning, online planning, decision making under uncertainty, and sorting. All implementations are working and self-contained; refer to the [test cases](./test/).
> _Note, these are primarily for academic purposes and are not designed for real-world usage. There are many other Julia packages that implement more sound versions of these algorithms._
```julia
] add http://github.com/mossr/BeautifulAlgorithms.jl
```- [Gradient descent](#gradient-descent)
- [Stochastic gradient descent](#stochastic-gradient-descent)
- [Two-layer neural network](#two-layer-neural-network)
- [Two-layer neural network (one-liner)](#two-layer-neural-network-one-liner)
- [Multi-layer neural network](#multi-layer-neural-network)
- [Loss functions](#loss-functions)
- [Distance functions](#distance-functions)
- [Nearest neighbor](#nearest-neighbor)
- [K-nearest neighbors](#k-nearest-neighbors)
- [K-means clustering](#k-means-clustering)
- [The EM algorithm](#the-em-algorithm)
- [Linear regression](#linear-regression)
- [Linear regression (one-liner)](#linear-regression-one-liner)
- [Ridge regression](#ridge-regression)
- [Basis regression](#basis-regression)
- [Radial basis regression](#radial-basis-regression)
- [Logistic regression](#logistic-regression)
- [Cross-entropy method](#cross-entropy-method)
- [Finite difference methods](#finite-difference-methods)
- [Simulated annealing](#simulated-annealing)
- [Twiddle](#twiddle)
- [Newton's method](#newtons-method)
- [Gaussian process](#gaussian-process)
- [Gaussian process kernels](#gaussian-process-kernels)
- [Thompson sampling](#thompson-sampling)
- [Particle filter](#particle-filter)
- [Value iteration](#value-iteration)
- [Branch and bound](#branch-and-bound)
- [Monte Carlo tree search](#monte-carlo-tree-search)
- [Huffman coding](#huffman-coding)
- [Hailstone sequence (Collatz conjecture)](#hailstone-sequence-collatz-conjecture)
- [Bubble sort](#bubble-sort)
- [Merge sort](#merge-sort)
- [Insertion sort](#insertion-sort)
- [Bogo sort](#bogo-sort)
- [Bogo sort (one-liner)](#bogo-sort-one-liner)
- [Quine](#quine)*Note: Algorithms are modified from their original sources.*
## Gradient descent
Percy Liang and Dorsa Sadigh, *Artificial Intelligence: Principles and Techniques*, Stanford University, 2019.## Stochastic gradient descent
Percy Liang and Dorsa Sadigh, *Artificial Intelligence: Principles and Techniques*, Stanford University, 2019.## Two-layer neural network
##### Two-layer neural network (one-liner)
## Multi-layer neural network
## Loss functions
## Distance functions
## Nearest neighbor
## K-nearest neighbors
## K-means clustering
Percy Liang and Dorsa Sadigh, *Artificial Intelligence: Principles and Techniques*, Stanford University, 2019.## The EM algorithm
Andrew Ng, *Mixtures of Gaussians and the EM algorithm*, Stanford University, 2020.1## Linear regression
Mykel J. Kochenderfer and Tim A. Wheeler, *Algorithms for Optimization*, MIT Press, 2019. (Credit [@HenriDeh](https://github.com/HenriDeh) for use of `ones`)##### Linear regression (one-liner)
## Ridge regression
## Basis regression
Mykel J. Kochenderfer and Tim A. Wheeler, *Algorithms for Optimization*, MIT Press, 2019.## Radial basis regression
Mykel J. Kochenderfer and Tim A. Wheeler, *Algorithms for Optimization*, MIT Press, 2019.## Logistic regression
## Cross-entropy method
Mykel J. Kochenderfer and Tim A. Wheeler, *Algorithms for Optimization*, MIT Press, 2019.## Finite difference methods
Mykel J. Kochenderfer and Tim A. Wheeler, *Algorithms for Optimization*, MIT Press, 2019.## Simulated annealing
Mykel J. Kochenderfer and Tim A. Wheeler, *Algorithms for Optimization*, MIT Press, 2019.## Twiddle
Sebatian Thrun, *Artificial Intelligence for Robotics*, Udacity, 2012.## Newton's method
John Wallis, *A Treatise of Algebra both Historical and Practical*, 1685.## Gaussian process
Mykel J. Kochenderfer and Tim A. Wheeler, *Algorithms for Optimization*, MIT Press, 2019.## Gaussian process kernels
## Thompson sampling
Daniel J. Russo, Benjamin Van Roy, Abbas Kazerouni, Ian Osband, and Zheng Wen, *A Tutorial on Thompson Sampling*, arXiv:1707.02038, 2020.## Particle filter
Mykel J. Kochenderfer, Tim A. Wheeler, and Kyle H. Wray, *Algorithms for Decision Making*, Preprint.## Value iteration
Mykel J. Kochenderfer, Tim A. Wheeler, and Kyle H. Wray, *Algorithms for Decision Making*, Preprint.## Branch and bound
Mykel J. Kochenderfer, Tim A. Wheeler, and Kyle H. Wray, *Algorithms for Decision Making*, Preprint.## Monte Carlo tree search
Mykel J. Kochenderfer, Tim A. Wheeler, and Kyle H. Wray, *Algorithms for Decision Making*, Preprint.## Huffman coding
David A. Huffman, *A Method for the Construction of Minimum-Redundancy Codes*, IEEE, 1952.## Hailstone sequence (Collatz conjecture)
## Bubble sort
Karey Shi, *Design and Analysis of Algorithms*, Stanford University, 2020.## Merge sort
Karey Shi, *Design and Analysis of Algorithms*, Stanford University, 2020.## Insertion sort
Karey Shi, *Design and Analysis of Algorithms*, Stanford University, 2020.## Bogo sort
##### Bogo sort (one-liner)
## Quine
Nathan Daly, *Julia Discord*, 2019.2---
Written by [Robert Moss](https://github.com/mossr).