An open API service indexing awesome lists of open source software.

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

Awesome Lists containing this project

README

        








documentation



godoc



build_status



coverage_status



license


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 main

import "github.com/MaxHalford/xgp"

func main() {
config := xgp.NewDefaultGPConfig()
estimator := config.NewGP()

estimator.Fit(XTrain, YTrain)
yPred := estimator.Predict()
}
```

### Python

```python
import xgp

model = 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.