Skip to main content

Python client for Forbin API

Project description

api-python-client

Installation

pip install forbin

Use

from forbin.client import Client, Submission
from sklearn.ensemble import RandomForestClassifier


client = Client(username='username', password='password')
challenges = client.challenges()
challenge = challenges[0]

clf = RandomForestClassifier(max_depth=2, random_state=0)
clf.fit(challenge.x_train, challenge.y_train)

submission = Submission(client)
submission.confidence = 0.8
submission.stake = 1
submission.y_live = clf.predict(challenge.x_live)
submission.y_test = clf.predict(challenge.x_test)
submission.save()

Project details


Release history Release notifications | RSS feed

This version

0.1

Download files

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

Source Distribution

forbin-0.1.tar.gz (7.5 kB view hashes)

Uploaded Source

Built Distribution

forbin-0.1-py3-none-any.whl (7.3 kB view hashes)

Uploaded Python 3

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