pKaTool/stab_fit/myfitter.py
def estimateUncertainty(self,x,y,p,xerr=0.1,yerr=0.1,runs=10):
        """Generic version of monte carlo parameter uncert, returns
           st dev for each parameter over repeated runs"""
        plist=[]
        for r in range(runs):
            mutx=[];muty=[]
            for i in range(len(x)):
                mutx.append(x[i] + random.uniform(-xerr, xerr))
                muty.append(x[i] + random.uniform(-yerr, yerr))
            F=fitter(self.func,p,mutx,muty)
            F.fit()
            plist.append(F.params)
        result = []    
        for i in range(len(p)):           
            result.append(np.std([v[i] for v in plist]))
        return result
Generic version of monte carlo parameter uncert, returns
           st dev for each parameter over repeated runs
Generic version of monte carlo parameter uncert, returns
st dev for each parameter over repeated runs
Generic version of monte carlo parameter uncert returns st dev for each parameter over repeated runs
def estimateUncertainty(self,x,y,p,xerr=0.1,yerr=0.1,runs=10):
        plist=[]
        for r in range(runs):
            mutx=[];muty=[]
            for i in range(len(x)):
                mutx.append(x[i] + random.uniform(-xerr, xerr))
                muty.append(x[i] + random.uniform(-yerr, yerr))
            F=fitter(self.func,p,mutx,muty)
            F.fit()
            plist.append(F.params)
        result = []    
        for i in range(len(p)):           
            result.append(np.std([v[i] for v in plist]))
        return result
def estimateUncertainty ( self , x , y , p , xerr = 0.1 , yerr = 0.1 , runs = 10 ) : plist = [ ] for r in range ( runs ) : mutx = [ ] ; muty = [ ] for i in range ( len ( x ) ) : mutx . append ( x [ i ] + random . uniform ( - xerr , xerr ) ) muty . append ( x [ i ] + random . uniform ( - yerr , yerr ) ) F = fitter ( self . func , p , mutx , muty ) F . fit ( ) plist . append ( F . params ) result = [ ] for i in range ( len ( p ) ) : result . append ( np . std ( [ v [ i ] for v in plist ] ) ) return result
Generic version of monte carlo parameter uncert, returns
st dev for each parameter over repeated runs
Generic version of monte carlo parameter uncert returns st dev for each parameter over repeated runs
"""Generic version of monte carlo parameter uncert, returns
           st dev for each parameter over repeated runs"""
self
x
y
p
xerr
yerr
runs