gplearn-CUDA 0.4.3__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (61) hide show
  1. gplearn_cuda-0.4.3/.github/ISSUE_TEMPLATE/bug_report.md +41 -0
  2. gplearn_cuda-0.4.3/.github/ISSUE_TEMPLATE/feature_request.md +23 -0
  3. gplearn_cuda-0.4.3/.github/pull_request_template.md +13 -0
  4. gplearn_cuda-0.4.3/.github/workflows/build.yml +61 -0
  5. gplearn_cuda-0.4.3/.github/workflows/publish.yml +36 -0
  6. gplearn_cuda-0.4.3/.gitignore +79 -0
  7. gplearn_cuda-0.4.3/.readthedocs.yaml +35 -0
  8. gplearn_cuda-0.4.3/CODE_OF_CONDUCT.md +76 -0
  9. gplearn_cuda-0.4.3/CONTRIBUTING.md +44 -0
  10. gplearn_cuda-0.4.3/LICENSE +30 -0
  11. gplearn_cuda-0.4.3/PKG-INFO +111 -0
  12. gplearn_cuda-0.4.3/README.rst +78 -0
  13. gplearn_cuda-0.4.3/doc/Makefile +177 -0
  14. gplearn_cuda-0.4.3/doc/_static/favicon.ico +0 -0
  15. gplearn_cuda-0.4.3/doc/advanced.rst +405 -0
  16. gplearn_cuda-0.4.3/doc/changelog.rst +146 -0
  17. gplearn_cuda-0.4.3/doc/conf.py +292 -0
  18. gplearn_cuda-0.4.3/doc/contributing.rst +46 -0
  19. gplearn_cuda-0.4.3/doc/cuda_architecture.rst +54 -0
  20. gplearn_cuda-0.4.3/doc/examples.rst +72 -0
  21. gplearn_cuda-0.4.3/doc/gp_examples.ipynb +1438 -0
  22. gplearn_cuda-0.4.3/doc/images/ex1_child.png +0 -0
  23. gplearn_cuda-0.4.3/doc/images/ex1_fig1.png +0 -0
  24. gplearn_cuda-0.4.3/doc/images/ex1_fig2.png +0 -0
  25. gplearn_cuda-0.4.3/doc/images/ex1_fig3.png +0 -0
  26. gplearn_cuda-0.4.3/doc/images/ex3_fig1.png +0 -0
  27. gplearn_cuda-0.4.3/doc/images/ex4_comparison.png +0 -0
  28. gplearn_cuda-0.4.3/doc/images/ex4_tree.png +0 -0
  29. gplearn_cuda-0.4.3/doc/images/gp_ops_crossover.png +0 -0
  30. gplearn_cuda-0.4.3/doc/images/gp_ops_hoist.png +0 -0
  31. gplearn_cuda-0.4.3/doc/images/gp_ops_point.png +0 -0
  32. gplearn_cuda-0.4.3/doc/images/gp_ops_subtree.png +0 -0
  33. gplearn_cuda-0.4.3/doc/images/parallel.png +0 -0
  34. gplearn_cuda-0.4.3/doc/images/syntax_tree.png +0 -0
  35. gplearn_cuda-0.4.3/doc/index.rst +85 -0
  36. gplearn_cuda-0.4.3/doc/installation.rst +62 -0
  37. gplearn_cuda-0.4.3/doc/intro.rst +597 -0
  38. gplearn_cuda-0.4.3/doc/logos/gplearn-wide.png +0 -0
  39. gplearn_cuda-0.4.3/doc/make.bat +242 -0
  40. gplearn_cuda-0.4.3/doc/reference.rst +35 -0
  41. gplearn_cuda-0.4.3/doc/rtd-pip-requirements +6 -0
  42. gplearn_cuda-0.4.3/examples/benchmark.py +82 -0
  43. gplearn_cuda-0.4.3/examples/classifier_cuda.py +52 -0
  44. gplearn_cuda-0.4.3/examples/regressor_cuda.py +54 -0
  45. gplearn_cuda-0.4.3/examples/transformer_cuda.py +56 -0
  46. gplearn_cuda-0.4.3/gplearn/__init__.py +11 -0
  47. gplearn_cuda-0.4.3/gplearn/_program.py +1264 -0
  48. gplearn_cuda-0.4.3/gplearn/fitness.py +201 -0
  49. gplearn_cuda-0.4.3/gplearn/functions.py +197 -0
  50. gplearn_cuda-0.4.3/gplearn/genetic.py +1729 -0
  51. gplearn_cuda-0.4.3/gplearn/tests/__init__.py +0 -0
  52. gplearn_cuda-0.4.3/gplearn/tests/test_cuda.py +73 -0
  53. gplearn_cuda-0.4.3/gplearn/tests/test_estimator_checks.py +41 -0
  54. gplearn_cuda-0.4.3/gplearn/tests/test_examples.py +221 -0
  55. gplearn_cuda-0.4.3/gplearn/tests/test_fitness.py +216 -0
  56. gplearn_cuda-0.4.3/gplearn/tests/test_functions.py +181 -0
  57. gplearn_cuda-0.4.3/gplearn/tests/test_genetic.py +1320 -0
  58. gplearn_cuda-0.4.3/gplearn/tests/test_improvements.py +723 -0
  59. gplearn_cuda-0.4.3/gplearn/tests/test_utils.py +44 -0
  60. gplearn_cuda-0.4.3/gplearn/utils.py +105 -0
  61. gplearn_cuda-0.4.3/pyproject.toml +61 -0
@@ -0,0 +1,41 @@
1
+ ---
2
+ name: Bug report
3
+ about: Create a report to help us improve
4
+ title: ''
5
+ labels: bug
6
+ assignees: ''
7
+
8
+ ---
9
+
10
+ <!-- Thanks for contributing to gplearn!
11
+ Please ensure you have taken a look at the contribution guidelines:
12
+ https://gplearn.readthedocs.io/en/stable/contributing.html -->
13
+
14
+ **Describe the bug**
15
+ <!-- A clear and concise description of what the bug is.-->
16
+
17
+ **Expected behavior**
18
+ <!-- A clear and concise description of what you expected to happen.-->
19
+
20
+ **Actual behavior**
21
+ <!-- Please paste or specifically describe the actual output or traceback.-->
22
+
23
+ **Steps to reproduce the behavior**
24
+ <!--
25
+ ```python
26
+ from gplearn.genetic import [...]
27
+ ```
28
+ If the code is too long, feel free use a public gist : https://gist.github.com
29
+ -->
30
+
31
+ **System information**
32
+ <!--
33
+ Please run the following snippet and paste the output below.
34
+ import platform; print(platform.platform())
35
+ import sys; print("Python", sys.version)
36
+ import numpy; print("NumPy", numpy.__version__)
37
+ import scipy; print("SciPy", scipy.__version__)
38
+ import sklearn; print("Scikit-Learn", sklearn.__version__)
39
+ import joblib; print("Joblib", joblib.__version__)
40
+ import gplearn; print("gplearn", gplearn.__version__)
41
+ -->
@@ -0,0 +1,23 @@
1
+ ---
2
+ name: Feature request
3
+ about: Suggest an idea for this project
4
+ title: ''
5
+ labels: enhancement
6
+ assignees: ''
7
+
8
+ ---
9
+
10
+ <!-- Thanks for contributing to gplearn!
11
+ Please ensure you have taken a look at the contribution guidelines:
12
+ https://gplearn.readthedocs.io/en/stable/contributing.html -->
13
+
14
+ **Is your feature request related to a problem? Please describe.**
15
+ <!-- A clear and concise description of what the problem is.-->
16
+
17
+ **Describe the solution you'd like**
18
+ <!-- A clear and concise description of what you want to happen.-->
19
+
20
+ **Additional context**
21
+ <!-- Add any other context or screenshots about the feature request here.
22
+ If related to a publication, please provide a link to the paper that does not
23
+ require any login or payment.-->
@@ -0,0 +1,13 @@
1
+ <!-- Thanks for contributing to gplearn!
2
+ Please ensure you have taken a look at the contribution guidelines:
3
+ https://gplearn.readthedocs.io/en/stable/contributing.html -->
4
+
5
+ **Reference Issues/PRs**
6
+ <!--
7
+ Example: Fixes #1234. See also #3456.
8
+ Please use keywords (e.g., Fixes) to create link to the issues or pull requests
9
+ you resolved, so that they will automatically be closed when your pull request
10
+ is merged. See https://github.com/blog/1506-closing-issues-via-pull-requests
11
+ -->
12
+
13
+ **What does this implement/fix? Explain your changes.**
@@ -0,0 +1,61 @@
1
+ name: build
2
+
3
+ on:
4
+ schedule:
5
+ # Every friday at 4am UTC
6
+ - cron: '0 4 * * 5'
7
+ push:
8
+ branches: [ main ]
9
+ pull_request:
10
+ branches: [ main ]
11
+
12
+ jobs:
13
+ test:
14
+ strategy:
15
+ fail-fast: false
16
+ matrix:
17
+ os:
18
+ - ubuntu-latest
19
+ python_version:
20
+ - '3.11'
21
+ - '3.12'
22
+ - '3.13'
23
+ - '3.14'
24
+ include:
25
+ - os: windows-latest
26
+ python_version: '3.14'
27
+ - os: ubuntu-latest
28
+ python_version: '3.14'
29
+ coverage: true
30
+ runs-on: ${{ matrix.os }}
31
+
32
+ steps:
33
+ - uses: actions/checkout@v4
34
+ - name: Set up Python ${{ matrix.python_version }} on ${{ matrix.os }}
35
+ uses: actions/setup-python@v5
36
+ with:
37
+ python-version: ${{ matrix.python_version }}
38
+ - name: Install global dependencies
39
+ run: |
40
+ python -m pip install --upgrade pip
41
+ python -m pip install pytest pytest-cov coveralls
42
+ python -m pip install pandas
43
+ - name: Install minimal dependencies
44
+ if: ${{ matrix.python_version == '3.11' }}
45
+ run: python -m pip install scikit-learn==1.8.0 joblib==1.3.0
46
+ - name: Install gplearn
47
+ run: python -m pip install .
48
+ - name: Describe Python environment
49
+ run: |
50
+ python --version
51
+ python -c "import sklearn; print('sklearn %s' % sklearn.__version__)"
52
+ python -c "import joblib; print('joblib %s' % joblib.__version__)"
53
+ python -c "import numpy; print('numpy %s' % numpy.__version__)"
54
+ python -c "import scipy; print('scipy %s' % scipy.__version__)"
55
+ - name: Test with pytest
56
+ run: pytest -v --cov
57
+ - name: Coverage
58
+ if: ${{ matrix.coverage }}
59
+ env:
60
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
61
+ run: coveralls --service=github
@@ -0,0 +1,36 @@
1
+ name: Publish Python 🐍 distribution 📦 to PyPI
2
+
3
+ on:
4
+ release:
5
+ types: [published]
6
+
7
+ jobs:
8
+ build-n-publish:
9
+ name: Build and publish Python 📦 to PyPI
10
+ environment: "publishing env"
11
+ runs-on: ubuntu-latest
12
+ permissions:
13
+ id-token: write # IMPORTANT: mandatory for trusted publishing
14
+ contents: read
15
+
16
+ steps:
17
+ - name: Checkout source
18
+ uses: actions/checkout@v4
19
+
20
+ - name: Set up Python
21
+ uses: actions/setup-python@v5
22
+ with:
23
+ python-version: "3.x"
24
+
25
+ - name: Install pypa/build
26
+ run: >-
27
+ python -m
28
+ pip install
29
+ build
30
+ --user
31
+
32
+ - name: Build a binary wheel and a source tarball
33
+ run: python -m build
34
+
35
+ - name: Publish package distributions to PyPI
36
+ uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,79 @@
1
+ # Hidden files
2
+ *~
3
+ .#*
4
+ .DS_Store
5
+
6
+ # Byte-compiled / optimized / DLL files
7
+ __pycache__/
8
+ *.py[cod]
9
+
10
+ # C extensions
11
+ *.so
12
+
13
+ # Distribution / packaging
14
+ .Python
15
+ env/
16
+ .venv/
17
+ uv.lock
18
+ build/
19
+ develop-eggs/
20
+ dist/
21
+ downloads/
22
+ eggs/
23
+ .eggs/
24
+ lib/
25
+ lib64/
26
+ parts/
27
+ sdist/
28
+ var/
29
+ *.egg-info/
30
+ .installed.cfg
31
+ setup.cfg
32
+ *.egg
33
+ .ipynb_checkpoints/
34
+ .vscode/
35
+
36
+ # PyInstaller
37
+ # Usually these files are written by a python script from a terminal
38
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
39
+ *.manifest
40
+ *.spec
41
+
42
+ # Installer logs
43
+ pip-log.txt
44
+ pip-delete-this-directory.txt
45
+
46
+ # Unit test / coverage reports
47
+ htmlcov/
48
+ .tox/
49
+ .coverage*
50
+ .cache
51
+ .pytest_cache/
52
+ .mypy_cache/
53
+ .ruff_cache/
54
+ .cupy/
55
+ nosetests.xml
56
+ coverage.xml
57
+ /.idea/
58
+ .idea/*
59
+ .idea/workspace.xml
60
+
61
+ # Translations
62
+ *.mo
63
+ *.pot
64
+
65
+ # Django stuff:
66
+ *.log
67
+
68
+ # Sphinx documentation
69
+ doc/_build/
70
+
71
+ # PyBuilder
72
+ target/
73
+
74
+ # Local project files
75
+ GEMINI.md
76
+ GPU_ACCELERATION_PLAN.md
77
+
78
+ # Build logs
79
+ logs/
@@ -0,0 +1,35 @@
1
+ # Read the Docs configuration file for Sphinx projects
2
+ # See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
3
+
4
+ # Required
5
+ version: 2
6
+
7
+ # Set the OS, Python version and other tools you might need
8
+ build:
9
+ os: ubuntu-24.04
10
+ tools:
11
+ python: "3.12"
12
+ # You can also specify other tool versions:
13
+ # nodejs: "20"
14
+ # rust: "1.70"
15
+ # golang: "1.20"
16
+
17
+ # Build documentation in the "docs/" directory with Sphinx
18
+ sphinx:
19
+ configuration: doc/conf.py
20
+ # You can configure Sphinx to use a different builder, for instance use the dirhtml builder for simpler URLs
21
+ # builder: "dirhtml"
22
+ # Fail on all warnings to avoid broken references
23
+ # fail_on_warning: true
24
+
25
+ # Optionally build your docs in additional formats such as PDF and ePub
26
+ # formats:
27
+ # - pdf
28
+ # - epub
29
+
30
+ # Optional but recommended, declare the Python requirements required
31
+ # to build your documentation
32
+ # See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
33
+ python:
34
+ install:
35
+ - requirements: doc/rtd-pip-requirements
@@ -0,0 +1,76 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ In the interest of fostering an open and welcoming environment, we as
6
+ contributors and maintainers pledge to making participation in our project and
7
+ our community a harassment-free experience for everyone, regardless of age, body
8
+ size, disability, ethnicity, sex characteristics, gender identity and expression,
9
+ level of experience, education, socio-economic status, nationality, personal
10
+ appearance, race, religion, or sexual identity and orientation.
11
+
12
+ ## Our Standards
13
+
14
+ Examples of behavior that contributes to creating a positive environment
15
+ include:
16
+
17
+ * Using welcoming and inclusive language
18
+ * Being respectful of differing viewpoints and experiences
19
+ * Gracefully accepting constructive criticism
20
+ * Focusing on what is best for the community
21
+ * Showing empathy towards other community members
22
+
23
+ Examples of unacceptable behavior by participants include:
24
+
25
+ * The use of sexualized language or imagery and unwelcome sexual attention or
26
+ advances
27
+ * Trolling, insulting/derogatory comments, and personal or political attacks
28
+ * Public or private harassment
29
+ * Publishing others' private information, such as a physical or electronic
30
+ address, without explicit permission
31
+ * Other conduct which could reasonably be considered inappropriate in a
32
+ professional setting
33
+
34
+ ## Our Responsibilities
35
+
36
+ Project maintainers are responsible for clarifying the standards of acceptable
37
+ behavior and are expected to take appropriate and fair corrective action in
38
+ response to any instances of unacceptable behavior.
39
+
40
+ Project maintainers have the right and responsibility to remove, edit, or
41
+ reject comments, commits, code, wiki edits, issues, and other contributions
42
+ that are not aligned to this Code of Conduct, or to ban temporarily or
43
+ permanently any contributor for other behaviors that they deem inappropriate,
44
+ threatening, offensive, or harmful.
45
+
46
+ ## Scope
47
+
48
+ This Code of Conduct applies both within project spaces and in public spaces
49
+ when an individual is representing the project or its community. Examples of
50
+ representing a project or community include using an official project e-mail
51
+ address, posting via an official social media account, or acting as an appointed
52
+ representative at an online or offline event. Representation of a project may be
53
+ further defined and clarified by project maintainers.
54
+
55
+ ## Enforcement
56
+
57
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
58
+ reported by contacting the project team at @trevorstephens. All
59
+ complaints will be reviewed and investigated and will result in a response that
60
+ is deemed necessary and appropriate to the circumstances. The project team is
61
+ obligated to maintain confidentiality with regard to the reporter of an incident.
62
+ Further details of specific enforcement policies may be posted separately.
63
+
64
+ Project maintainers who do not follow or enforce the Code of Conduct in good
65
+ faith may face temporary or permanent repercussions as determined by other
66
+ members of the project's leadership.
67
+
68
+ ## Attribution
69
+
70
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71
+ available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
72
+
73
+ [homepage]: https://www.contributor-covenant.org
74
+
75
+ For answers to common questions about this code of conduct, see
76
+ https://www.contributor-covenant.org/faq
@@ -0,0 +1,44 @@
1
+ Contributing
2
+ ============
3
+
4
+ ``gplearn-CUDA`` welcomes your contributions! Whether it is a bug report, bug fix,
5
+ new feature or documentation enhancements, please help to improve the project!
6
+
7
+ In general, please follow the
8
+ [scikit-learn contribution guidelines](http://scikit-learn.org/stable/developers/contributing.html)
9
+ for how to contribute to an open-source project.
10
+
11
+ If you would like to open a bug report, please [open one here](https://github.com/LGA-Personal/gplearn-CUDA/issues).
12
+ Please try to provide a [Short, Self Contained, Example](http://sscce.org/)
13
+ so that the root cause can be pinned down and corrected more easily.
14
+
15
+ If you would like to contribute a new feature or fix an existing bug, the basic
16
+ workflow to follow (as detailed more at the scikit-learn link above) is:
17
+
18
+ - [Open an issue](https://github.com/LGA-Personal/gplearn-CUDA/issues) with what
19
+ you would like to contribute to the project and its merits. Some features may
20
+ be out of scope for ``gplearn-CUDA``, so be sure to get the go-ahead before
21
+ working on something that is outside of the project's goals.
22
+ - Fork the ``gplearn-CUDA`` repository, clone it locally, and create your new feature
23
+ branch.
24
+ - Make your code changes on the branch, commit them, and push to your fork.
25
+ - Open a pull request.
26
+
27
+ Please ensure that:
28
+
29
+ - Only data-dependent arguments should be passed to the fit/transform methods
30
+ (``X``, ``y``, ``sample_weight``), and conversely, no data should be passed to the
31
+ estimator initialization.
32
+ - No input validation occurs before fitting the estimator.
33
+ - Any new feature has great test coverage.
34
+ - Any new feature is well documented with
35
+ [numpy-style docstrings](https://numpydoc.readthedocs.io/en/latest/format.html#docstring-standard)
36
+ & an example, if appropriate and illustrative.
37
+ - Any bug fix has regression tests.
38
+ - Comply with [PEP8](https://pypi.python.org/pypi/pep8).
39
+
40
+ Currently ``gplearn-CUDA`` uses [GitHub workflows](https://github.com/LGA-Personal/gplearn-CUDA/actions/workflows/build.yml)
41
+ for testing, [Coveralls](https://coveralls.io/github/LGA-Personal/gplearn-CUDA)
42
+ for code coverage reports, and [Codacy](https://app.codacy.com/gh/LGA-Personal/gplearn-CUDA/dashboard)
43
+ for code quality checks. These applications should automatically run on your
44
+ new pull request to give you guidance on any problems in the new code.
@@ -0,0 +1,30 @@
1
+ BSD 3-Clause License
2
+
3
+ Copyright (c) 2015-2026, Trevor Stephens (Original Work)
4
+ Copyright (c) 2026, LGA-Personal (CUDA Extension)
5
+ All rights reserved.
6
+
7
+ Redistribution and use in source and binary forms, with or without
8
+ modification, are permitted provided that the following conditions are met:
9
+
10
+ * Redistributions of source code must retain the above copyright notice, this
11
+ list of conditions and the following disclaimer.
12
+
13
+ * Redistributions in binary form must reproduce the above copyright notice,
14
+ this list of conditions and the following disclaimer in the documentation
15
+ and/or other materials provided with the distribution.
16
+
17
+ * Neither the name of gplearn-CUDA nor the names of its
18
+ contributors may be used to endorse or promote products derived from
19
+ this software without specific prior written permission.
20
+
21
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
22
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
24
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
25
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
27
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
28
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
29
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@@ -0,0 +1,111 @@
1
+ Metadata-Version: 2.4
2
+ Name: gplearn-CUDA
3
+ Version: 0.4.3
4
+ Summary: GPU-accelerated Genetic Programming in Python (CUDA extension of gplearn)
5
+ Project-URL: homepage, https://github.com/LGA-Personal/gplearn-CUDA
6
+ Project-URL: source, https://github.com/LGA-Personal/gplearn-CUDA
7
+ Project-URL: tracker, https://github.com/LGA-Personal/gplearn-CUDA/issues
8
+ Author-email: Trevor Stephens <trev.stephens@gmail.com>
9
+ License-Expression: BSD-3-Clause
10
+ License-File: LICENSE
11
+ Classifier: Development Status :: 3 - Alpha
12
+ Classifier: Intended Audience :: Developers
13
+ Classifier: Intended Audience :: Science/Research
14
+ Classifier: License :: OSI Approved :: BSD License
15
+ Classifier: Operating System :: MacOS
16
+ Classifier: Operating System :: Microsoft :: Windows
17
+ Classifier: Operating System :: Unix
18
+ Classifier: Programming Language :: Python
19
+ Classifier: Programming Language :: Python :: 3
20
+ Classifier: Programming Language :: Python :: 3.11
21
+ Classifier: Programming Language :: Python :: 3.12
22
+ Classifier: Programming Language :: Python :: 3.13
23
+ Classifier: Programming Language :: Python :: 3.14
24
+ Classifier: Topic :: Scientific/Engineering
25
+ Classifier: Topic :: Software Development
26
+ Requires-Python: >=3.11
27
+ Requires-Dist: joblib>=1.3.0
28
+ Requires-Dist: numpy>=1.24.0
29
+ Requires-Dist: scikit-learn>=1.8.0
30
+ Provides-Extra: cuda
31
+ Requires-Dist: cupy-cuda12x>=13.0.0; extra == 'cuda'
32
+ Description-Content-Type: text/x-rst
33
+
34
+ .. image:: https://github.com/LGA-Personal/gplearn-CUDA/actions/workflows/build.yml/badge.svg
35
+ :target: https://github.com/LGA-Personal/gplearn-CUDA/actions/workflows/build.yml
36
+ :alt: Build Status
37
+ .. image:: https://img.shields.io/github/v/release/LGA-Personal/gplearn-CUDA.svg
38
+ :target: https://github.com/LGA-Personal/gplearn-CUDA/releases
39
+ :alt: Version
40
+ .. image:: https://img.shields.io/github/license/LGA-Personal/gplearn-CUDA.svg
41
+ :target: https://github.com/LGA-Personal/gplearn-CUDA/blob/main/LICENSE
42
+ :alt: License
43
+ .. image:: https://readthedocs.org/projects/gplearn-cuda/badge/?version=stable
44
+ :target: http://gplearn-cuda.readthedocs.io/
45
+ :alt: Documentation Status
46
+
47
+ |
48
+
49
+ Welcome to gplearn-CUDA!
50
+ ========================
51
+
52
+ `gplearn-CUDA` implements GPU-accelerated Genetic Programming in Python, with a
53
+ `scikit-learn <http://scikit-learn.org>`_ inspired and compatible API.
54
+
55
+ **This project is a high-performance extension of the original** `gplearn <https://github.com/trevorstephens/gplearn>`_
56
+ **library developed by Trevor Stephens.** It maintains all the original
57
+ functionality while introducing massive parallelization via NVIDIA CUDA.
58
+
59
+ Overview
60
+ --------
61
+
62
+ While Genetic Programming (GP) can be used to perform a `very wide variety of tasks <http://www.genetic-programming.org/combined.php>`_, gplearn-CUDA is purposefully constrained to solving symbolic regression problems. This is motivated by the scikit-learn ethos, of having powerful estimators that are straight-forward to implement.
63
+
64
+ Symbolic regression is a machine learning technique that aims to identify an underlying mathematical expression that best describes a relationship.
65
+
66
+ CUDA Acceleration
67
+ -----------------
68
+
69
+ The core contribution of ``gplearn-CUDA`` is high-performance **GPU acceleration**
70
+ via NVIDIA CUDA. By setting ``device='cuda'``, the library utilizes a custom
71
+ virtual machine interpreter on the GPU to achieve **2x–4x speedups** on massive
72
+ datasets and large populations.
73
+
74
+ .. code-block:: python
75
+
76
+ from gplearn.genetic import SymbolicRegressor
77
+ # Enable CUDA acceleration
78
+ est = SymbolicRegressor(device='cuda', population_size=5000)
79
+ est.fit(X, y)
80
+
81
+ Installation
82
+ ------------
83
+
84
+ ``gplearn-CUDA`` requires a recent version of scikit-learn. The CUDA acceleration
85
+ is compatible with **CUDA 11.2 through 13.x**.
86
+
87
+ To install the GPU-enabled version via pip (targeting CUDA 12.x by default)::
88
+
89
+ pip install gplearn-CUDA[cuda]
90
+
91
+ For other CUDA versions or Conda installation, please see the
92
+ `Installation Guide <http://gplearn-cuda.readthedocs.io/en/stable/installation.html>`_.
93
+
94
+ License & Credits
95
+ -----------------
96
+
97
+ ``gplearn-CUDA`` is released under the **BSD 3-Clause License**, following the
98
+ licensing of the original project.
99
+
100
+ * Original Author: **Trevor Stephens** (`@trevorstephens <https://github.com/trevorstephens>`_)
101
+ * CUDA Extension: **LGA-Personal**
102
+
103
+ For the latest development version, first get the source from github::
104
+
105
+ git clone https://github.com/LGA-Personal/gplearn-CUDA.git
106
+
107
+ Then navigate into the local directory and simply run::
108
+
109
+ pip install .
110
+
111
+ If you come across any issues in running or installing the package, `please submit a bug report <https://github.com/LGA-Personal/gplearn-CUDA/issues>`_.
@@ -0,0 +1,78 @@
1
+ .. image:: https://github.com/LGA-Personal/gplearn-CUDA/actions/workflows/build.yml/badge.svg
2
+ :target: https://github.com/LGA-Personal/gplearn-CUDA/actions/workflows/build.yml
3
+ :alt: Build Status
4
+ .. image:: https://img.shields.io/github/v/release/LGA-Personal/gplearn-CUDA.svg
5
+ :target: https://github.com/LGA-Personal/gplearn-CUDA/releases
6
+ :alt: Version
7
+ .. image:: https://img.shields.io/github/license/LGA-Personal/gplearn-CUDA.svg
8
+ :target: https://github.com/LGA-Personal/gplearn-CUDA/blob/main/LICENSE
9
+ :alt: License
10
+ .. image:: https://readthedocs.org/projects/gplearn-cuda/badge/?version=stable
11
+ :target: http://gplearn-cuda.readthedocs.io/
12
+ :alt: Documentation Status
13
+
14
+ |
15
+
16
+ Welcome to gplearn-CUDA!
17
+ ========================
18
+
19
+ `gplearn-CUDA` implements GPU-accelerated Genetic Programming in Python, with a
20
+ `scikit-learn <http://scikit-learn.org>`_ inspired and compatible API.
21
+
22
+ **This project is a high-performance extension of the original** `gplearn <https://github.com/trevorstephens/gplearn>`_
23
+ **library developed by Trevor Stephens.** It maintains all the original
24
+ functionality while introducing massive parallelization via NVIDIA CUDA.
25
+
26
+ Overview
27
+ --------
28
+
29
+ While Genetic Programming (GP) can be used to perform a `very wide variety of tasks <http://www.genetic-programming.org/combined.php>`_, gplearn-CUDA is purposefully constrained to solving symbolic regression problems. This is motivated by the scikit-learn ethos, of having powerful estimators that are straight-forward to implement.
30
+
31
+ Symbolic regression is a machine learning technique that aims to identify an underlying mathematical expression that best describes a relationship.
32
+
33
+ CUDA Acceleration
34
+ -----------------
35
+
36
+ The core contribution of ``gplearn-CUDA`` is high-performance **GPU acceleration**
37
+ via NVIDIA CUDA. By setting ``device='cuda'``, the library utilizes a custom
38
+ virtual machine interpreter on the GPU to achieve **2x–4x speedups** on massive
39
+ datasets and large populations.
40
+
41
+ .. code-block:: python
42
+
43
+ from gplearn.genetic import SymbolicRegressor
44
+ # Enable CUDA acceleration
45
+ est = SymbolicRegressor(device='cuda', population_size=5000)
46
+ est.fit(X, y)
47
+
48
+ Installation
49
+ ------------
50
+
51
+ ``gplearn-CUDA`` requires a recent version of scikit-learn. The CUDA acceleration
52
+ is compatible with **CUDA 11.2 through 13.x**.
53
+
54
+ To install the GPU-enabled version via pip (targeting CUDA 12.x by default)::
55
+
56
+ pip install gplearn-CUDA[cuda]
57
+
58
+ For other CUDA versions or Conda installation, please see the
59
+ `Installation Guide <http://gplearn-cuda.readthedocs.io/en/stable/installation.html>`_.
60
+
61
+ License & Credits
62
+ -----------------
63
+
64
+ ``gplearn-CUDA`` is released under the **BSD 3-Clause License**, following the
65
+ licensing of the original project.
66
+
67
+ * Original Author: **Trevor Stephens** (`@trevorstephens <https://github.com/trevorstephens>`_)
68
+ * CUDA Extension: **LGA-Personal**
69
+
70
+ For the latest development version, first get the source from github::
71
+
72
+ git clone https://github.com/LGA-Personal/gplearn-CUDA.git
73
+
74
+ Then navigate into the local directory and simply run::
75
+
76
+ pip install .
77
+
78
+ If you come across any issues in running or installing the package, `please submit a bug report <https://github.com/LGA-Personal/gplearn-CUDA/issues>`_.