Skip to content

Commit

Permalink
bug in univariate gridsearch
Browse files Browse the repository at this point in the history
  • Loading branch information
tkchafin committed May 15, 2024
1 parent 9d570b0 commit 32e2ffe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/resistnet/model_optimisation.py
Original file line number Diff line number Diff line change
Expand Up @@ -953,7 +953,7 @@ def optimise_univariate(self, fitmetric="aic", threads=1,
df = pd.DataFrame(results_data)
for var in self.resistance_network.variables:
var_df = df[df['variable'] == var]
best = var_df.loc[var_df['fitness'] == var_df['fitness'].min()]
best = var_df.loc[var_df['fitness'] == var_df['fitness'].max()]
best = best.sort_values(by=['shape', 'transform']).iloc[0]
best_params[var] = {
'transform': best['transform'],
Expand Down

0 comments on commit 32e2ffe

Please sign in to comment.