NaiveHybridSpaceRecommender¶
- class baybe.recommenders.naive.NaiveHybridSpaceRecommender[source]¶
Bases:
PureRecommender
Recommend points by independent optimization of subspaces.
This recommender splits the hybrid search space in the discrete and continuous subspace. Each of the subspaces is optimized on its own, and the recommenders for those subspaces can be chosen upon initialization. If this recommender is used on a non-hybrid space, it uses the corresponding recommender.
Public methods
__init__
([disc_recommender, ...])Method generated by attrs for class NaiveHybridSpaceRecommender.
recommend
(searchspace[, batch_size, ...])Recommend a batch of points from the given search space.
Public attributes and properties
The recommender used for the discrete subspace.
The recommender used for the continuous subspace.
Allow to make recommendations that were measured previously.
Allow to make recommendations that were already recommended earlier.
Class variable reflecting the search space compatibility.
- __init__(disc_recommender: PureRecommender = NOTHING, cont_recommender: BayesianRecommender = NOTHING, *, allow_repeated_recommendations: bool = False, allow_recommending_already_measured: bool = True)¶
Method generated by attrs for class NaiveHybridSpaceRecommender.
For details on the parameters, see Public attributes and properties.
- recommend(searchspace: SearchSpace, batch_size: int = 1, train_x: DataFrame | None = None, train_y: DataFrame | None = None)[source]¶
Recommend a batch of points from the given search space.
- Parameters:
- Return type:
- Returns:
A dataframe containing the recommendations as individual rows.
-
allow_recommending_already_measured:
bool
¶ Allow to make recommendations that were measured previously. This only has an influence in discrete search spaces.
-
allow_repeated_recommendations:
bool
¶ Allow to make recommendations that were already recommended earlier. This only has an influence in discrete search spaces.
-
compatibility:
ClassVar
[SearchSpaceType
] = 'HYBRID'¶ Class variable reflecting the search space compatibility.
-
cont_recommender:
BayesianRecommender
¶ The recommender used for the continuous subspace. Default:
baybe.recommenders.pure.bayesian.sequential_greedy.SequentialGreedyRecommender
-
disc_recommender:
PureRecommender
¶ The recommender used for the discrete subspace. Default:
baybe.recommenders.pure.bayesian.sequential_greedy.SequentialGreedyRecommender