verticapy.machine_learning.model_selection.hp_tuning.parameter_grid#
- verticapy.machine_learning.model_selection.hp_tuning.parameter_grid(param_grid: dict) list[dict] #
Generates a
list
of the different combinations of input parameters.Parameters#
- param_grid: dict
dictionary
of parameters.
Returns#
- list of dict
list
of the different combinations.
Examples#
Its easy to generate a
list
of the different combinations of input parameters.from verticapy.machine_learning.model_selection.hp_tuning.param_gen import parameter_grid parameter_grid( { "nbins": [10, 100, 360], "alpha": [0.1, 0.3, 0.5], "solver": ["bfgs", "newton"], }, ) Out[2]: [{'nbins': 10, 'alpha': 0.1, 'solver': 'bfgs'}, {'nbins': 10, 'alpha': 0.1, 'solver': 'newton'}, {'nbins': 10, 'alpha': 0.3, 'solver': 'bfgs'}, {'nbins': 10, 'alpha': 0.3, 'solver': 'newton'}, {'nbins': 10, 'alpha': 0.5, 'solver': 'bfgs'}, {'nbins': 10, 'alpha': 0.5, 'solver': 'newton'}, {'nbins': 100, 'alpha': 0.1, 'solver': 'bfgs'}, {'nbins': 100, 'alpha': 0.1, 'solver': 'newton'}, {'nbins': 100, 'alpha': 0.3, 'solver': 'bfgs'}, {'nbins': 100, 'alpha': 0.3, 'solver': 'newton'}, {'nbins': 100, 'alpha': 0.5, 'solver': 'bfgs'}, {'nbins': 100, 'alpha': 0.5, 'solver': 'newton'}, {'nbins': 360, 'alpha': 0.1, 'solver': 'bfgs'}, {'nbins': 360, 'alpha': 0.1, 'solver': 'newton'}, {'nbins': 360, 'alpha': 0.3, 'solver': 'bfgs'}, {'nbins': 360, 'alpha': 0.3, 'solver': 'newton'}, {'nbins': 360, 'alpha': 0.5, 'solver': 'bfgs'}, {'nbins': 360, 'alpha': 0.5, 'solver': 'newton'}]
Note
This function is essential for conducting a
grid_search_cv()
.See also
gen_params_grid()
: Generates the estimator grid.