auto-sklearn icon indicating copy to clipboard operation
auto-sklearn copied to clipboard

Is there any way to tune hyperparameters that are 2D arrays

Open belzheng opened this issue 2 years ago • 2 comments

Short Question Description

I want to adjust the knots position of Bspline, but it is a two-dimensional array, I don't know how to use auto-sklearn to adjust it, I will be grateful if you can give a solution.

belzheng avatar Jul 29 '23 02:07 belzheng

Hi,

You'll have to create your own custom Estimator and in the space, specify a hyperparameter for each entry of the array.

Take a look at MLP::get_hyperparameter_search_space() where we define two hyperprameters which get joined together as a single hyperparameter in the estimator

eddiebergman avatar Jul 31 '23 06:07 eddiebergman

Hi @belzheng, your __init__ doesn't take in the parameters that you mention, you'll have to accept them in the __init__. Since it's a variable amount, you might want to use kwargs in your init, i.e. __init__(self, <other named params>, **kwargs) and process them in the body using kwargs["knot_0_0"].

eddiebergman avatar Aug 01 '23 11:08 eddiebergman