Grid Search Combination Calculator

Plan machine learning grid searches, count every combination, estimate cross-validation workload, compare parallel execution, preview configurations, and control time, memory, storage, and cost accurately.

Calculation results
The summary updates from the complete active search configuration.
Parameter contribution
Each active parameter multiplies the base Cartesian search space.
Search strategy comparison
Compare exhaustive grid search with limited random and Bayesian trials.
StrategyTrialsTotal fitsEstimated timeCoverage
Generated combination preview
Preview valid configurations after conditions and exclusions.
Configuration formats
Copy a ready structure for Python, JSON, or YAML workflows.
Preset and search controls
Load a model preset or build a custom hyperparameter grid.
Hyperparameter grid
Add lists, numeric ranges, fixed values, and conditional parameters.
Fixed parameters appear in exports but do not multiply the combination count.
Conditional and exclusion rules
Parameter-level conditions are configured above. Add invalid combination rules here.
Use AND between exact key=value matches. Matching combinations are removed.
Validation workload
Define folds, repeats, datasets, seeds, and algorithm count.
Time and parallel execution
Estimate sequential and parallel completion time.
Resources, storage, and cost
Estimate peak usage, compute hours, and cloud expense.

Formula used

Grid search evaluates the Cartesian product of active parameter values. Conditional parameters only multiply compatible branches. Exclusion rules then remove invalid configurations.

Base combinations = V₁ × V₂ × V₃ × ... × Vₙ
Total fits = valid combinations × CV folds × repeats × datasets × seeds × model count
Parallel duration = sequential seconds ÷ (workers × efficiency)
Estimated cost = parallel hours × hourly instance cost

How to use

  1. Select a preset or create custom parameter rows.
  2. Enter comma-separated values or generate numeric ranges.
  3. Mark fixed values and configure conditional dependencies.
  4. Add exclusion rules for impossible parameter combinations.
  5. Set folds, repeats, datasets, seeds, and model count.
  6. Enter timing, worker, memory, storage, and cost assumptions.
  7. Calculate, inspect warnings, preview combinations, and export results.

Worked example

A grid with three learning rates, four depths, and two optimizers contains twenty-four combinations. Five-fold validation produces one hundred twenty model fits. Four efficient workers reduce elapsed time significantly.

ParameterValuesCount
learning_rate0.001, 0.01, 0.13
max_depth3, 6, 9, 124
optimizeradam, sgd2
Total combinations24

Frequently asked questions

What is a grid search combination?

It is one unique selection containing one value from every active hyperparameter.

Why do combinations grow quickly?

Every additional value multiplies the entire existing Cartesian search space.

Do fixed parameters increase the count?

No. They remain in exported configurations but add a multiplier of one.

How are conditional parameters counted?

They apply only when their parent parameter matches an allowed condition value.

How do exclusion rules work?

Any generated configuration matching every condition in a rule is removed.

Why are total fits larger than combinations?

Cross-validation, repeats, datasets, seeds, and models multiply training operations.

Does doubling workers halve runtime?

Only ideally. Worker efficiency accounts for scheduling, data, and communication overhead.

When should random search be preferred?

It is useful when the full grid is large or many dimensions matter unevenly.

What does Bayesian search change?

It chooses promising trials sequentially instead of exhaustively evaluating every combination.

Can the preview show millions of combinations?

The calculator limits browser generation while preserving exact analytical totals when possible.

Related Calculators

K-Fold Cross-Validation CalculatorStratified Cross-Validation CalculatorTraining Accuracy CalculatorOverfitting Detection CalculatorEarly Stopping CalculatorHyperparameter Combination CalculatorRandom Search Trial CalculatorLearning Curve Calculator

Important Note: All the Calculators listed in this site are for educational purpose only and we do not guarentee the accuracy of results. Please do consult with other sources as well.