Elysia Tools Docs
RU
Язык
ZHESPTRUFRDEEN
На сайт
Обзор инструментов

Data Analysis

Разделение train/test со стратификацией

Читает датасет CSV/JSON и делит на train/validation/test со стратификацией по целевому столбцу (по умолчанию 70/15/15, воспроизводимое зерно) или стратифицированный k-fold; отчёт о распределении классов по сплитам с полосами отклонения, проверка утечек через дубликаты строк, предпросмотр SMOTE (интерполяция ближайших соседей на train) и экспорт CSV в ZIP.

html· HTML-результатОткрыть инструмент

Быстрый старт

Вызовите этот инструмент из своего кода на трёх языках.

cURL
# 1) Request a presigned URL → returns { uploadUrl, storageKey }
curl -X POST 'https://api.elysiatools.com/api/upload/presign/train-test-split-with-stratification' \
  -H 'Content-Type: application/json' \
  -d '{"filename":"dataFile.ext","contentType":"application/octet-stream","size":12345}'

# 2) PUT the file bytes directly to the presigned uploadUrl
curl -X PUT '<presigned uploadUrl>' \
  --data-binary @/path/to/file.ext

# 3) Call the tool, passing the returned storageKey for each file field
curl -X POST 'https://api.elysiatools.com/ru/api/tools/train-test-split-with-stratification' \
  -F 'dataFile=uploads/2026/01/01/your-tool-1700000000000-abc123.ext' \
  -F 'datasetText=text,length,label
The movie was wonderful and I loved every minute,42,positive
Absolutely terrible waste of time,31,negative
Pretty good overall would recommend,31,positive
Bad acting and a worse plot,25,negative
I enjoyed it a lot,16,positive
Not great not terrible just fine,30,neutral
Loved the soundtrack and visuals,28,positive
The pacing was boring and slow,28,negative
It was okay nothing special,24,neutral
Fantastic acting by the whole cast,30,positive
Weak ending ruined it for me,24,negative
Fine for a rainy afternoon,24,neutral
Brilliant and moving film,23,positive
Disappointing sequel,19,negative
Mediocre but watchable,21,neutral
Gorgeous cinematography throughout,29,positive
Painfully dull script,19,negative
A masterpiece of the genre,24,positive
Cliched and forgettable,20,negative
Charming and genuinely funny,25,positive
Skip it you will thank me,21,negative
Delightful from start to finish,27,positive
Two hours I will never get back,29,negative
Watchable if nothing else is on,26,neutral' \
  -F 'targetColumn=label' \
  -F 'splitMode=standard' \
  -F 'trainPercent=70' \
  -F 'valPercent=15' \
  -F 'kFolds=5' \
  -F 'randomSeed=42' \
  -F 'stratify=true' \
  -F 'shuffle=true' \
  -F 'smotePreview=false' \
  -F 'exportZip=true'

© 2026 Elysia Tools. Документация для разработчиков.

На сайтОбзор инструментов

Справочник API

Отправьте POST-запрос с входными данными в JSON. Параметры типа «файл» требуют предварительной загрузки.

Endpoint

HTTP
POST https://api.elysiatools.com/ru/api/tools/train-test-split-with-stratification

Параметры

ИмяТипОбязательныйОписание
dataFilefileнужна загрузкаНет—
datasetTexttextareaНет—
targetColumntextДа—
splitModeselectНет—
trainPercentnumberНет—
valPercentnumberНет—
kFoldsnumberНет—
randomSeednumberНет—
stratifycheckboxНет—
shufflecheckboxНет—
smotePreviewcheckboxНет—
exportZipcheckboxНет—
Параметры типа «файл» необходимо сначала загрузить через POST /upload/train-test-split-with-stratification, затем возвращённый filePath передаётся в соответствующее поле.

Формат ответа

HTML-результат

JSON
{
  "result": "<div>Processed HTML content</div>",
  "error": "Error message (optional)",
  "message": "Notification message (optional)",
  "metadata": {
    "key": "value"
  }
}

Интеграция MCP

Добавьте этот инструмент на свой сервер Model Context Protocol, чтобы ИИ-агенты могли перечислять и вызывать его.

Конфигурация сервера

Добавьте этот блок в конфигурацию вашего MCP-клиента:

mcp.json
{
  "mcpServers": {
    "elysiatools-train-test-split-with-stratification": {
      "name": "train-test-split-with-stratification",
      "description": "Читает датасет CSV/JSON и делит на train/validation/test со стратификацией по целевому столбцу (по умолчанию 70/15/15, воспроизводимое зерно) или стратифицированный k-fold; отчёт о распределении классов по сплитам с полосами отклонения, проверка утечек через дубликаты строк, предпросмотр SMOTE (интерполяция ближайших соседей на train) и экспорт CSV в ZIP.",
      "baseUrl": "https://api.elysiatools.com/mcp/sse?toolId=train-test-split-with-stratification",
      "command": "",
      "args": [],
      "env": {},
      "isActive": true,
      "type": "sse"
    }
  }
}

Получить список инструментов

После подключения к SSE-endpoint выведите список доступных инструментов:

tools/list
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/list"
}

Вызвать этот инструмент

Вызовите инструмент по его id; аргументы формируются из его параметров:

tools/call
{
  "jsonrpc": "2.0",
  "id": 2,
  "method": "tools/call",
  "params": {
    "name": "train-test-split-with-stratification",
    "arguments": {
  "dataFile": "https://example.com/file.ext",
  "datasetText": "text,length,label\nThe movie was wonderful and I loved every minute,42,positive\nAbsolutely terrible waste of time,31,negative\nPretty good overall would recommend,31,positive\nBad acting and a worse plot,25,negative\nI enjoyed it a lot,16,positive\nNot great not terrible just fine,30,neutral\nLoved the soundtrack and visuals,28,positive\nThe pacing was boring and slow,28,negative\nIt was okay nothing special,24,neutral\nFantastic acting by the whole cast,30,positive\nWeak ending ruined it for me,24,negative\nFine for a rainy afternoon,24,neutral\nBrilliant and moving film,23,positive\nDisappointing sequel,19,negative\nMediocre but watchable,21,neutral\nGorgeous cinematography throughout,29,positive\nPainfully dull script,19,negative\nA masterpiece of the genre,24,positive\nCliched and forgettable,20,negative\nCharming and genuinely funny,25,positive\nSkip it you will thank me,21,negative\nDelightful from start to finish,27,positive\nTwo hours I will never get back,29,negative\nWatchable if nothing else is on,26,neutral",
  "targetColumn": "label",
  "splitMode": "standard",
  "trainPercent": 70,
  "valPercent": 15,
  "kFolds": 5,
  "randomSeed": 42,
  "stratify": true,
  "shuffle": true,
  "smotePreview": false,
  "exportZip": true
}
  }
}
Объединяйте несколько инструментов в одной сессии списком toolId через запятую, напр. /mcp/sse?toolId=png-to-webp,jpg-to-webp,gif-to-webp (макс. 20).
Файловые параметры принимают только публичный URL файла (https://…). Локальные пути, data: URI и строки Base64 не поддерживаются.

Вопросы или проблемы? Свяжитесь с [email protected]

Обзор инструментов
Открыть инструмент