parameter_grid

In [ ]:
parameter_grid(param_grid: dict,)

Generates the list of the different combinations of input parameters.

Parameters

Name Type Optional Description
param_grid
dict
❌
Dictionary of parameters.

Returns

list of dict : List of the different combinations.

Example

In [10]:
from verticapy.learn.model_selection import parameter_grid
parameter_grid({"solver": ["Newton", "BFGS"],
                "tol": [1e-9, 1e-6, 1e-4],
                "max_iter": [10, 100, 1000],},)
Out[10]:
[{'max_iter': 10, 'solver': 'Newton', 'tol': 1e-09},
 {'max_iter': 100, 'solver': 'Newton', 'tol': 1e-09},
 {'max_iter': 1000, 'solver': 'Newton', 'tol': 1e-09},
 {'max_iter': 10, 'solver': 'Newton', 'tol': 1e-06},
 {'max_iter': 100, 'solver': 'Newton', 'tol': 1e-06},
 {'max_iter': 1000, 'solver': 'Newton', 'tol': 1e-06},
 {'max_iter': 10, 'solver': 'Newton', 'tol': 0.0001},
 {'max_iter': 100, 'solver': 'Newton', 'tol': 0.0001},
 {'max_iter': 1000, 'solver': 'Newton', 'tol': 0.0001},
 {'max_iter': 10, 'solver': 'BFGS', 'tol': 1e-09},
 {'max_iter': 100, 'solver': 'BFGS', 'tol': 1e-09},
 {'max_iter': 1000, 'solver': 'BFGS', 'tol': 1e-09},
 {'max_iter': 10, 'solver': 'BFGS', 'tol': 1e-06},
 {'max_iter': 100, 'solver': 'BFGS', 'tol': 1e-06},
 {'max_iter': 1000, 'solver': 'BFGS', 'tol': 1e-06},
 {'max_iter': 10, 'solver': 'BFGS', 'tol': 0.0001},
 {'max_iter': 100, 'solver': 'BFGS', 'tol': 0.0001},
 {'max_iter': 1000, 'solver': 'BFGS', 'tol': 0.0001}]