Changeset 247


Ignore:
Timestamp:
05/30/10 13:21:08 (6 years ago)
Author:
mmckerns
Message:

DEsolver uses 'best' defaults (see ticket #113);
SOW always prints or logs list for x

Location:
mystic/mystic
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • mystic/mystic/differential_evolution.py

    r242 r247  
    216216 
    217217    strategy -- the mutation strategy for generating new trial 
    218         solutions [default = Best1Exp] 
     218        solutions [default = Best1Bin] 
    219219    CrossProbability -- the probability of cross-parameter mutations 
    220         [default = 0.5] 
     220        [default = 0.9] 
    221221    ScalingFactor -- multiplier for the impact of mutations on the 
    222         trial solution [default = 0.7] 
     222        trial solution [default = 0.8] 
    223223    callback -- an optional user-supplied function to call after each 
    224224        iteration.  It is called as callback(xk), where xk is 
     
    228228        """ 
    229229        #allow for inputs that don't conform to AbstractSolver interface 
    230         from mystic.strategy import Best1Exp 
    231         strategy=Best1Exp    #mutation strategy (see mystic.strategy) 
    232         CrossProbability=0.5 #potential for parameter cross-mutation 
    233         ScalingFactor=0.7    #multiplier for mutation impact 
     230        from mystic.strategy import Best1Bin 
     231        strategy=Best1Bin    #mutation strategy (see mystic.strategy) 
     232        CrossProbability=0.9 #potential for parameter cross-mutation 
     233        ScalingFactor=0.8    #multiplier for mutation impact 
    234234        callback=None        #user-supplied function, called after each step 
    235235        disp=0               #non-zero to print convergence messages 
     
    400400 
    401401    strategy -- the mutation strategy for generating new trial 
    402         solutions [default = Best1Exp] 
     402        solutions [default = Best1Bin] 
    403403    CrossProbability -- the probability of cross-parameter mutations 
    404         [default = 0.5] 
     404        [default = 0.9] 
    405405    ScalingFactor -- multiplier for the impact of mutations on the 
    406         trial solution [default = 0.7] 
     406        trial solution [default = 0.8] 
    407407    callback -- an optional user-supplied function to call after each 
    408408        iteration.  It is called as callback(xk), where xk is 
     
    416416        """ 
    417417        #allow for inputs that don't conform to AbstractSolver interface 
    418         from mystic.strategy import Best1Exp 
    419         strategy=Best1Exp    #mutation strategy (see mystic.strategy) 
    420         CrossProbability=0.5 #potential for parameter cross-mutation 
    421         ScalingFactor=0.7    #multiplier for mutation impact 
     418        from mystic.strategy import Best1Bin 
     419        strategy=Best1Bin    #mutation strategy (see mystic.strategy) 
     420        CrossProbability=0.9 #potential for parameter cross-mutation 
     421        ScalingFactor=0.8    #multiplier for mutation impact 
    422422        callback=None        #user-supplied function, called after each step 
    423423        disp=0               #non-zero to print convergence messages 
  • mystic/mystic/tools.py

    r245 r247  
    174174            print "Generation %d has best Chi-Squared: %f" % (self._step, y) 
    175175        if int(self._step % self._xinterval) == 0: 
     176            if isinstance(x,ndarray): x = list(x) 
    176177            print "Generation %d has best fit parameters:\n %s" % (self._step, x) 
    177178        self._step += 1 
     
    210211            x = x[0] #XXX: get the "best" fit... which should be in x[0] 
    211212        if int(self._step % self._yinterval) == 0: 
     213            if isinstance(x,ndarray): x = list(x) 
    212214            self._file.write(" %d   %f   %s\n" % (self._step, y, x)) 
    213215        self._step += 1 
Note: See TracChangeset for help on using the changeset viewer.