Bring your best ideas to the AI Use Case Contest! Enter to win 40 hours of expert engineering support and bring your vision to life using the powerful combination of Alteryx + AI. Learn more now, or go straight to the submission form.
Start Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

python curve_fit "Optimal parameters not found"

Matthew
11 - Bolide

Hello, i have a macro that uses a python script (the Curve_Fit function) to fit a curve onto a dataset. i found a math function that describes my data very well ((a/(x+b))+c), but something weird is happening

 

When i try to run the same function on a subset of the data ([GroupBy = 'SFB'), the function either fails completely, or it gives me a curve that isnt fitted to the data at all.

 

This is the error: "RuntimeError: Optimal parameters not found: Number of calls to function has reached maxfev = 800."

 

But this makes no sense because all of the data follows the same basic shape, so the optimal parameters for any subset should be similar to the ones it finds for the whole data set

 

NothingButThyme_1-1637683995059.png

 

Is anyone familiar with the Python Curve_Fit code?

1 REPLY 1
Matthew
11 - Bolide

Ah, never mind... the reason is because i don't have enough data points for all groups..

Labels
Top Solution Authors