Example #1
0
 def testOptimizerMethod(self):
     if IGNORE_TEST:
         return
     METHOD_NAME = 'differential_evolution'
     optimizerMethod = ModelFitter.OptimizerMethod(
         method=METHOD_NAME,
         kwargs={ "popsize": 100, "atol": 0.001})
     fitter1 = self._makeMikeModel(fitterMethods=[METHOD_NAME])
     fitter2 = self._makeMikeModel(fitterMethods=[optimizerMethod])
     self.assertTrue(True) # Smoke test
Example #2
0
@author: hsauro
@author: joseph-hellerstein
"""

import SBstoat
from SBstoat.modelFitter import ModelFitter
from tests import _testHelpers as th

import matplotlib
import os
import unittest

IGNORE_TEST = False
IS_PLOT = False
TIMESERIES = th.getTimeseries()
optimizerMethod = ModelFitter.OptimizerMethod(SBstoat.METHOD_LEASTSQ,
                                              kwargs={"max_nfev": 100})
FITTER = th.getFitter(
    cls=ModelFitter,
    isPlot=IS_PLOT,
    fitterMethods=[optimizerMethod],
    bootstrapMethods=[optimizerMethod],
)
FITTER.fitModel()
FITTER.bootstrap(numIteration=10)
ANTIMONY_MODEL_BENCHMARK = """
# Reactions   
    J1: S1 -> S2; k1*S1
    J2: S2 -> S3; k2*S2
# Species initializations     
    S1 = 10; S2 = 0;
    k1 = 1; k2 = 2