xgp

command
v0.0.0-...-8433fb5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 11, 2018 License: MIT Imports: 1 Imported by: 0

README

Command-line interface (CLI)

If you're looking for documentation then please refer to the website.

Examples

To generate the datasets for the following examples you need to have Python alongside with pandas and scikit-learn. The versions do not really matter.

For development you can replace xgp with go run main.go. For example instead of running xgp fit examples/boston/train.csv --loss mae you can run go run main.go fit examples/boston/train.csv --loss mae.

Boston house prices
>>> python examples/boston/create_datasets.py
>>> xgp fit examples/boston/train.csv --val examples/boston/test.csv --loss mae --seed 42 --indis 50 --gens 30
>>> xgp predict examples/boston/test.csv
gplearn polynomial example

This example is derived from gplearn's documentation. The function to approximate is a trivial and is only here for show.

>>> python examples/gplearn/create_datasets.py
>>> xgp fit examples/gplearn/train.csv --loss mae
>>> xgp score examples/gplearn/test.csv --eval mae
Titanic survivors

The data munging is adapted from this Kaggle kernel. Download the data from here and put it in the examples/titanic/kaggle directory.

>>> python examples/titanic/create_datasets.py
>>> xgp fit examples/titanic/train.csv --loss logloss --eval accuracy --val examples/titanic/val.csv --target Survived --ignore PassengerId --parsimony 0.001 --gens 64 --indis 256 --funcs add,sub,mul,div,cos,sin,min,max
>>> xgp predict examples/titanic/test.csv --output examples/titanic/submission.csv --keep PassengerId --target Survived

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL