> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.umnai.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.umnai.com/_mcp/server.

# Configuration

A training configuration defines how a model is trained from a dataset.

Most projects can start with the built-in induction settings. Adjust the configuration when you need more control over sampling, model structure, training behaviour, regularisation, or resource use.

## Create a configuration

Create a training configuration before starting a training job.

### Request

POST [https://api.hi.umnai.com/training-configurations](https://api.hi.umnai.com/training-configurations)

```curl
curl -X POST https://api.hi.umnai.com/training-configurations \
     -H "Authorization: Bearer <token>" \
     -H "Content-Type: application/json" \
     -d '{
  "model_training_type": "INDUCTION",
  "name": "Sample Training Configuration"
}'
```

```python
import requests

url = "https://api.hi.umnai.com/training-configurations"

payload = {
    "model_training_type": "INDUCTION",
    "name": "Sample Training Configuration"
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.hi.umnai.com/training-configurations';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"model_training_type":"INDUCTION","name":"Sample Training Configuration"}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.hi.umnai.com/training-configurations"

	payload := strings.NewReader("{\n  \"model_training_type\": \"INDUCTION\",\n  \"name\": \"Sample Training Configuration\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.hi.umnai.com/training-configurations")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"model_training_type\": \"INDUCTION\",\n  \"name\": \"Sample Training Configuration\"\n}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.hi.umnai.com/training-configurations")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"model_training_type\": \"INDUCTION\",\n  \"name\": \"Sample Training Configuration\"\n}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.hi.umnai.com/training-configurations', [
  'body' => '{
  "model_training_type": "INDUCTION",
  "name": "Sample Training Configuration"
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.hi.umnai.com/training-configurations");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"model_training_type\": \"INDUCTION\",\n  \"name\": \"Sample Training Configuration\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "model_training_type": "INDUCTION",
  "name": "Sample Training Configuration"
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.hi.umnai.com/training-configurations")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### Response (201)

```json
{
  "model_training_type": "INDUCTION",
  "account": {
    "id": "e268443e43d93dab7ebef303bbe9642f",
    "name": "Sample Account"
  },
  "created_at": "2026-03-15T10:15:30.000000Z",
  "id": "236f09a5d73018a9b8324105f1ee82df",
  "name": "Sample Training Configuration",
  "alpha": 0.5,
  "alpha_factor": 0.5,
  "bin_min_distance": 0.5,
  "binning_strategy": "UNIFORM",
  "bins": 1,
  "boosting_strategy": "NO_GROUPING",
  "created_by": {
    "id": "dad46b2058752ffde5eaf02f1eb6abd5",
    "name": "Sample User"
  },
  "early_stopping_patience": 1,
  "estimators": 1,
  "estimators_winsorize_level": 0.5,
  "exclude_implicit": true,
  "init_depth": 1,
  "l1_ratio": 0.5,
  "l1_ratio_delta": 0.5,
  "learning_rate": 0.5,
  "learning_rate_decay": 0.5,
  "learning_rate_patience": 1,
  "log_interval": 1,
  "max_depth": 1,
  "max_depth_momentum": 1,
  "max_interaction_degree": 1,
  "max_interactions": 1,
  "max_iterations": 1,
  "max_polynomial_degree": 1,
  "max_rounds": 1,
  "max_samples": 0.5,
  "model_capabilities": {
    "has_causal": false,
    "estimators_data": false
  },
  "model_complexity_max_iterations": 1,
  "model_complexity_patience": 1,
  "partition_min_delta": 0.5,
  "partition_min_delta_factor": 0.5,
  "partition_min_delta_fraction": 0.5,
  "partition_min_samples": 1,
  "prune_patience": 1,
  "prune_threshold": 0.5,
  "sparse_model": true,
  "subsample": 0.5,
  "training_size": 0.5,
  "updated_at": "2026-03-15T10:15:30.000000Z",
  "validation_size": 0.5
}
```

Save the returned configuration `id`. Training jobs use this value when creating a model.

## Training type

Training configurations are created with a `model_training_type`.

| Type           | Description                                                                                        |
| -------------- | -------------------------------------------------------------------------------------------------- |
| `INDUCTION`    | Trains a model from a prepared dataset. This is the supported path for training a model from data. |
| `UPDATE_MODEL` | Exposed in the API, but not currently supported for general use.                                   |

`UPDATE_MODEL` is exposed in the API, but it is not currently supported. Do not use it unless you have confirmed that your workflow supports model updates.

## Induction parameters

Induction exposes detailed parameters for controlling how the model is trained. You usually do not need to set them all. Use them when you need to make a deliberate change to model size, training duration, resource usage, or generalisation behaviour.

Exact defaults, allowed values, and validation constraints are available in the API reference.

### Data sampling

Sampling controls how much of the dataset induction uses and how that data is split between training and validation. These settings are useful when you want to train on a subset of the data, change the validation split, or reduce memory pressure during boosting.

| Parameter         | Description                                                                                    |
| ----------------- | ---------------------------------------------------------------------------------------------- |
| `max_samples`     | Fraction of the dataset used for training and validation.                                      |
| `training_size`   | Proportion of sampled data reserved for training.                                              |
| `validation_size` | Proportion of sampled data reserved for validation.                                            |
| `subsample`       | Fraction or number of training shards used for fitting XNN modules during boosting iterations. |

### Model structure

Model structure parameters control how features can be combined and how complex the induced model can become. These settings are useful when you need to control the size, depth, or interaction complexity of the model.

| Parameter                | Description                                                                     |
| ------------------------ | ------------------------------------------------------------------------------- |
| `max_interaction_degree` | Maximum number of features that can be combined in a single interaction module. |
| `max_interactions`       | Maximum number of interaction modules for each interaction degree.              |
| `init_depth`             | Initial partition depth used by the XNN regressor.                              |
| `max_depth`              | Maximum depth of any partition.                                                 |
| `max_depth_momentum`     | Increment by which `max_depth` is increased during training.                    |
| `max_polynomial_degree`  | Highest degree of a feature in polynomial expansions.                           |

### Model constraints

Model constraint parameters control how training uses explicitly defined constraints.

| Parameter          | Description                                                  |
| ------------------ | ------------------------------------------------------------ |
| `exclude_implicit` | Excludes modules that are not part of the model constraints. |

If `exclude_implicit` is enabled, do not also set `max_interactions`. Use constraints to define the allowed modules.

For more detail, see [Constraints](/guides/models/model-constraints).

### Training loop

Training loop parameters control how long induction runs, how model complexity increases, and when training stops. These settings are useful when training is stopping too early, running too long, or increasing complexity too aggressively.

| Parameter                         | Description                                                                         |
| --------------------------------- | ----------------------------------------------------------------------------------- |
| `max_rounds`                      | Maximum number of training rounds unless early stopping occurs.                     |
| `max_iterations`                  | Maximum number of iterations for each estimator.                                    |
| `early_stopping_patience`         | Number of iterations with no significant improvement before early stopping.         |
| `model_complexity_max_iterations` | Maximum consecutive training iterations with the same model complexity.             |
| `model_complexity_patience`       | Number of iterations allowed without improvement after increasing model complexity. |
| `boosting_strategy`               | Module boosting strategy applied between iterations.                                |

### Regularisation

Regularisation parameters help control overfitting and the balance between L1 and L2 regularisation.

| Parameter        | Description                                                 |
| ---------------- | ----------------------------------------------------------- |
| `alpha`          | Elastic net alpha value.                                    |
| `alpha_factor`   | Grid-search factor around `alpha`, using log-spaced values. |
| `l1_ratio`       | Elastic net L1 ratio value.                                 |
| `l1_ratio_delta` | Grid-search range around `l1_ratio`.                        |

### Learning rate

Learning-rate parameters control how quickly the model updates during training and how that rate changes when progress stalls.

| Parameter                | Description                                                                  |
| ------------------------ | ---------------------------------------------------------------------------- |
| `learning_rate`          | Initial learning rate for training the XNN model.                            |
| `learning_rate_decay`    | Multiplier for decaying the learning rate when loss does not improve.        |
| `learning_rate_patience` | Number of iterations allowed without improvement before learning-rate decay. |

### Binning

Binning parameters control how feature values are segmented before they are used in symbolic conditions.

| Parameter          | Description                                                       |
| ------------------ | ----------------------------------------------------------------- |
| `bins`             | Maximum number of bins per feature.                               |
| `binning_strategy` | Strategy used to create bins for the XNN regressor.               |
| `bin_min_distance` | Minimum distance between split points, used by the XNN regressor. |

### Partitions

Partition parameters control when and how partitions are created inside modules. These settings are useful when partitions are becoming too granular, too shallow, or insufficiently stable.

| Parameter                      | Description                                                                         |
| ------------------------------ | ----------------------------------------------------------------------------------- |
| `partition_min_samples`        | Minimum number of training samples in one XNN partition.                            |
| `partition_min_delta`          | Minimum absolute improvement in the loss function required for a partition split.   |
| `partition_min_delta_fraction` | Minimum fractional improvement in the loss function required for a partition split. |
| `partition_min_delta_factor`   | Multiplier applied to `partition_min_delta_fraction` per module depth.              |

Prefer `partition_min_delta_fraction` over `partition_min_delta` unless you know the absolute loss improvement that should be required.

### Estimators

Estimator parameters control ensemble-style training and how estimator outputs are aggregated.

| Parameter                    | Description                                                                      |
| ---------------------------- | -------------------------------------------------------------------------------- |
| `estimators`                 | Number of estimators to train.                                                   |
| `estimators_winsorize_level` | Proportion of data to winsorize at each tail when aggregating estimator outputs. |

Using multiple estimators can increase runtime, resource usage, and storage requirements.

### Sparse models

Sparse-model parameters control whether low-impact modules can be removed during training. These settings are useful when you want a smaller model or need to reduce low-impact modules.

| Parameter         | Description                                                                                 |
| ----------------- | ------------------------------------------------------------------------------------------- |
| `sparse_model`    | Allows induction to create a sparse model.                                                  |
| `prune_threshold` | Threshold below which coefficients from ElasticNet are pruned.                              |
| `prune_patience`  | Number of boosting rounds where a module can remain under `prune_threshold` before removal. |

### Model capabilities

`model_capabilities` exposes additional model capability flags.

| Parameter                            | Description                                   |
| ------------------------------------ | --------------------------------------------- |
| `model_capabilities.estimators_data` | Whether the model has estimator capabilities. |
| `model_capabilities.has_causal`      | Whether the model has causal capabilities.    |

`model_capabilities.estimators_data` and `model_capabilities.has_causal` are exposed in the API. Use them only when the workflow you are using supports them.

### Logging

Logging parameters control how often training progress is reported.

| Parameter      | Description                           |
| -------------- | ------------------------------------- |
| `log_interval` | Frequency of logging during training. |

## Retrieve configurations

Retrieve training configurations when you need to reuse an existing configuration.

### Request

GET [https://api.hi.umnai.com/training-configurations](https://api.hi.umnai.com/training-configurations)

```curl
curl https://api.hi.umnai.com/training-configurations \
     -H "Authorization: Bearer <token>"
```

```python
import requests

url = "https://api.hi.umnai.com/training-configurations"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.hi.umnai.com/training-configurations';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.hi.umnai.com/training-configurations"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.hi.umnai.com/training-configurations")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.hi.umnai.com/training-configurations")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.hi.umnai.com/training-configurations', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.hi.umnai.com/training-configurations");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.hi.umnai.com/training-configurations")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### Response (200)

```json
{
  "data": [
    {
      "id": "ea8b745ead39ec442fc3b4fba359bf98",
      "name": "Sample Organisation",
      "status": "ACTIVE",
      "created_at": "2026-03-11T16:04:19.749000Z",
      "updated_at": null
    }
  ],
  "pagination": {
    "total_items": 1,
    "items_per_page": 10,
    "current_page": 1,
    "total_pages": 1
  }
}
```

You can filter the list by `model_training_type`.

To inspect a specific configuration, retrieve it by `id`.

### Request

GET [https://api.hi.umnai.com/training-configurations/\{trainingConfigurationId}](https://api.hi.umnai.com/training-configurations/\{trainingConfigurationId})

```curl
curl https://api.hi.umnai.com/training-configurations/{trainingConfigurationId} \
     -H "Authorization: Bearer <token>"
```

```python
import requests

url = "https://api.hi.umnai.com/training-configurations/:trainingConfigurationId"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.hi.umnai.com/training-configurations/:trainingConfigurationId';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.hi.umnai.com/training-configurations/:trainingConfigurationId"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.hi.umnai.com/training-configurations/:trainingConfigurationId")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.hi.umnai.com/training-configurations/:trainingConfigurationId")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.hi.umnai.com/training-configurations/:trainingConfigurationId', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.hi.umnai.com/training-configurations/:trainingConfigurationId");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.hi.umnai.com/training-configurations/:trainingConfigurationId")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### Response (200)

```json
{
  "data": [
    {
      "id": "ea8b745ead39ec442fc3b4fba359bf98",
      "name": "Sample Organisation",
      "status": "ACTIVE",
      "created_at": "2026-03-11T16:04:19.749000Z",
      "updated_at": null
    }
  ],
  "pagination": {
    "total_items": 1,
    "items_per_page": 10,
    "current_page": 1,
    "total_pages": 1
  }
}
```

## Update a configuration

Update a training configuration when you need to rename it.

### Request

PATCH [https://api.hi.umnai.com/training-configurations/\{trainingConfigurationId}](https://api.hi.umnai.com/training-configurations/\{trainingConfigurationId})

```curl
curl -X PATCH https://api.hi.umnai.com/training-configurations/trainingConfigurationId \
     -H "Authorization: Bearer <token>" \
     -H "Content-Type: application/json" \
     -d '{
  "name": "Sample Training Configuration"
}'
```

```python
import requests

url = "https://api.hi.umnai.com/training-configurations/:trainingConfigurationId"

payload = { "name": "Sample Training Configuration" }
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.patch(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.hi.umnai.com/training-configurations/:trainingConfigurationId';
const options = {
  method: 'PATCH',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"name":"Sample Training Configuration"}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.hi.umnai.com/training-configurations/:trainingConfigurationId"

	payload := strings.NewReader("{\n  \"name\": \"Sample Training Configuration\"\n}")

	req, _ := http.NewRequest("PATCH", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.hi.umnai.com/training-configurations/:trainingConfigurationId")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"name\": \"Sample Training Configuration\"\n}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.patch("https://api.hi.umnai.com/training-configurations/:trainingConfigurationId")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"name\": \"Sample Training Configuration\"\n}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('PATCH', 'https://api.hi.umnai.com/training-configurations/:trainingConfigurationId', [
  'body' => '{
  "name": "Sample Training Configuration"
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.hi.umnai.com/training-configurations/:trainingConfigurationId");
var request = new RestRequest(Method.PATCH);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"name\": \"Sample Training Configuration\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = ["name": "Sample Training Configuration"] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.hi.umnai.com/training-configurations/:trainingConfigurationId")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### Response (200)

```json
{
  "model_training_type": "INDUCTION",
  "account": {
    "id": "e268443e43d93dab7ebef303bbe9642f",
    "name": "Sample Account"
  },
  "created_at": "2026-03-15T10:15:30.000000Z",
  "id": "236f09a5d73018a9b8324105f1ee82df",
  "name": "Sample Training Configuration",
  "alpha": 0.5,
  "alpha_factor": 0.5,
  "bin_min_distance": 0.5,
  "binning_strategy": "UNIFORM",
  "bins": 1,
  "boosting_strategy": "NO_GROUPING",
  "created_by": {
    "id": "dad46b2058752ffde5eaf02f1eb6abd5",
    "name": "Sample User"
  },
  "early_stopping_patience": 1,
  "estimators": 1,
  "estimators_winsorize_level": 0.5,
  "exclude_implicit": true,
  "init_depth": 1,
  "l1_ratio": 0.5,
  "l1_ratio_delta": 0.5,
  "learning_rate": 0.5,
  "learning_rate_decay": 0.5,
  "learning_rate_patience": 1,
  "log_interval": 1,
  "max_depth": 1,
  "max_depth_momentum": 1,
  "max_interaction_degree": 1,
  "max_interactions": 1,
  "max_iterations": 1,
  "max_polynomial_degree": 1,
  "max_rounds": 1,
  "max_samples": 0.5,
  "model_capabilities": {
    "has_causal": false,
    "estimators_data": false
  },
  "model_complexity_max_iterations": 1,
  "model_complexity_patience": 1,
  "partition_min_delta": 0.5,
  "partition_min_delta_factor": 0.5,
  "partition_min_delta_fraction": 0.5,
  "partition_min_samples": 1,
  "prune_patience": 1,
  "prune_threshold": 0.5,
  "sparse_model": true,
  "subsample": 0.5,
  "training_size": 0.5,
  "updated_at": "2026-03-15T10:15:30.000000Z",
  "validation_size": 0.5
}
```

## Delete a configuration

Delete a training configuration when it should no longer be used by future training jobs.

### Request

DELETE [https://api.hi.umnai.com/training-configurations/\{trainingConfigurationId}](https://api.hi.umnai.com/training-configurations/\{trainingConfigurationId})

```curl
curl -X DELETE https://api.hi.umnai.com/training-configurations/trainingConfigurationId \
     -H "Authorization: Bearer <token>"
```

```python
import requests

url = "https://api.hi.umnai.com/training-configurations/trainingConfigurationId"

headers = {"Authorization": "Bearer <token>"}

response = requests.delete(url, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.hi.umnai.com/training-configurations/trainingConfigurationId';
const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.hi.umnai.com/training-configurations/trainingConfigurationId"

	req, _ := http.NewRequest("DELETE", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.hi.umnai.com/training-configurations/trainingConfigurationId")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.delete("https://api.hi.umnai.com/training-configurations/trainingConfigurationId")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('DELETE', 'https://api.hi.umnai.com/training-configurations/trainingConfigurationId', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.hi.umnai.com/training-configurations/trainingConfigurationId");
var request = new RestRequest(Method.DELETE);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.hi.umnai.com/training-configurations/trainingConfigurationId")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "DELETE"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```