gen_params_grid¶
In [ ]:
gen_params_grid(estimator,
nbins: int = 10,
max_nfeatures: int = 3,
lmax: int = -1,
optimized_grid: int = 0,)
Generates the estimator grid.
Parameters¶
| Name | Type | Optional | Description |
|---|---|---|---|
estimator | object | ❌ | Vertica estimator having a fit method. |
nbins | int | ✓ | Number of bins used to discretize numberical features. |
max_nfeatures | int | ✓ | Maximum number of features used to compute Random Forest, PCA... |
lmax | int | ✓ | Maximum length of the parameter grid. |
optimized_grid | int | ✓ | If set to 0, the randomness is based on the input parameters. If set to 1, the randomness is limited to some parameters, the other ones are picked based on a default grid. If set to 2, there is no randomness and a default grid is returned. |
Returns¶
list of dict : List of the different combinations.
Example¶
In [9]:
from verticapy.learn.linear_model import LogisticRegression
model = LogisticRegression(name = "public.LR_titanic",
tol = 1e-4,
max_iter = 100,
solver = 'Newton',)
from verticapy.learn.model_selection import gen_params_grid
gen_params_grid(model,
lmax = 10,)
Out[9]:
