-
-
Save yannabraham/5f210fed773785d8b638 to your computer and use it in GitHub Desktop.
@jhfc Thanks for your feedback, and sorry about the late answer: those functions belong to the numpy package and were incorrectly called. The source is now fixed.
I am getting this error. I checked and found that there is no plt.plot in seaborn.
sns.plt.plot([pDose(i) for i in refDose],[ll4(i,*[fit[i] for i in ['b','c','d','e']]) for i in refDose])
AttributeError: 'module' object has no attribute 'plt'
import matplotlib.pyplot as plt is missing from the imports
and
sns.plt.plot needs to be modified to plt.plot
for fit in fitData:
plt.plot([pDose(i) for i in refDose],[ll4(i,*[fit[i] for i in ['b','c','d','e']]) for i in refDose])
Thanks! Fixed the code as you suggested, should work now @akashbahai @cbmII
How would you go about implementing a 1/Y^2 weighting and returning their parameter values as well as visualising the line on the graph?
Hey @Fae14, this link should give you a few pointers:
https://stackoverflow.com/questions/27696324/using-scipy-optimize-curve-fit-with-weights
Hope this helps!
Nice attempt. May be code should be more explanatory and have more comments,
When I try running it, in the fifth block I get
NameError Traceback (most recent call last)
in ()
3 # generate base curve
4 curData = pd.DataFrame(data={'compound':curve['compound'],
----> 5 'dose':curve['startDose']/power(curve['dilution'],range(curve['nDose']))})
6 curData['logDose'] = pDose(curData.dose)
7 curData['response'] = curData.dose.apply(lambda x: ll4(x,*[curve[i] for i in ['b','c','d','e']]))
NameError: name 'power' is not defined
any idea what's going on here?