pyGP | A Python symbolic regression program

 by   StarshipEngineer Python Version: Current License: No License

kandi X-RAY | pyGP Summary

kandi X-RAY | pyGP Summary

pyGP is a Python library. pyGP has no bugs, it has no vulnerabilities, it has build file available and it has low support. You can download it from GitHub.

PyGP is a genetic programming library for Python 3, written primarily for symbolic regression applications and based on the genetic programming principles outlined in A Field Guide to Genetic Programming by Poli, Langdon, and McPhee. It contains classes and functions for implementing a basic genetic programming implementation, a demo module demonstrating a GP run, and a command-line GP module for symbolic regression via the CLI. The latter two modules are scripts that can be executed from within their home directories by system shell commands, command-line Python, or a Python IDE. The pyGP library contains four modules for user use. The main pygp module contains the classes and functions needed for a simple GP program. The primitives module contains a preset primitive set for use in programs. The majorelements module contains functions which serve as larger components of a GP program, such as population initialization and an evolution loop. Lastly, the tools module contains functions which can be used at the top level to handle data for the user. The demo directory contains the demo module, which demonstrates a run of GP and is liberally commented to explain the basics of a run. The directory also contains .csv files of sample data, which the demo module can use to find a solution function that matches the data they contain. The cli-gp directory contains a symbolic regression program module which accepts user-defined control parameters of the GP run and displays its progress via the command line. Finally, the tests directory contains various scripts for testing components of the library. At present, the function set of the library and demo/cli-gp programs encompasses Python's five built-in arity-2 mathematical operators, the four arithmetic operators addition ( + ), subtraction ( - ), multiplication( * ), and division ( / ), plus the exponentiation operator ( ** ). The terminal set includes the constants pi, e, and random constants in the range [0.0,1.0), plus whatever independent variables are entered by the user (which correspond to columns in a dataset). The provided programs compose polynomial and exponential solutions to provided datasets. A run may return an exact solution if the solution can be represented this way, but in general this cannot be guaranteed, and a run will return the closest possible approximate solution which can be constructed using arithmetic and exponential operations. ####General Use of GP Programs. The intended function of the demo and cli-gp programs is to construct the best possible solution to a set of numeric data. These programs are run as scripts from within their enclosing directories, and accept this data in the form of a .csv file located in the same directory; for n independent variables, this file must have n+1 columns of values, one column for each dependent variable and a column for dependent variable values, which must be the rightmost column. Each row should have a value for each of the problem's independent variables, and a value of the dependent variable corresponding to those independent variable values. The user will enter a name for each of the independent variables, either in the command line when running cli-gp or into the module file as a string when running demo. There are no particular restrictions on the names of these variables, but they must be entered in the same left-to-right order as their corresponding columns in the .csv file- otherwise a run may return a solution expression where some of the variable names are transposed. The user will also enter values for the various parameters of the GP run. Once engaged, the run will proceed to evolve solutions and when one with a fitness below the target fitness is found, it will be returned and the run will be terminated.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              pyGP has a low active ecosystem.
              It has 7 star(s) with 0 fork(s). There are 3 watchers for this library.
              OutlinedDot
              It had no major release in the last 6 months.
              There are 2 open issues and 0 have been closed. On average issues are closed in 1853 days. There are no pull requests.
              It has a neutral sentiment in the developer community.
              The latest version of pyGP is current.

            kandi-Quality Quality

              pyGP has no bugs reported.

            kandi-Security Security

              pyGP has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.

            kandi-License License

              pyGP does not have a standard license declared.
              Check the repository for any license declaration and review the terms closely.
              OutlinedDot
              Without a license, all rights are reserved, and you cannot use the library in your applications.

            kandi-Reuse Reuse

              pyGP releases are not available. You will need to build from source code and install.
              Build file is available. You can build the component from source.

            Top functions reviewed by kandi - BETA

            kandi has reviewed pyGP and discovered the below as its top functions. This is intended to give you an instant insight into pyGP implemented functionality, and help decide if they suit your requirements.
            • Perform a mutation of a subtree
            • Return the subtree of this tree
            • Pad a node n with the same size
            • Fill the subtree of the subtree
            • Crossover two trees
            • Returns the size of the next level of k
            • Return a random node
            • Replace all nodes in the subtree
            • Returns the best fitness for a population
            • Calculate fitness for a given dataset
            • Build a binary program
            • Return the left child of a node
            • Return True if the node has no children
            • Perform reproduction of a population
            • Takes a population from a population and returns it
            • Evolve a population
            • Return a list of items
            • Create ramped trees
            • Return the right child of node n
            Get all kandi verified functions for this library.

            pyGP Key Features

            No Key Features are available at this moment for pyGP.

            pyGP Examples and Code Snippets

            No Code Snippets are available at this moment for pyGP.

            Community Discussions

            Trending Discussions on pyGP

            QUESTION

            Wrapping C++ class in Python with SWIG
            Asked 2017-May-14 at 21:23

            I have the following C++ class that I wish to wrap in Python with SWIG.

            ...

            ANSWER

            Answered 2017-May-14 at 12:41

            If look into the examples in the numpy.i header, you will see examples of how to apply the NumPy typemaps.

            In your case, you should change

            Source https://stackoverflow.com/questions/43954870

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install pyGP

            You can download it from GitHub.
            You can use pyGP like any standard Python library. You will need to make sure that you have a development environment consisting of a Python distribution including header files, a compiler, pip, and git installed. Make sure that your pip, setuptools, and wheel are up to date. When using pip it is generally recommended to install packages in a virtual environment to avoid changes to the system.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/StarshipEngineer/pyGP.git

          • CLI

            gh repo clone StarshipEngineer/pyGP

          • sshUrl

            git@github.com:StarshipEngineer/pyGP.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link