Choose a task
Input: German credit and diabetes datasets; an API key.
Read the recorded stdoutInput: German credit; an API key and the booster libraries.
Read the recorded stdoutInput: Diabetes dataset; an API key.
Read the recorded stdoutInput: Adult census dataset; an API key.
Read the recorded stdoutThe scripts read your key from CAUSILO_KEY. CAUSILO_ENDPOINT overrides the API address. Start with the Quickstart for one minimal call, or inspect the API reference for exact request and response fields.
Original first-call example
You need an existing API key. See API access for availability and support. Install the Python client and pass the key to it:
Terminal
pip install causilo-client
Python
import pandas as pd
from causilo_client import Causilo
cx = Causilo("https://api.nums.world", token="csl_...")
context = pd.DataFrame({
"region": ["EU", "EU", "US", "US", "APAC", "APAC"],
"plan": ["pro", "free", "pro", "free", "pro", "free"],
"spend": [120.0, 0.0, 340.0, 12.0, 90.0, 4.0],
"renewed": ["yes", "no", "yes", "no", "yes", "no"],
})
query = pd.DataFrame({
"region": ["EU", "APAC"],
"plan": ["pro", "free"],
"spend": [200.0, 1.0],
})
print(cx.predict(context, query, target="renewed", model="causilo-clf"))
The quickstart makes the same kind of call on a real dataset for both classification and regression and shows the output it produced.