Changeset 247
- Timestamp:
- 05/30/10 13:21:08 (6 years ago)
- Location:
- mystic/mystic
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
mystic/mystic/differential_evolution.py
r242 r247 216 216 217 217 strategy -- the mutation strategy for generating new trial 218 solutions [default = Best1 Exp]218 solutions [default = Best1Bin] 219 219 CrossProbability -- the probability of cross-parameter mutations 220 [default = 0. 5]220 [default = 0.9] 221 221 ScalingFactor -- multiplier for the impact of mutations on the 222 trial solution [default = 0. 7]222 trial solution [default = 0.8] 223 223 callback -- an optional user-supplied function to call after each 224 224 iteration. It is called as callback(xk), where xk is … … 228 228 """ 229 229 #allow for inputs that don't conform to AbstractSolver interface 230 from mystic.strategy import Best1 Exp231 strategy=Best1 Exp#mutation strategy (see mystic.strategy)232 CrossProbability=0. 5#potential for parameter cross-mutation233 ScalingFactor=0. 7#multiplier for mutation impact230 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 234 234 callback=None #user-supplied function, called after each step 235 235 disp=0 #non-zero to print convergence messages … … 400 400 401 401 strategy -- the mutation strategy for generating new trial 402 solutions [default = Best1 Exp]402 solutions [default = Best1Bin] 403 403 CrossProbability -- the probability of cross-parameter mutations 404 [default = 0. 5]404 [default = 0.9] 405 405 ScalingFactor -- multiplier for the impact of mutations on the 406 trial solution [default = 0. 7]406 trial solution [default = 0.8] 407 407 callback -- an optional user-supplied function to call after each 408 408 iteration. It is called as callback(xk), where xk is … … 416 416 """ 417 417 #allow for inputs that don't conform to AbstractSolver interface 418 from mystic.strategy import Best1 Exp419 strategy=Best1 Exp#mutation strategy (see mystic.strategy)420 CrossProbability=0. 5#potential for parameter cross-mutation421 ScalingFactor=0. 7#multiplier for mutation impact418 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 422 422 callback=None #user-supplied function, called after each step 423 423 disp=0 #non-zero to print convergence messages -
mystic/mystic/tools.py
r245 r247 174 174 print "Generation %d has best Chi-Squared: %f" % (self._step, y) 175 175 if int(self._step % self._xinterval) == 0: 176 if isinstance(x,ndarray): x = list(x) 176 177 print "Generation %d has best fit parameters:\n %s" % (self._step, x) 177 178 self._step += 1 … … 210 211 x = x[0] #XXX: get the "best" fit... which should be in x[0] 211 212 if int(self._step % self._yinterval) == 0: 213 if isinstance(x,ndarray): x = list(x) 212 214 self._file.write(" %d %f %s\n" % (self._step, y, x)) 213 215 self._step += 1
Note: See TracChangeset
for help on using the changeset viewer.