Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial_guess #279

Open
merung1203 opened this issue Sep 5, 2023 · 2 comments
Open

Initial_guess #279

merung1203 opened this issue Sep 5, 2023 · 2 comments

Comments

@merung1203
Copy link

Hello

How do I set the initial value when fitting a circuit?

I am using the intercept for R0, but I would like to know how to set the rest.
I would like to know why these initial values ​​are entered in the example code below.

example code)
from impedance.models.circuits import CustomCircuit

circuit = 'R0-p(R1,C1)-p(R2-Wo1,C2)'
initial_guess = [.01, .01, 100, .01, .05, 100, 1]

circuit = CustomCircuit(circuit, initial_guess=initial_guess)

If the initial value is set incorrectly, an error occurs. I wonder if it is possible to set the initial value as a range.
Thank you.

@jianzuo
Copy link

jianzuo commented Sep 18, 2023

Hi, did you manage to solve the initial value issue? I have a similar issue,
when the initial value is not properly decided, the fitted curve is inaccurate.

@quiksilver10152
Copy link

Try using the global optimization algorithm setting.
circuit.fit(frequencies, Z, global_opt = True)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants