Skip to main content

Numerai tournament toolbox written in Python

Project description

Numerox is a Numerai tournament toolbox written in Python.

All you have to do is create a model. Take a look at model for examples.

Once you have a model numerox will do the rest. First download the Numerai dataset and then load it:

>>> import numerox as nx
>>> data = nx.download('numerai_dataset.zip')

Let’s use the logistic regression model in numerox to run 5-fold cross validation on the training data:

>>> model = nx.logistic()
>>> prediction = nx.backtest(model, data, tournament='bernie', verbosity=1)
logistic(inverse_l2=0.0001)
       logloss     auc     acc    ystd   stats
mean  0.692885  0.5165  0.5116  0.0056   tourn  bernie
std   0.000536  0.0281  0.0215  0.0003  region   train
min   0.691360  0.4478  0.4540  0.0050    eras     120
max   0.694202  0.5944  0.5636  0.0061  consis   0.625

OK, results are good enough for a demo so let’s make a submission file for the tournament. We will fit the model on the train data and make our predictions for the tournament data:

>>> prediction = nx.production(model, data, 'bernie', verbosity=1)
logistic(inverse_l2=0.0001)
       logloss     auc     acc    ystd   stats
mean  0.692808  0.5194  0.5142  0.0063   tourn      bernie
std   0.000375  0.0168  0.0137  0.0001  region  validation
min   0.691961  0.4903  0.4925  0.0062    eras          12
max   0.693460  0.5553  0.5342  0.0064  consis        0.75

Let’s upload our predictions to enter the tournament:

>>> prediction.to_csv('logistic.csv')
>>> upload_id, status = nx.upload('logistic.csv', 'bernie',
                                  public_id, secret_key)
metric                  value   minutes
concordance              True   0.0898
consistency              0.75   0.0898
originality             False   0.1783
validation_logloss     0.6928   0.1783
stakeable                True   0.1783

Examples

Have a look at the examples.

Install

Install with pip:

$ pip install numerox

After you have installed numerox, run the unit tests (please report any failures):

>>> import numerox as nx
>>> nx.test()

Requirements: numpy, scipy, pandas, sklearn, pytables, numerapi, setuptools, requests, nose.

Resources

License

Numerox is distributed under the the GPL v3+. See LICENSE file for details. Where indicated by code comments parts of NumPy are included in numerox. The NumPy license appears in the licenses directory.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

numerox-4.1.1.tar.gz (1.8 MB view details)

Uploaded Source

Built Distribution

numerox-4.1.1-py3-none-any.whl (1.8 MB view details)

Uploaded Python 3

File details

Details for the file numerox-4.1.1.tar.gz.

File metadata

  • Download URL: numerox-4.1.1.tar.gz
  • Upload date:
  • Size: 1.8 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.20.1 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3

File hashes

Hashes for numerox-4.1.1.tar.gz
Algorithm Hash digest
SHA256 fa35b3d119e7115239eb2b2fd80dcff7ffdcaee2df85b994de35fb2d6a4c895e
MD5 78f03fc2f1234a5f0440d2d948968422
BLAKE2b-256 645e0a64ea334a8fccb5f772f6b42bfb05401840af3069006b0ac65d02d27716

See more details on using hashes here.

Provenance

File details

Details for the file numerox-4.1.1-py3-none-any.whl.

File metadata

  • Download URL: numerox-4.1.1-py3-none-any.whl
  • Upload date:
  • Size: 1.8 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.20.1 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3

File hashes

Hashes for numerox-4.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2d5fd1a34e30e07c4b1e2805eb1b879076ff158c41d22374ef779b41b4d881dc
MD5 e7c04502ea77f91a17e1bf22e614e4cf
BLAKE2b-256 462d939a7060764bde09c932dab67066fee00d48627584e7fa856610cfb2199c

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page