Skip to content

Commit

Permalink
Binary features now allow bounds
Browse files Browse the repository at this point in the history
  • Loading branch information
TobyBoyne committed Dec 31, 2024
1 parent 4057ae3 commit e1ce8d8
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions entmoot/problem_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -284,10 +284,11 @@ def add_feature(
if name is None:
name = f"feat_{len(self.feat_list)}"

if feat_type == "binary":
self._feat_list.append(Binary(name=name))
return

if bounds is None:
if feat_type == "binary":
self._feat_list.append(Binary(name=name))
return
raise ValueError(
"Please provide bounds for feature types in '(real, integer, categorical)'"
)
Expand Down

0 comments on commit e1ce8d8

Please sign in to comment.