diff --git a/deerlab/model.py b/deerlab/model.py index 406804d3..252b95b6 100644 --- a/deerlab/model.py +++ b/deerlab/model.py @@ -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('^')