Skip to content

Commit c29cf6e

Browse files
committed
Add option for minimum term contribution
1 parent 6846c41 commit c29cf6e

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

extrap/modelers/single_parameter/abstract_base.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
from extrap.entities.functions import ConstantFunction
1515
from extrap.entities.hypotheses import Hypothesis, SingleParameterHypothesis, MAX_HYPOTHESIS, ConstantHypothesis
1616
from extrap.entities.measurement import Measurement, Measure
17-
from extrap.entities.parameter import Parameter
1817
from extrap.modelers.abstract_modeler import AbstractModeler
1918
from extrap.modelers.modeler_options import modeler_options
2019

@@ -33,10 +32,12 @@ class AbstractSingleParameterModeler(AbstractModeler, ABC):
3332
compare_with_RSS = modeler_options.add(False, bool,
3433
'If enabled the models are compared using their residual sum of squares '
3534
'(RSS) instead of their symmetric mean absolute percentage error (SMAPE)')
35+
minimum_term_contribution = modeler_options.add(0.0005, float, # value for the minimum term contribution
36+
'Minimum contribution of a term to be included in the model')
3637

3738
def __init__(self, use_measure: Union[bool, Measure]):
3839
super().__init__(use_measure)
39-
self.epsilon = 0.0005 # value for the minimum term contribution
40+
self.epsilon = 0.0005
4041

4142
def compare_hypotheses(self, old: Hypothesis, new: SingleParameterHypothesis, measurements: Sequence[Measurement]):
4243
"""

0 commit comments

Comments
 (0)