@@ -72,10 +72,6 @@ class BOPDMDOperator(DMDOperator):
7272 function that will be applied to the computed eigenvalues at each step
7373 of the variable projection routine.
7474 :type eig_constraints: set(str) or function
75- :param bag_warning: Number of consecutive non-converged trials of BOP-DMD
76- at which to produce a warning message for the user. Default is 100.
77- Use arguments less than or equal to zero for no warning condition.
78- :type bag_warning: int
7975 :param bag_maxfail: Number of consecutive non-converged trials of BOP-DMD
8076 at which to terminate the fit. Default is -1, no stopping condition.
8177 :type bag_maxfail: int
@@ -128,7 +124,6 @@ def __init__(
128124 trial_size ,
129125 eig_sort ,
130126 eig_constraints ,
131- bag_warning ,
132127 bag_maxfail ,
133128 init_lambda = 1.0 ,
134129 maxlam = 52 ,
@@ -148,7 +143,6 @@ def __init__(
148143 self ._trial_size = trial_size
149144 self ._eig_sort = eig_sort
150145 self ._eig_constraints = eig_constraints
151- self ._bag_warning = bag_warning
152146 self ._bag_maxfail = bag_maxfail
153147 self ._varpro_opts = [
154148 init_lambda ,
@@ -815,14 +809,14 @@ def compute_operator(self, H, t):
815809
816810 if (
817811 not runtime_warning_given
818- and num_consecutive_fails == self . _bag_warning
812+ and num_consecutive_fails == 100
819813 ):
820814 msg = (
821- "{} many trials without convergence. "
815+ "100 trials without convergence. "
822816 "Consider loosening the tol requirements "
823817 "of the variable projection routine."
824818 )
825- print (msg . format ( num_consecutive_fails ) )
819+ print (msg )
826820 runtime_warning_given = True
827821
828822 elif num_consecutive_fails == self ._bag_maxfail :
@@ -924,10 +918,6 @@ class BOPDMD(DMDBase):
924918 function that will be applied to the computed eigenvalues at each step
925919 of the variable projection routine.
926920 :type eig_constraints: set(str) or function
927- :param bag_warning: Number of consecutive non-converged trials of BOP-DMD
928- at which to produce a warning message for the user. Default is 100.
929- Use arguments less than or equal to zero for no warning condition.
930- :type bag_warning: int
931921 :param bag_maxfail: Number of consecutive non-converged trials of BOP-DMD
932922 at which to terminate the fit. Default is -1, no stopping condition.
933923 :type bag_maxfail: int
@@ -952,7 +942,6 @@ def __init__(
952942 trial_size = 0.6 ,
953943 eig_sort = "auto" ,
954944 eig_constraints = None ,
955- bag_warning = 100 ,
956945 bag_maxfail = - 1 ,
957946 varpro_opts_dict = None ,
958947 ):
@@ -965,14 +954,13 @@ def __init__(
965954 self ._trial_size = trial_size
966955 self ._eig_sort = eig_sort
967956
968- if not isinstance (bag_warning , int ) or not isinstance ( bag_maxfail , int ):
957+ if not isinstance (bag_maxfail , int ):
969958 msg = (
970- "bag_warning and bag_maxfail must be integers . "
959+ "bag_maxfail must be an integer . "
971960 "Please use a non-positive integer if no warning "
972961 "or stopping condition is desired."
973962 )
974963 raise TypeError (msg )
975- self ._bag_warning = bag_warning
976964 self ._bag_maxfail = bag_maxfail
977965
978966 if varpro_opts_dict is None :
@@ -1342,7 +1330,6 @@ def fit(self, X, t):
13421330 self ._trial_size ,
13431331 self ._eig_sort ,
13441332 self ._eig_constraints ,
1345- self ._bag_warning ,
13461333 self ._bag_maxfail ,
13471334 ** self ._varpro_opts_dict ,
13481335 )
0 commit comments