@@ -66,6 +66,7 @@ def test_weight_freeze(penalty_fcn):
6666 penaltyobj = Penalty (penalty_fcn ,'icc' )
6767 penaltyobj .weight .freeze (0.5 )
6868 assert penaltyobj .weight .frozen == True and penaltyobj .weight .value == 0.5
69+ penaltyobj .weight .unfreeze ()
6970# ======================================================================
7071
7172# ======================================================================
@@ -74,6 +75,7 @@ def test_fit(penalty_fcn, model, mock_data, selection):
7475 "Check fitting with a penalty with ICC-selected weight"
7576 penaltyobj = Penalty (penalty_fcn , selection )
7677 penaltyobj .weight .set (lb = 1e-6 ,ub = 1e1 )
78+ assert not penaltyobj .weight .frozen
7779 result = fit (model ,mock_data ,x ,penalties = penaltyobj )
7880 assert ovl (result .model ,mock_data )> 0.975
7981# ======================================================================
@@ -89,6 +91,7 @@ def test_fit_with_penalty_weight(penalty_fcn, model, mock_data, case):
8991 penaltyobj .weight .freeze (0.00001 )
9092 result = fit (model ,mock_data ,x ,penalties = penaltyobj )
9193 assert ovl (result .model ,mock_data )> 0.975
94+ penaltyobj .weight .unfreeze ()
9295# ======================================================================
9396
9497# ======================================================================
0 commit comments