Advertisement
Guest User

Untitled

a guest
Sep 22nd, 2019
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. #Vector of random initial values
  2. g0=[np.random.uniform(low=0,high=1) for val in range(4)]
  3.  
  4. #Minimization of the squared error by Nelder-Mead
  5. res = minimize(SquaredError, g0, method='nelder-mead',options={'xtol': 1e-3, 'maxiter':100,'disp': False})
  6.  
  7. ModelParams03=curve_fit(ModelFit,SolverTime,WhiteSignal,p0=res.x)
  8. FitSolution3=ModelSolver(SolverTime,ModelParams03[0][0],ModelParams03[0][1],ModelParams03[0][2],ModelParams03[0][3],Int)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement