genetic-algorithm
Tensor
genetic-algorithm | Tensor | |
---|---|---|
2 | 2 | |
0 | 82 | |
- | - | |
10.0 | 0.0 | |
over 1 year ago | almost 3 years ago | |
PHP | PHP | |
MIT License | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
genetic-algorithm
-
Genetic Algorithms in PHP
Interesting solution! I think you'd find the code would run a lot faster if you built up a node-map of the distances between each node rather than calculating this at every step. I've got a Genetic Algorithm library that allows for abstractions, which completes in about 10s. You'd also find better response times running this on the command line rather than using a browser for this. Great work though!
-
Machine Learning with PHP? Challenge accepted!
Yeah agreed, I wrote an example Genetic Algorithm library (https://github.com/nathansalter/genetic-algorithm/blob/master/examples/tsp.php) years and years ago, worked absolutely fine with a reasonable execution time. I would say that for any workload that's CPU bound PHP is just as good as any other language. Memory bound problems often have better languages for performance.
Tensor
-
Machine Learning with PHP? Challenge accepted!
There's nothing stopping PHP using the GPU other than nobody having written bindings to the appropriate libraries. Compare https://github.com/RubixML/Tensor for example, which provides bindings to LAPACK and OpenBLAS and will already provide a massive speed boost for linear algebra operations. They aren't GPU accelerated, but all* that's needed is a similar extension with (e.g.) cuBLAS bindings.
-
Phalcon Roadmap
Note that this particular technique has been used by our friends at RubixML and it works just fine.
What are some alternatives?
brainy - A simple PHP class for machine learning
phpsci-carray - [ARCHIVED] PHP library for scientific computing powered by C. See https://github.com/NumPower/numpower
Math PHP - Powerful modern math library for PHP: Features descriptive statistics and regressions; Continuous and discrete probability distributions; Linear algebra with matrices and vectors, Numerical analysis; special mathematical functions; Algebra
Zephir - Zephir is a compiled high-level language aimed to ease the creation of C-extensions for PHP
JOLI.jl - Julia Operators LIbrary
finnmath - Mathematical library
Phalcon - High performance, full-stack PHP framework delivered as a C extension.
Psalm - A static analysis tool for finding errors in PHP applications
statistics - PHP package that provides functions for calculating mathematical statistics of numeric data.