Skip to content

Commit

Permalink
Minor edits to files edited in previous PRs (#356)
Browse files Browse the repository at this point in the history
* fix minor logic error

* minor documentation update

* fix minor bug
  • Loading branch information
luisfabib committed Jul 30, 2022
1 parent 8198dcd commit 013b383
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions deerlab/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -939,15 +939,17 @@ def _print_fitresults(fitresult,model):

hasregularization = fitresult.regparam!=0
haspenalties = fitresult.penweights
if hasregularization and haspenalties:
if hasregularization or haspenalties:
string += 'Model hyperparameters: \n'
tags = []
values = []
alignment = []
if hasregularization:
alignment.append('^')
tags.append('Regularization parameter')
values.append(fitresult.regparam)
tags.append('Regularization parameter')
regparam = fitresult.regparam
if regparam is None: regparam = 0
values.append(regparam)
if haspenalties:
for n,penweight in enumerate(fitresult.penweights):
alignment.append('^')
Expand Down

0 comments on commit 013b383

Please sign in to comment.