https://github.com/maxhalford/xgp
:crystal_ball: Symbolic regression library
https://github.com/maxhalford/xgp
classification evolutionary-algorithms genetic-programming go machine-learning regression symbolic-regression
Last synced: about 2 months ago
JSON representation
:crystal_ball: Symbolic regression library
- Host: GitHub
- URL: https://github.com/maxhalford/xgp
- Owner: MaxHalford
- License: mit
- Created: 2017-07-20T11:34:33.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2018-09-11T12:14:31.000Z (almost 7 years ago)
- Last Synced: 2025-03-13T21:11:22.485Z (4 months ago)
- Topics: classification, evolutionary-algorithms, genetic-programming, go, machine-learning, regression, symbolic-regression
- Language: Go
- Homepage: https://maxhalford.github.io/xgp/
- Size: 2.27 MB
- Stars: 61
- Watchers: 4
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
![]()
XGP is a machine learning library for performing [symbolic regression](https://www.wikiwand.com/en/Symbolic_regression). It can be used both for regression and classification tasks. Please refer to [the documentation](https://maxhalford.github.io/xgp) for an in-depth introduction to symbolic regression.
## Interfaces
The core library is written in Go but it can be used in different ways:
- [Command-line interface (CLI)](https://maxhalford.github.io/xgp/cli/)
- [Go API](https://maxhalford.github.io/xgp/go/)
- [Python API](https://maxhalford.github.io/xgp/python/)## Usage examples
### Command-line interface (CLI)
```sh
>>> xgp fit train.csv
>>> xgp predict test.csv
```### Go
```go
package mainimport "github.com/MaxHalford/xgp"
func main() {
config := xgp.NewDefaultGPConfig()
estimator := config.NewGP()estimator.Fit(XTrain, YTrain)
yPred := estimator.Predict()
}
```### Python
```python
import xgpmodel = xgp.XGPRegressor()
model.fit(X_train, y_train)
y_pred = model.predict(X_test)
```## Dependencies
The core of XGP has the following dependencies.
- [gonum/gonum](https://github.com/gonum/gonum) for [SIMD operations](https://www.wikiwand.com/en/SIMD) and calculating metrics
- [gosuri/uiprogress](https://github.com/gosuri/uiprogress) for displaying progress bars
- [MaxHalford/eaopt](https://github.com/MaxHalford/eaopt) for the genetic algorithm part## License
The MIT License (MIT). Please see the [LICENSE file](LICENSE) for more information.