Skip to content

Commit

Permalink
Linting
Browse files Browse the repository at this point in the history
  • Loading branch information
Furkan-rgb committed Nov 5, 2024
1 parent edc3070 commit 14f6d6a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions package/samplers/catcma/catcma.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,9 @@ def sample_relative(
if len(solution_trials) >= popsize:
# Calculate the number of categorical variables and maximum number of choices
num_categorical_vars = len(categorical_search_space)
max_num_choices = max(len(space.choices) for space in categorical_search_space.values())
max_num_choices = max(
len(space.choices) for space in categorical_search_space.values()
)

# Prepare solutions list
solutions: List[Tuple[Tuple[np.ndarray, np.ndarray], float]] = []
Expand All @@ -212,7 +214,7 @@ def sample_relative(

# Convert numerical parameters
x = trans.transform({k: t.params[k] for k in numerical_search_space.keys()})

# Convert categorial values to one-hot vectors.
# Example:
# choices = ['a', 'b', 'c']
Expand Down

0 comments on commit 14f6d6a

Please sign in to comment.