Skip to content

Commit

Permalink
X and y fixed in regression lexicase
Browse files Browse the repository at this point in the history
  • Loading branch information
alcides committed Nov 1, 2024
1 parent 285d55d commit aa263bd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/benchmarks/regression_lexicase.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ def __init__(self, X, y, feature_names):
def setup_problem(self, data, target):

# Problem
X = data
y = target
n_cases = 50
case_size = int(len(data) / n_cases)

Expand All @@ -44,8 +46,6 @@ def calculate_grouped_errors(pred_error, n_cases, case_size):
return grouped_errors

def lexicase_fitness_function(n: Expression):
X = data
y = target

try:
y_pred = forward_dataset(n.to_numpy(), X)
Expand Down

0 comments on commit aa263bd

Please sign in to comment.