Warning
nntm can only be used with the v3 dataset for now
A set of modules for the Numerai tournament.
pip install nntm==1.6.2
from getpass import getpass
from nntm.datasets import (
fetch_numerai_training,
fetch_numerai_tournament,
submit_numerai_tournament,
COLUMN_NAMES_SMALL,
)
from sklearn.linear_model import LinearRegression
# Leave some columns out to save RAM
columns = COLUMN_NAMES_SMALL
# Fit
X_train, y_train = fetch_numerai_training(return_X_y=True, columns=columns)
model = LinearRegression()
model.fit(X_train, y_train)
# Predict
X_tourn, _ = fetch_numerai_tournament(return_X_y=True, columns=columns)
y_pred = model.predict(X_tourn)
# Submit
model_id = input("Model ID (numer.ai/models):")
public_id = input("API Key Public ID (numer.ai/account):")
secret_key = getpass("API Key Secret (numer.ai/account):")
submit_numerai_tournament(
y_pred, model_id=model_id, public_id=public_id, secret_key=secret_key
)
pytest
apt-get install -y python3-sphinx
pip install -r docs/requirements.txt
pip install .
cd docs
sphinx-apidoc -f -o source/ ../src/nntm/
make html