curl --request POST \
--url https://{tenant}-api.mathfi.ai/api/v1/feature-refinery \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "German Credit Risk",
"trainFileName": "german-credit-train.csv",
"testFileName": "german-credit-test.csv",
"numberOfBuckets": 20
}
'import requests
url = "https://{tenant}-api.mathfi.ai/api/v1/feature-refinery"
payload = {
"name": "German Credit Risk",
"trainFileName": "german-credit-train.csv",
"testFileName": "german-credit-test.csv",
"numberOfBuckets": 20
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"featureRefinementKey": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "<string>",
"uploadTargets": [
{
"kind": "TRAIN",
"url": "<string>",
"requiredHeader": "<string>"
}
],
"startUrl": "<string>",
"progressUrl": "<string>"
}Create a feature refinement
Create a feature refinement run. Returns a key plus signed upload URLs for the train and
labelled-test CSVs (kinds TRAIN + TEST). After uploading both, call
POST /feature-refinery/{key}/start to begin the run, then poll /progress.
curl --request POST \
--url https://{tenant}-api.mathfi.ai/api/v1/feature-refinery \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "German Credit Risk",
"trainFileName": "german-credit-train.csv",
"testFileName": "german-credit-test.csv",
"numberOfBuckets": 20
}
'import requests
url = "https://{tenant}-api.mathfi.ai/api/v1/feature-refinery"
payload = {
"name": "German Credit Risk",
"trainFileName": "german-credit-train.csv",
"testFileName": "german-credit-test.csv",
"numberOfBuckets": 20
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"featureRefinementKey": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "<string>",
"uploadTargets": [
{
"kind": "TRAIN",
"url": "<string>",
"requiredHeader": "<string>"
}
],
"startUrl": "<string>",
"progressUrl": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
Human-readable run name, unique per user. Letters, digits, spaces, hyphen and underscore only, 1–100 characters. Rejected with 400 otherwise — note that punctuation such as angle brackets, dots or slashes is not allowed.
1 - 100^[A-Za-z0-9 _-]{1,100}$"German Credit Risk"
Original filename of the training CSV the user selected. Optional metadata, echoed back on the run so the source dataset is identifiable beyond the run name.
260"german-credit-train.csv"
Original filename of the labelled-test CSV the user selected. Optional, echoed back on the run.
260"german-credit-test.csv"
Bucketing granularity (NoB), the one refinement hyperparameter this endpoint accepts. Must be 4, 10 or 20; any other value is rejected with 400. Defaults to 20 when omitted. 10 is the recommended starting point. Higher granularity can improve refinement accuracy at the cost of a longer run.