Split your dataset into training and test sets with configurable ratios, random seeds, and stratification to evaluate model generalization.
The Train-Test Split component divides your DataFrame into features (X) and target (y) and then splits them into training and test portions. Its output handles connect directly to model and evaluation components.
Enable Stratify for imbalanced classification datasets to ensure every split has a representative distribution of each class.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"ClickML Studio","colors":{"primary":"#1E40AF","light":"#3B82F6","dark":"#1E40AF"},"logo":{"light":"https://mintcdn.com/clickml/Uly6Z5roOSNUx5mT/logo/light.svg?fit=max\u0026auto=format\u0026n=Uly6Z5roOSNUx5mT\u0026q=85\u0026s=3a85ac14a6024905a9e437b6e429a34c","dark":"https://mintcdn.com/clickml/Uly6Z5roOSNUx5mT/logo/dark.svg?fit=max\u0026auto=format\u0026n=Uly6Z5roOSNUx5mT\u0026q=85\u0026s=08e7eaab99a2f86ce69e0b18ac670e9c"},"favicon":"https://mintcdn.com/clickml/Uly6Z5roOSNUx5mT/public/favicon.svg?fit=max\u0026auto=format\u0026n=Uly6Z5roOSNUx5mT\u0026q=85\u0026s=4c8cf1cb472079968416f081ff3b70e2","navbar":{"links":[{"href":"https://clickml.com","label":"Website"}],"primary":{"type":"button","label":"Go to Studio","href":"https://app.clickml.com"}},"footer":{"socials":{"linkedin":"https://www.linkedin.com/company/clickml"}},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"clickml","hasAudioNarration":false,"actualSubdomain":"clickml","customDomains":["docs.clickml.app"],"gitSource":{"type":"github","owner":"baselhusam","repo":"clickml_docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6a8b5e6a4ed67b30ee2287b4","collectionId":"63a2612f-1f1b-4372-b6b2-8a55acbac483","schemaVersion":"v2","latestBuiltDeploymentHistoryId":"6a8b5e6a4ed67b30ee2287b4"},"entitlements":{"AI_CHAT":{"status":"DISABLED"}},"buildId":"6a8b5e6a4ed67b30ee2287b4","clientVersion":"0.0.3990","searchFilterCounts":[{"language":"default","tag":"Models — Regression","count":8},{"language":"default","tag":"Data Processing","count":7},{"language":"default","tag":"Models — Classification","count":6},{"language":"default","tag":"Evaluation \u0026 Inference","count":3},{"language":"default","tag":"Feature Engineering","count":3},{"language":"default","tag":"Data","count":2},{"language":"default","tag":"Data Wrangling","count":2},{"language":"default","tag":"Get Started","count":2},{"language":"default","tag":"Analytics","count":1},{"language":"default","tag":"Components","count":1}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-v7-file-tree","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"pause-universal-search-reconcile","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"per-site-search-delta","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-private-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-nav-generations","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"byok-sep-25","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-agent-model-picker","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"isAtlas":false,"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"components/processing/train-test-split","slug":"/components/processing/train-test-split","pageMetadata":{"title":"Train-Test Split component","description":"Split your dataset into training and test sets with configurable ratios, random seeds, and stratification to evaluate model generalization.","href":"/components/processing/train-test-split"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Split your dataset into training and test sets with configurable ratios, random seeds, and stratification to evaluate model generalization.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={code:`code`,p:`p`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,..._provideComponents(),...props.components},{Heading,Table,Tip}=_components;if(!Heading)_missingMdxReference(`Heading`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Tip)_missingMdxReference(`Tip`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`The `,_jsx(_components.strong,{children:`Train-Test Split`}),` component divides your DataFrame into features (`,_jsx(_components.code,{children:`X`}),`) and target (`,_jsx(_components.code,{children:`y`}),`) and then splits them into training and test portions. Its output handles connect directly to model and evaluation components.`]}),`\n`,_jsx(Heading,{level:`2`,id:`configuration`,children:`Configuration`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Option`}),_jsx(_components.th,{children:`Description`}),_jsx(_components.th,{children:`Default`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`Target Column`})}),_jsx(_components.td,{children:`The column the model should learn to predict`}),_jsx(_components.td,{children:`—`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`Split Mode`})}),_jsx(_components.td,{children:`How to divide the data (see below)`}),_jsx(_components.td,{children:`Train/Test`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`Test Size`})}),_jsx(_components.td,{children:`Fraction of data reserved for the test set`}),_jsxs(_components.td,{\"data-numeric\":`true`,children:[_jsx(_components.code,{children:`0.2`}),` (20%)`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`Validation Size`})}),_jsx(_components.td,{children:`Fraction reserved for validation (Train/Val/Test mode only)`}),_jsxs(_components.td,{\"data-numeric\":`true`,children:[_jsx(_components.code,{children:`0.1`}),` (10%)`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`Random State`})}),_jsx(_components.td,{children:`Seed for reproducibility`}),_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`42`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`Stratify`})}),_jsx(_components.td,{children:`Keep class proportions equal across splits (classification only)`}),_jsx(_components.td,{children:`Off`})]})]})]}),`\n`,_jsx(Heading,{level:`3`,id:`split-modes`,children:`Split modes`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Mode`}),_jsx(_components.th,{children:`Output handles`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`No Split (Full Data)`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`X`}),`, `,_jsx(_components.code,{children:`y`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Train/Test`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`X Train`}),`, `,_jsx(_components.code,{children:`Y Train`}),`, `,_jsx(_components.code,{children:`X Test`}),`, `,_jsx(_components.code,{children:`Y Test`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Train/Validation/Test`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`X Train`}),`, `,_jsx(_components.code,{children:`Y Train`}),`, `,_jsx(_components.code,{children:`X Val`}),`, `,_jsx(_components.code,{children:`Y Val`}),`, `,_jsx(_components.code,{children:`X Test`}),`, `,_jsx(_components.code,{children:`Y Test`})]})]})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`input-/-output`,children:`Input / Output`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{}),_jsx(_components.th,{children:`Type`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Input`}),_jsx(_components.td,{children:`DataFrame`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Output`}),_jsx(_components.td,{children:`Split Data (separate handles per set)`})]})]})]}),`\n`,_jsx(Tip,{children:_jsxs(_components.p,{children:[`Enable `,_jsx(_components.strong,{children:`Stratify`}),` for imbalanced classification datasets to ensure every split has a representative distribution of each class.`]})})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Train-Test Split component","description":"Split your dataset into training and test sets with configurable ratios, random seeds, and stratification to evaluate model generalization.","href":"/components/processing/train-test-split"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Configuration","slug":"configuration","depth":2,"children":[{"title":"Split modes","slug":"split-modes","depth":3,"children":[]}]},{"title":"Input / Output","slug":"input-/-output","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"clickml","siteName":"ClickML Studio","title":"Train-Test Split component - ClickML Studio","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-05-02T23:08:40.871Z","originalFileLocation":"components/processing/train-test-split.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Split your dataset into training and test sets with configurable ratios, random seeds, and stratification to evaluate model generalization.\">\u003cmeta data-mint-head name=\"application-name\" content=\"ClickML Studio\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/clickml/VCt0Ega09sioYoHB/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/clickml/VCt0Ega09sioYoHB/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/clickml/VCt0Ega09sioYoHB/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/clickml/VCt0Ega09sioYoHB/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/clickml/VCt0Ega09sioYoHB/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/clickml/VCt0Ega09sioYoHB/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/clickml/VCt0Ega09sioYoHB/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/clickml/VCt0Ega09sioYoHB/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/clickml/VCt0Ega09sioYoHB/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Train-Test Split component - ClickML Studio\">\u003cmeta data-mint-head property=\"og:description\" content=\"Split your dataset into training and test sets with configurable ratios, random seeds, and stratification to evaluate model generalization.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"ClickML Studio\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.clickml.app/components/processing/train-test-split\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://clickml.mintlify.app/_mintlify/api/og/v2?division=Data+Processing\u0026amp;title=Train-Test+Split+component\u0026amp;description=Split+your+dataset+into+training+and+test+sets+with+configurable+ratios%2C+random+seeds%2C+and+stratification+to+evaluate+model+generalization.\u0026amp;theme=329502de4701099884229d65\u0026amp;signature=56f3267850bc0b0c3a6e2fb1a3ef868d29889c489fdf7dca5fdf63ac7e042938\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Train-Test Split component - ClickML Studio\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Split your dataset into training and test sets with configurable ratios, random seeds, and stratification to evaluate model generalization.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://clickml.mintlify.app/_mintlify/api/og/v2?division=Data+Processing\u0026amp;title=Train-Test+Split+component\u0026amp;description=Split+your+dataset+into+training+and+test+sets+with+configurable+ratios%2C+random+seeds%2C+and+stratification+to+evaluate+model+generalization.\u0026amp;theme=329502de4701099884229d65\u0026amp;signature=56f3267850bc0b0c3a6e2fb1a3ef868d29889c489fdf7dca5fdf63ac7e042938\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/clickml/VCt0Ega09sioYoHB/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"ClickML Studio\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#1E40AF\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.clickml.app/components/processing/train-test-split\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/components/processing/train-test-split.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.clickml.app/#organization\",\"name\":\"ClickML Studio\",\"url\":\"https://docs.clickml.app\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/clickml/Uly6Z5roOSNUx5mT/logo/light.svg?fit=max\u0026auto=format\u0026n=Uly6Z5roOSNUx5mT\u0026q=85\u0026s=3a85ac14a6024905a9e437b6e429a34c\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.clickml.app#website\",\"name\":\"ClickML Studio\",\"url\":\"https://docs.clickml.app\",\"publisher\":{\"@id\":\"https://docs.clickml.app/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.clickml.app/components/processing/train-test-split#webpage\",\"url\":\"https://docs.clickml.app/components/processing/train-test-split\",\"name\":\"Train-Test Split component\",\"description\":\"Split your dataset into training and test sets with configurable ratios, random seeds, and stratification to evaluate model generalization.\",\"dateModified\":\"2026-05-02T23:08:40.871Z\",\"isPartOf\":{\"@id\":\"https://docs.clickml.app#website\"},\"breadcrumb\":{\"@id\":\"https://docs.clickml.app/components/processing/train-test-split#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.clickml.app/components/processing/train-test-split#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Data Processing\",\"item\":\"https://docs.clickml.app/components/processing/data-cleaning\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Train-Test Split component\",\"item\":\"https://docs.clickml.app/components/processing/train-test-split\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.clickml.app/components/processing/train-test-split#article\",\"headline\":\"Train-Test Split component\",\"name\":\"Train-Test Split component\",\"description\":\"Split your dataset into training and test sets with configurable ratios, random seeds, and stratification to evaluate model generalization.\",\"url\":\"https://docs.clickml.app/components/processing/train-test-split\",\"mainEntityOfPage\":{\"@id\":\"https://docs.clickml.app/components/processing/train-test-split#webpage\"},\"dateModified\":\"2026-05-02T23:08:40.871Z\",\"publisher\":{\"@id\":\"https://docs.clickml.app/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.clickml.app#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"ClickML Studio\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"ClickML Studio","nav":{"global":null,"groups":[{"group":"Get Started","pages":[{"title":"Introduction to ClickML Studio","href":"/introduction"},{"title":"Quickstart guide to building ML pipelines","href":"/quickstart"}]},{"group":"Components","pages":[{"title":"ClickML Studio components reference","href":"/components/overview"}]},{"group":"Data","pages":[{"title":"CSV Reader component","href":"/components/data/csv-reader"},{"title":"Excel Reader component","href":"/components/data/excel-reader"}]},{"group":"Data Processing","pages":[{"title":"Data Cleaning component","href":"/components/processing/data-cleaning"},{"title":"Missing Values imputation component","href":"/components/processing/missing-values"},{"title":"Feature Scaling component","href":"/components/processing/scaling"},{"title":"Categorical Encoding component","href":"/components/processing/encoding"},{"title":"Data Transformation component","href":"/components/processing/data-transformation"},{"title":"Delete Columns and Rows component","description":"Remove unwanted columns and rows from your DataFrame by name, index, or condition to slim down a dataset before training your ML model.","href":"/components/processing/delete-columns-rows"},{"title":"Train-Test Split component","href":"/components/processing/train-test-split"}]},{"group":"Feature Engineering","pages":[{"title":"Feature Extraction component","description":"Reduce dimensionality with techniques like PCA and ICA to extract a compact set of features that capture most of the variance in your dataset.","href":"/components/feature-engineering/feature-extraction"},{"title":"Feature Transformation component","href":"/components/feature-engineering/feature-transformation"},{"title":"Feature Selection component","href":"/components/feature-engineering/feature-selection"}]},{"group":"Data Wrangling","pages":[{"title":"Merge and Join DataFrames component","href":"/components/wrangling/merge-join"},{"title":"Concatenate DataFrames component","href":"/components/wrangling/concatenate"}]},{"group":"Analytics","pages":[{"title":"Exploratory data analysis (EDA) component","href":"/components/analytics/eda"}]},{"group":"Models — Classification","pages":[{"title":"Random Forest Classifier component","href":"/components/models/classification/random-forest"},{"title":"Logistic Regression Classifier component","href":"/components/models/classification/logistic-regression"},{"title":"Support Vector Classifier (SVC) component","href":"/components/models/classification/svc"},{"title":"Decision Tree Classifier component","href":"/components/models/classification/decision-tree"},{"title":"Gradient Boosting Classifier component","href":"/components/models/classification/gradient-boosting"},{"title":"K-Nearest Neighbors Classifier component","href":"/components/models/classification/knn"}]},{"group":"Models — Regression","pages":[{"title":"Linear Regression component","href":"/components/models/regression/linear-regression"},{"title":"Ridge Regression component","href":"/components/models/regression/ridge"},{"title":"Lasso Regression component","href":"/components/models/regression/lasso"},{"title":"Random Forest Regressor component","href":"/components/models/regression/random-forest"},{"title":"Support Vector Regressor (SVR) component","href":"/components/models/regression/svr"},{"title":"Decision Tree Regressor component","href":"/components/models/regression/decision-tree"},{"title":"Gradient Boosting Regressor component","href":"/components/models/regression/gradient-boosting"},{"title":"K-Nearest Neighbors Regressor component","href":"/components/models/regression/knn"}]},{"group":"Evaluation \u0026 Inference","pages":[{"title":"Model evaluation component","href":"/components/evaluation/evaluation"},{"title":"Model inference component","href":"/components/evaluation/inference"},{"title":"Model Selector component","href":"/components/evaluation/model-selector"}]}]},"title":"Train-Test Split component - ClickML Studio","buildId":"dpl_2oYXwqkEXirXBPk8wV1FtM5USFWi","deploymentId":"dpl_2oYXwqkEXirXBPk8wV1FtM5USFWi","dynamics":[],"chunks":[]}