Fitting a curve to a power-law distribution with curve_fit does not work
I am trying to find a curve fitting my data that visually seem to have a power law distribution. I hoped to utilize scipy.optimize.curve_fit, but no matter what function or data normalization I try, I am getting either a RuntimeError (parameters not found or overflow) or a curve that does not fit my data even remotely. Please help me to figure out what I am doing wrong here. %matplotlib inline import numpy as np import pandas as pd import matplotlib.pyplot as plt from scipy.optimize import curve_fit df = pd.DataFrame({ 'x': [ 1000, 3250, 5500, 10000, 32500, 55000, 77500, 100000, 200000 ], 'y':
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.