Skip to content

Commit 73e029f

Browse files
authored
Update ConstraintViaSBP.jl
1 parent 67a949c commit 73e029f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

paper/ConstraintViaSBP.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ function main()
127127

128128
@inline function loss_new_(elem, validate::Bool)
129129
try
130-
if isnan(mean(elem.fitness)) || validate
130+
if isnan(mean(elem.fitness)) && elem.dimension_homogene || validate
131131
y_pred = elem.compiled_function(x_train', regressor.operators_)
132132
fit = sqrt(get_loss_function("mse")(y_train, y_pred))
133133
elem.fitness = (fit+length(elem.expression_raw)*0.1*fit,)
@@ -140,7 +140,7 @@ function main()
140140

141141
#perform the regression by entering epochs, population_size, the feature cols, the target col and the loss function
142142
fit!(regressor, epochs, population_size, loss_new_; target_dimension=target_dim,
143-
break_condition=break_condition)
143+
break_condition=break_condition, correction_amount=0.5)
144144

145145
end_time = (time_ns() - start_time) / 1e9
146146
elem = regressor.best_models_[1]

0 commit comments

Comments
 (0)