pKaTool/stab_fit/myfitter.py
def fit(self, method='simplex'):
        """Fit by minimizing r-squared using various algorithms"""
        #downhill simplex algorithm
        if method == 'simplex':
            p = scipy.optimize.fmin(self.evaluate, self.params)
        #using scipy version of levenberg-Marquardt algorithm  
        elif method == 'lm':   
            p,ier = scipy.optimize.leastsq(self.residuals, self.params)
        self.params = p
        fit=[self.func(i,p) for i in self.x]
        self.fit = fit
        return fit
Fit by minimizing r-squared using various algorithms
Fit by minimizing r-squared using various algorithms
Fit by minimizing r - squared using various algorithms
def fit(self, method='simplex'):
        if method == 'simplex':
            p = scipy.optimize.fmin(self.evaluate, self.params)
        elif method == 'lm':   
            p,ier = scipy.optimize.leastsq(self.residuals, self.params)
        self.params = p
        fit=[self.func(i,p) for i in self.x]
        self.fit = fit
        return fit
def fit ( self , method = 'simplex' ) : if method == 'simplex' : p = scipy . optimize . fmin ( self . evaluate , self . params ) elif method == 'lm' : p , ier = scipy . optimize . leastsq ( self . residuals , self . params ) self . params = p fit = [ self . func ( i , p ) for i in self . x ] self . fit = fit return fit
Fit by minimizing r-squared using various algorithms
Fit by minimizing r - squared using various algorithms
"""Fit by minimizing r-squared using various algorithms""" #downhill simplex algorithm #using scipy version of levenberg-Marquardt algorithm  
self
method