Skip to content

Commit

Permalink
resolve linting issues
Browse files Browse the repository at this point in the history
  • Loading branch information
tkchafin committed May 9, 2024
1 parent 7404029 commit 3fd3378
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
1 change: 0 additions & 1 deletion scripts/runResistnet.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#!/usr/bin/env python3
import os
import sys
import random
from datetime import datetime

Expand Down
1 change: 0 additions & 1 deletion src/resistnet/hall_of_fame.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ def check_population(self, pop):
return

popDF = popDF.sort_values("fitness", ascending=False)
#popDF = popDF.drop_duplicates(keep="first", ignore_index=True)
popDF = self.drop_active_duplicates(popDF, self.variables)
popDF = popDF.reset_index(drop=True)
space = self.max_size - self.data.shape[0]
Expand Down
8 changes: 5 additions & 3 deletions src/resistnet/model_optimisation.py
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,7 @@ def model_average(self, out="", plot=True):
oname = f"{out}.Model-Best"
self.resistance_network.output_and_plot_model(
oname, matrix_r, edge_r
)
)

if self.report_all:
oname = f"{out}.Model-{model_num}"
Expand All @@ -524,8 +524,10 @@ def parse_fixed_params(self, fixed_params):
best_params = dict()
for var in df["variable"].unique():
var_df = df[df['variable'] == var]
best = var_df.loc[var_df['fitness'] == var_df['fitness'].min()]
best = best.sort_values(by=['shape', 'transform']).iloc[0]
best = var_df.loc[
var_df['fitness'] == var_df['fitness'].min()]
best = best.sort_values(
by=['shape', 'transform']).iloc[0]
best_params[var] = {
'transform': best['transform'],
'shape': best['shape']
Expand Down

0 comments on commit 3fd3378

Please sign in to comment.