Manuel B. Garcia

Manuel B. Garcia serves as the Senior Director for Educational Technology and Digital Learning at FEU Institute of Technology, Manila, Philippines. Read More

Contact Info

1607, FEU Tech Building,
P. Paredes St, Sampaloc,
Manila, Philippines
mbgarcia@feutech.edu.ph

Follow Me

What Is Internal Validation, and Why Is a Simple Train-Test Split Often Inefficient?

A random train-test split is familiar, but it can waste valuable development information and produce unstable performance estimates. Learn how internal validation works, why bootstrapping and cross-validation are often preferable, and how to select a method that reflects the complete prediction-model development process.

452
Internal Validation vs. Train-Test Split Guide 452 of 1272
01 · The Question

Why Might Dividing Your Dataset Into Training and Testing Groups Be a Poor Validation Strategy?

You have 600 participants and want to develop a prediction model. Following a familiar machine-learning workflow, you randomly assign 70% of participants to training and 30% to testing.

The procedure seems straightforward. Develop the model using the training data, evaluate it using the testing data, and report the resulting accuracy.

But what happens if the outcome is uncommon? What if the training subset contains too few events for stable model development, or the test subset contains too few events to estimate performance precisely?

A single random split may protect against direct reuse of training outcomes in evaluation when conducted correctly. Yet it can also discard valuable development information and make conclusions depend heavily on one arbitrary partition of the data.

Internal validation offers more informative alternatives, particularly when observations and outcome events are limited.

02 · The Short Answer

Internal Validation Estimates Optimism Without Necessarily Reserving a Permanent Test Set

In Brief

Internal validation assesses how well a prediction-model development procedure is likely to perform beyond the observations used to fit individual models. A single random train-test split is often inefficient because it reduces the information available for development and produces performance estimates that can vary substantially with the chosen split.

Bootstrapping and appropriately implemented cross-validation can often use limited data more efficiently. However, their validity depends on reproducing the complete development process, preventing information leakage, and respecting the structure of the observations. No internal validation method independently establishes performance in a different population or setting.

03 · What You Need to Know

Why Resampling Often Provides a Better Internal Validation Strategy

What Is Internal Validation?

Internal validation evaluates aspects of prediction-model performance using the dataset available for development.

Its principal purpose is to assess optimism and instability arising when a model is fitted to a particular sample.

Rather than assuming that training performance represents performance in new observations, internal validation creates repeated opportunities to assess the model-development procedure using observations not involved in a particular fit.

Common approaches include bootstrap validation, k-fold cross-validation, and other suitable resampling procedures.

The relevant target is usually the performance of the complete development strategy, including preprocessing, predictor selection, and tuning, rather than only the final mathematical equation considered in isolation.

What Is a Train-Test Split?

A train-test split divides the available observations into separate subsets.

The training subset is used to fit the model, while the test subset is reserved for evaluation.

For example, a 70:30 split assigns 70% of observations to training and 30% to testing.

If the test outcomes are not used during development, the held-out subset can provide an internal estimate of predictive performance.

However, this estimate pertains to the particular model developed using the training subset and to the observations represented in the test subset.

It is not automatically an estimate of how a model subsequently refitted using all observations will perform.

Nor is it necessarily evidence of transportability to another setting.

Why Is a Single Random Split Often Inefficient?

Prediction-model development requires enough information to estimate relationships between predictors and outcomes.

When researchers reserve a substantial proportion of observations for testing, those observations no longer contribute to fitting the model evaluated by the split.

This can be particularly problematic when the outcome is uncommon or the model contains numerous candidate parameters.

The test subset may also be too small to estimate discrimination and calibration precisely.

Furthermore, the resulting performance estimate can depend on which participants happen to enter each subset.

Repeating the procedure with a different random seed may produce meaningfully different estimates, especially in smaller datasets.

Thus, a simple split may sacrifice development information without producing a sufficiently reliable evaluation.

How Much Information Is Lost in a Train-Test Split?

The amount depends on the split proportion and the number of available observations and events.

Illustrative Train-Test Allocation
Training sample = N × Training proportion
N is the total number of observations. The number of outcome events in each subset depends on the allocation and observed outcome distribution.
For 600 participants and a 70:30 split, 420 enter training and 180 enter testing. If the overall event probability is approximately 10%, the expected numbers of events are about 42 and 18, respectively. Actual counts vary with the split.

Only approximately 42 events would be available for fitting the model in this illustration, while the test subset would contain approximately 18 events for evaluating performance.

Such a small test-event count may produce substantial uncertainty in calibration and discrimination estimates.

The example does not establish a universal minimum event count. It illustrates how splitting can reduce the information available for both development and evaluation.

What Is Bootstrap Validation?

Bootstrap validation repeatedly draws samples with replacement from the original development dataset.

Each bootstrap sample ordinarily contains the same number of observations as the original dataset, although some original observations appear more than once and others are absent.

The model-development procedure is repeated in each bootstrap sample.

Performance is evaluated in the bootstrap sample and in the original dataset, allowing estimation of optimism associated with the development procedure.

Average optimism can then be used to adjust apparent performance estimates.

Bootstrap validation is particularly useful for many regression-based prediction models because it allows the development process to be assessed without permanently withholding a large subset of observations.

However, the procedure must be designed appropriately for the data structure and model-development strategy.

How Does Bootstrap Optimism Correction Work?

Suppose a model achieves an apparent AUC of 0.83 in its development dataset.

Researchers perform bootstrap validation, repeating the complete development procedure in each resample.

They calculate the difference between bootstrap-sample performance and the performance of the bootstrap-developed model in the original dataset.

The average difference estimates optimism.

Bootstrap Optimism Correction
Optimism-corrected AUC = Apparent AUC − Mean bootstrap optimism
The correction applies to AUC, for which larger values indicate better discrimination. The estimated optimism should reflect the relevant model-development process.
If apparent AUC = 0.83 and estimated optimism = 0.06, corrected AUC = 0.83 − 0.06 = 0.77. These hypothetical values demonstrate how internal validation may reveal optimism in apparent performance.

The corrected estimate is not guaranteed to equal performance in an independent population.

It remains an estimate derived from the original data source and the assumptions of the resampling procedure.

What Is k-Fold Cross-Validation?

In k-fold cross-validation, the dataset is divided into k subsets or folds.

The model is developed using k minus one folds and evaluated in the remaining fold.

This process is repeated until every fold has served as the evaluation subset.

For example, five-fold cross-validation repeatedly fits models using approximately 80% of the observations and evaluates them using the remaining 20%.

Performance information is then combined across the folds.

The method provides an internal assessment of predictive performance without relying on only one training-testing partition.

However, its implementation must respect the outcome, dependence structure, and any model-selection procedures.

How Does Cross-Validation Compare With Bootstrapping?

Feature Bootstrap Validation k-Fold Cross-Validation Single Train-Test Split
Basic approach Repeated sampling with replacement Rotating held-out folds One fixed partition
Development information Uses resamples drawn from the full development source Uses most observations for each fit Uses only the training subset for the evaluated fit
Performance assessment Often estimates optimism in apparent performance Combines out-of-fold evaluation results Evaluates one held-out subset
Common strength Efficient optimism assessment for many regression models Flexible evaluation across model types Simple to implement and explain
Important limitation Requires correct repetition of the development procedure Requires careful handling of tuning and preprocessing Can waste data and depend strongly on one split

No method is universally optimal. The choice depends on the available data, modeling algorithm, computational resources, and validation objective.

Does Cross-Validation Always Use Data More Efficiently?

Cross-validation often improves the use of limited data compared with a single random split, but efficiency depends on how the procedure is implemented.

For example, five-fold cross-validation trains each model on approximately 80% of observations, while ten-fold cross-validation uses approximately 90% for each fit.

However, smaller evaluation folds may contain relatively few events, and performance estimates can vary across resampling schemes.

Repeated cross-validation may help assess variation attributable to fold assignment.

Researchers should not assume that increasing the number of folds always produces better or more stable estimates.

The resampling design should be chosen according to the sample size, outcome structure, and analytical objective.

What Is Leave-One-Out Cross-Validation?

Leave-one-out cross-validation is an extreme form of cross-validation in which each iteration holds out one observation and fits the model using all remaining observations.

It can be computationally expensive for complex algorithms and does not necessarily provide the most stable performance estimate.

Its statistical properties differ from those of k-fold cross-validation, and it should not automatically be selected simply because each fitted model uses nearly all observations.

Researchers should evaluate whether the additional computational cost and characteristics of the estimator suit the prediction task.

What Is Nested Cross-Validation?

Nested cross-validation separates model tuning from final internal performance evaluation.

An inner resampling procedure is used to select hyperparameters or compare candidate modeling configurations.

An outer resampling procedure evaluates the development strategy, including the tuning decisions made within the inner procedure.

This separation reduces the risk of reporting overly optimistic performance after selecting the best configuration using the same evaluation results.

Nested cross-validation can be particularly useful when researchers compare numerous algorithms or tune complex machine-learning models.

However, it may be computationally demanding, and the evaluation must still reflect the intended data structure.

Why Must Feature Selection Be Repeated During Resampling?

Feature selection uses information to determine which predictors enter the model.

If researchers select predictors using the entire dataset before cross-validation, evaluation-fold outcomes may influence the selected feature set.

The subsequent cross-validation no longer provides an appropriately separated assessment of the full development procedure.

For example, screening 100 candidate predictors using univariable associations across all observations before creating folds can introduce substantial leakage.

Where selection depends on the observed outcomes, it should be repeated within the training portion of each resampling iteration.

The same principle applies to tuning procedures that use outcome information.

How Should Missing-Data Imputation Be Handled?

Missing-data procedures can also influence validation.

For example, estimating imputation parameters using all observations before creating cross-validation folds may allow evaluation data to influence the development procedure.

For a deployment-oriented prediction pipeline, imputation procedures should generally be learned using training observations and applied to held-out observations without using their outcomes.

Multiple imputation introduces additional considerations because it aims to account for uncertainty about missing values, and its implementation should be consistent with the intended validation estimand.

Researchers should document how missing predictors are handled during development and how the same procedure would operate for new individuals.

Imputation should not be treated as an inconsequential preliminary step.

Does Standardization Need to Occur Within Training Folds?

When standardization parameters are estimated from data, they should generally be learned from the training observations and applied to the evaluation observations.

For example, a predictor's mean and standard deviation may be calculated in the training fold and then used to standardize that fold and its corresponding evaluation fold.

Calculating these quantities using the entire dataset beforehand introduces information from evaluation observations into preprocessing.

The practical effect may be small in some settings, but the correct validation principle is to reproduce the procedure that would be available when the model is applied to new data.

Researchers should apply this principle to normalization, dimensionality reduction, and other learned transformations.

Why Does the Unit of Resampling Matter?

Many datasets contain observations that are not independent.

Examples include repeated measurements from the same patient, multiple assessments from one student, or individuals nested within institutions.

If records from the same person appear in both training and evaluation folds, the model may benefit from information about that person that would not be available when predicting outcomes for a genuinely new individual.

Similarly, random splitting across institutions may conceal performance differences between settings.

Grouped cross-validation or other cluster-aware methods may be appropriate depending on the intended application.

The resampling unit should correspond to the level at which independent prediction performance is needed.

When Is Temporal Validation Preferable to Random Resampling?

When the intended use involves predicting outcomes in future calendar periods, evaluating a model on later observations may provide useful information about temporal performance.

For example, a student withdrawal model developed using earlier enrollment cohorts may be evaluated using a subsequent cohort.

Such evaluation can reveal changes in enrollment characteristics, institutional policies, or outcome frequency.

However, temporal validation is not interchangeable with random internal resampling.

It addresses performance across time, while random resampling primarily evaluates performance within the original data-generating context.

Researchers should consider both when the intended deployment environment may change.

Does Internal Validation Establish Calibration?

Internal validation can assess calibration, but calibration must be evaluated explicitly.

A model may achieve reasonable cross-validated discrimination while systematically overestimating or underestimating outcome probabilities.

Researchers should examine measures such as calibration-in-the-large, calibration slope, and calibration plots where appropriate.

For time-to-event outcomes, calibration assessment must account for the prediction horizon and censoring.

The choice of internal validation method should support the performance measures relevant to the intended decision.

Evaluating only classification accuracy or AUC is often insufficient for risk prediction.

What If the Outcome Is Rare?

Rare outcomes create additional difficulties because relatively few events may be available in individual folds or test subsets.

Some partitions may contain very few events, making discrimination and calibration estimates unstable or even undefined for particular measures.

Stratified fold allocation may help distribute events across folds, although it does not create additional outcome information.

Researchers should also consider whether the overall sample size is sufficient for the proposed model complexity.

Resampling cannot compensate completely for inadequate event information.

The relevant considerations are discussed in how many outcome events prognostic studies need.

Can Resampling Eliminate Overfitting?

No. Internal validation can estimate optimism and reveal unstable performance, but it does not automatically prevent overfitting.

Overfitting may be reduced through appropriate model complexity, penalization, shrinkage, and sufficient development data.

Resampling can help evaluate the consequences of these decisions and guide model-development strategies.

However, a severely underpowered dataset may remain inadequate even when bootstrap or cross-validation procedures are technically correct.

Researchers should distinguish methods for assessing overfitting from methods for reducing it.

Does Internal Validation Replace External Validation?

No. Internal validation assesses performance within the available development data source.

External validation evaluates a fixed model using independent observations relevant to its intended application.

For example, a model may perform consistently across random folds from one hospital while performing poorly in another hospital with different patients or measurement procedures.

Likewise, a model developed at one university may not retain its calibration after being introduced into an institution with different admission policies and student-support systems.

Researchers should distinguish external validation and its contribution to model generalizability from internal optimism assessment.

How Should Internal Validation Be Reported?

Researchers should identify the validation method, number of bootstrap repetitions or cross-validation folds, and the procedures used for preprocessing, feature selection, and tuning.

They should explain whether observations were clustered or repeated and how this structure was addressed.

Apparent performance and internally validated estimates should be distinguished.

For cross-validation, the method used to combine fold-level predictions or performance measures should be specified.

For bootstrap validation, the optimism-correction procedure should be described.

TRIPOD+AI provides reporting guidance relevant to these decisions in clinical prediction-model studies.

04 · A Practical Example

Why a 70:30 Split May Provide Less Useful Information Than Resampling

Hypothetical Example

Predicting One-Year Deterioration in a Small Cohort

Researchers have 600 participants, of whom 60 experience deterioration within one year.

They consider developing a model using 10 candidate predictor parameters.

The proposed random split allocates 70% of observations to training and 30% to testing. All figures are hypothetical.

Feature Single 70:30 Split Bootstrap Internal Validation
Total available participants 600 600
Participants used for the evaluated model fit 420 Bootstrap samples drawn from all 600 observations
Expected training events Approximately 42 Resampled event information from the full development source
Expected test events Approximately 18 No permanently reserved test subset
Performance assessment One held-out evaluation Repeated optimism estimation
Main limitation Reduced development information and split dependence Requires correct resampling of the full development process
Assess the single-split strategy

The model would be fitted using approximately 42 events. Its test performance would be estimated from approximately 18 events and 162 non-events, assuming proportional allocation.

Recognize the precision problem

The small test-event count may produce substantial uncertainty in discrimination and calibration estimates. The model also loses access to 30% of observations during the evaluated fit.

Consider bootstrap validation

The researchers repeat the complete model-development process across bootstrap samples and estimate optimism without permanently reserving a test subset.

Evaluate model complexity

They assess whether 60 total events provide sufficient information for 10 candidate predictor parameters. Bootstrap validation does not remove the need for this assessment.

Report appropriately

The researchers report apparent and optimism-corrected performance, including calibration and discrimination, and identify the need for external validation.

The example does not prove that bootstrapping is always superior to a random split. It illustrates why reserving a large proportion of a limited dataset may be inefficient.

When substantial independent data are available, a separate evaluation dataset can be valuable. The methodological priority is to match the validation strategy to the research question, available information, and intended application.

05 · What Researchers Often Get Wrong

Common Mistakes in Internal Validation and Data Splitting

Misconception

Every Prediction Model Must Use a 70:30 or 80:20 Split

There is no universal requirement for a fixed split ratio. Resampling may provide a more efficient internal assessment, particularly with limited data.

Misconception

A Held-Out Test Set Automatically Provides External Validation

A random subset from the same development source generally provides internal evaluation rather than evidence of transportability to a different population or setting.

Misconception

Cross-Validation Prevents Leakage Regardless of Preprocessing

Feature selection, tuning, and learned preprocessing can leak information when performed using evaluation observations before resampling.

Misconception

Bootstrap Validation Guarantees That a Model Is Not Overfitted

Bootstrapping estimates optimism and may support shrinkage strategies, but it does not eliminate inadequate sample size or excessive model complexity.

Misconception

More Cross-Validation Folds Are Always Better

The number of folds affects computational demands, training-set size, and the characteristics of the performance estimator. More folds are not universally optimal.

Misconception

Random Splitting Is Appropriate for Every Dataset

Repeated observations, clustered participants, and temporal structure may require grouped or time-aware validation procedures.

06 · What This Means for You

How to Choose an Efficient Internal Validation Method

Begin by assessing the number of participants, outcome events, candidate predictor parameters, and dependence structure.

Then identify whether the objective is to estimate optimism, compare modeling strategies, tune hyperparameters, or evaluate performance across meaningful clusters.

A simple decision framework

If the dataset is relatively small and a regression-based model is planned
Consider bootstrap internal validation rather than automatically reserving a large test subset.
If the modeling procedure requires extensive hyperparameter tuning
Consider nested cross-validation or another appropriately separated tuning and evaluation strategy.
If observations are repeated or clustered
Use resampling units and partitions that reflect the intended independent prediction setting.
If a large independent evaluation dataset is available
Preserve its independence and use it for an appropriately defined validation objective.
If the model will be used in a different population or period
Plan external validation rather than relying only on internal resampling.

Document every step that learns information from the data, including imputation, scaling, feature selection, tuning, and model fitting.

Ensure that the resampling procedure evaluates the complete development strategy and does not allow evaluation outcomes to influence training decisions.

Watch Out

Do not divide a small dataset into training and testing subsets merely because that is the default workflow in a software tutorial. The resulting loss of development information and imprecision of test performance may be substantial, particularly when outcomes are uncommon.

Internal validation should be designed to produce a credible assessment of model optimism while using the available data appropriately.

07 · A Quick Checklist

Before Choosing an Internal Validation Strategy

Before finalizing the validation procedure, check:
Determine whether the objective is internal optimism assessment or independent external validation.
Assess the available sample size, event count, and candidate model complexity.
Evaluate whether a single random split would leave insufficient development or test information.
Choose bootstrap or cross-validation procedures appropriate to the model and data structure.
Include feature selection, preprocessing, and tuning within resampling where appropriate.
Use nested evaluation when extensive model selection would otherwise contaminate performance estimates.
Respect clustering, repeated observations, and temporal dependence in the validation partitions.
Evaluate calibration and discrimination using suitable methods.
Report the resampling procedure and distinguish apparent from internally validated performance.
Plan external validation when the model is intended for consequential use beyond the development setting.
08 · Frequently Asked Questions

Frequently Asked Questions About Internal Validation and Train-Test Splits

Is a train-test split a valid internal validation method?

Yes, when properly implemented, but it may be inefficient and unstable in limited datasets. Bootstrap and cross-validation methods are often preferable for estimating internal performance.

Why is a 70:30 split sometimes discouraged?

It reserves 30% of observations from development and may leave relatively few outcome events for either model fitting or precise performance evaluation.

Is bootstrapping better than cross-validation?

Neither is universally superior. Bootstrapping is useful for optimism correction in many regression models, while cross-validation is flexible for evaluating and tuning diverse modeling approaches.

How many folds should cross-validation use?

There is no universally optimal number. Five-fold and ten-fold procedures are common, but the choice should reflect sample size, outcome frequency, computational cost, and the validation objective.

What is nested cross-validation?

It separates model tuning within inner resampling from performance evaluation in outer resampling, reducing selection-related optimism.

Should imputation and feature selection occur inside cross-validation?

Learned preprocessing and outcome-informed feature selection should generally be performed within the training portions of resampling to avoid leakage into evaluation observations.

Can cross-validation eliminate overfitting?

No. It can help assess overfitting and compare development strategies, but adequate data and appropriate model complexity remain necessary.

Does internal validation make external validation unnecessary?

No. Internal validation assesses performance within the development source. External validation evaluates the fixed model in independent observations relevant to its intended application.

09 · The Bottom Line

Internal Validation Should Assess Optimism Without Unnecessarily Wasting Data

The Bottom Line

A single random train-test split can provide an internal performance assessment, but it is often inefficient when data or outcome events are limited. Bootstrapping and appropriately implemented cross-validation can provide more informative estimates while making better use of the development dataset.

The validation procedure must reproduce the complete modeling process, prevent information leakage, and respect the structure of the observations. Even rigorous internal validation does not replace independent external evaluation when predictions are intended for use beyond the development setting.

10 · Sources and Further Reading

Foundational Sources on Internal Validation and Resampling

11 · Cite this Guide

How to Cite This Guide

This guide is intended to be read, shared, and used in research, teaching, and academic work. If you draw on its ideas, explanations, or other content, please acknowledge the source by citing the guide. Doing so gives appropriate credit and helps your readers locate the original resource.

Has the Field Guide helped your research?

If a guide helped clarify a question, inform a research decision, or move your work forward, I would love to hear about your experience. Your story may also help other researchers discover the Field Guide.

Share Your Experience
Takes only a few minutes