Skip to main content

Numerox is a 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.py 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
>>> nx.download_dataset('numerai_dataset.zip')
>>> data = nx.load_zip('numerai_dataset.zip')
>>> data
region    live, test, train, validation
rows      884544
era       98, [era1, eraX]
x         50, min 0.0000, mean 0.4993, max 1.0000
y         mean 0.499961, fraction missing 0.3109

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

>>> model = nx.model.logistic()
>>> prediction = nx.backtest(model, data, verbosity=1)
logistic(inverse_l2=1e-05)
      logloss   auc     acc     ystd
mean  0.692974  0.5226  0.5159  0.0023  |  region   train
std   0.000224  0.0272  0.0205  0.0002  |  eras     85
min   0.692360  0.4550  0.4660  0.0020  |  consis   0.7647
max   0.693589  0.5875  0.5606  0.0027  |  75th     0.6931

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)
logistic(inverse_l2=1e-05)
      logloss   auc     acc     ystd
mean  0.692993  0.5157  0.5115  0.0028  |  region   validation
std   0.000225  0.0224  0.0172  0.0000  |  eras     12
min   0.692440  0.4853  0.4886  0.0028  |  consis   0.7500
max   0.693330  0.5734  0.5555  0.0028  |  75th     0.6931
>>> prediction.to_csv('logistic.csv')  # 6 decimal places by default

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: python, setuptools, numpy, pandas, pytables, sklearn, requests, nose.

Resources

License

Numerox is distributed under the the GPL v3+. See LICENSE file for details.

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-0.0.4.tar.gz (3.5 MB view details)

Uploaded Source

File details

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

File metadata

  • Download URL: numerox-0.0.4.tar.gz
  • Upload date:
  • Size: 3.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for numerox-0.0.4.tar.gz
Algorithm Hash digest
SHA256 09f9b91900224d7324412c6e95f733691108c13b89a174b322ca522984966ec5
MD5 bfa9d39a4102b526bd7ff207dafd0f90
BLAKE2b-256 f8ae5f0d862fb95d4d07f6740d043cee7a22f054230bb43ea0f0c91dd61fde20

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