# Resampler (DP\_RES)

Resampling helps in providing more flexibility when handling imbalanced datasets.

Supported Resampling Techniques:

1. RandomOverSampler:
2. SMOTE
3. RandomUnderSampler
4. TomekLinks
5. SMOTETomek

Args:

xy\_train (bool): Flag indicating whether to resample the training dataset.&#x20;

xy\_test (bool): Flag indicating whether to resample the testing dataset.&#x20;

xy (bool): Flag indicating whether to resample main x and y datasets.&#x20;

resampler (str): The name of the resampling technique to use.&#x20;

details (object): Object containing dataset details.

&#x20;load\_name (object): Name of a saved resampler object, for loading.&#x20;

save\_name (str): Name to save the resampler object as.

## Sample Request

The request performs resampling operation using the SMOTE technique

```json
{
    "block_id": 000,
    "project_id": 000,
    "parent_id": 000,
    "function_code": "DP_RES",
    "args": {
        "xy": true,
        "xy_train": false,
        "xy_test": false,
        "resampler": "SMOTE",
        "save_name": "test"
    }
}
```

## Parameter Details

<mark style="color:green;">`POST`</mark> `https://autogon.ai/api/v1/engine/start`

#### Request Body

| Name                                             | Type   | Description           |
| ------------------------------------------------ | ------ | --------------------- |
| project\_id<mark style="color:red;">\*</mark>    | int    | current project ID    |
| block\_id<mark style="color:red;">\*</mark>      | int    | current block ID      |
| parent\_id<mark style="color:red;">\*</mark>     | int    | parent block ID       |
| function\_code<mark style="color:red;">\*</mark> | String | block's function code |
| args<mark style="color:red;">\*</mark>           | object | block arguments       |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.autogon.ai/autogon-engine-studio/data-processing/resampler-dp_res.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
