Skip to content

Commit

Permalink
Improve printing
Browse files Browse the repository at this point in the history
  • Loading branch information
manuel-calzolari committed Dec 27, 2021
1 parent 323acdf commit f36b9bc
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions genetic_selection/gscv.py
Original file line number Diff line number Diff line change
Expand Up @@ -342,9 +342,11 @@ def _fit(self, X, y, groups=None):
if self.verbose > 0:
print("Selecting features with genetic algorithm.")

_, log = _eaFunction(pop, toolbox, cxpb=self.crossover_proba, mutpb=self.mutation_proba,
ngen=self.n_generations, ngen_no_change=self.n_gen_no_change,
stats=stats, halloffame=hof, verbose=self.verbose)
with np.printoptions(precision=6, suppress=True, sign=" "):
_, log = _eaFunction(pop, toolbox, cxpb=self.crossover_proba,
mutpb=self.mutation_proba, ngen=self.n_generations,
ngen_no_change=self.n_gen_no_change,
stats=stats, halloffame=hof, verbose=self.verbose)
if self.n_jobs != 1:
pool.close()
pool.join()
Expand Down

0 comments on commit f36b9bc

Please sign in to comment.