Skip to main content
deleted 5 characters in body
Source Link
VladM
  • 93
  • 7

I need to fit a complex function $f(z)$ of the form

f[z]=(p_1[z]+p_2[z]^p1[z]+p2[z]^(1/3)+p_3[z]^+p3[z]^(2/3)})/(1+p_5[z]^1+p5[z]^(5/6)+p_6[z]^+p6[z]^(19/6))

where all $p_i(z)$ are polynomials of degree up to $8$ in $z$ with real coefficients. So, there are about 20-30 real parameters. The data are provided in the form of $400$ complex pairs $(z,f(z))$, $|z|<0.2$ (or a subset of $100, 200$ points). The accuracy of the data is $10^{-10}$. The coefficients of all polynomials decrease fast. The fit is done using MulitNonlinearModelFit,

fit=MultiNonlinearModelFit[{dataRe[LIST], dataIm[LIST]},ComplexExpand[ReIm[Model]],InitialValues,{x, y}]

where LIST is the array of points of the form $\{z_i,f(z_i)\}$ and Model=f[x+I*y]. It works reasonably well when I restrict degrees of polynomials to $4,5$. I get the error of the fit roughly $10^{-6}$. So, I know the location of the minimum and need to increase accuracy to $10^{-10}$ by increasing degrees of polynomials to $8$.

First, I managed to increase accuracy to $10^{-8}$ with the degrees $5,6$, Method to Automatic in the fit, it took about 30 mins. When I increased degrees to $8$, Mathematica got stuck. I ran it first on PC and then on the Unix cluster for 10 hours and it consumed 90% of the cluster memory, 180 Gb, before I stopped it. Apparently, it lost the local minimum which was known from previous runs. I decided to try some local methods like Newton, ConjugateGradient and others. They worked but didn't increase the accuracy of the initial guess at all. I have a few questions:

  1. Is it possible to output the method used by MulitNonlinearModelFit, when it is set to Automatic? I am curious about what method it is using to increase the accuracy of the initial guess.
  2. How to monitor the progress of the MultiNonlinearModelFit? I tried adding the last argument after {x,y} as EvaluationMonitor:>Print["test"] (or StepMonitor) and there is no output.
  3. Can you recommend the local method which may work in this situation?

Thanks for reading.

I need to fit a complex function $f(z)$ of the form

f[z]=(p_1[z]+p_2[z]^(1/3)+p_3[z]^(2/3)}/(1+p_5[z]^(5/6)+p_6[z]^(19/6))

where all $p_i(z)$ are polynomials of degree up to $8$ in $z$ with real coefficients. So, there are about 20-30 real parameters. The data are provided in the form of $400$ complex pairs $(z,f(z))$, $|z|<0.2$ (or a subset of $100, 200$ points). The accuracy of the data is $10^{-10}$. The coefficients of all polynomials decrease fast. The fit is done using MulitNonlinearModelFit,

fit=MultiNonlinearModelFit[{dataRe[LIST], dataIm[LIST]},ComplexExpand[ReIm[Model]],InitialValues,{x, y}]

where LIST is the array of points of the form $\{z_i,f(z_i)\}$ and Model=f[x+I*y]. It works reasonably well when I restrict degrees of polynomials to $4,5$. I get the error of the fit roughly $10^{-6}$. So, I know the location of the minimum and need to increase accuracy to $10^{-10}$ by increasing degrees of polynomials to $8$.

First, I managed to increase accuracy to $10^{-8}$ with the degrees $5,6$, Method to Automatic in the fit, it took about 30 mins. When I increased degrees to $8$, Mathematica got stuck. I ran it first on PC and then on the Unix cluster for 10 hours and it consumed 90% of the cluster memory, 180 Gb, before I stopped it. Apparently, it lost the local minimum which was known from previous runs. I decided to try some local methods like Newton, ConjugateGradient and others. They worked but didn't increase the accuracy of the initial guess at all. I have a few questions:

  1. Is it possible to output the method used by MulitNonlinearModelFit, when it is set to Automatic? I am curious about what method it is using to increase the accuracy of the initial guess.
  2. How to monitor the progress of the MultiNonlinearModelFit? I tried adding the last argument after {x,y} as EvaluationMonitor:>Print["test"] (or StepMonitor) and there is no output.
  3. Can you recommend the local method which may work in this situation?

Thanks for reading.

I need to fit a complex function $f(z)$ of the form

f[z]=(p1[z]+p2[z]^(1/3)+p3[z]^(2/3))/(1+p5[z]^(5/6)+p6[z]^(19/6))

where all $p_i(z)$ are polynomials of degree up to $8$ in $z$ with real coefficients. So, there are about 20-30 real parameters. The data are provided in the form of $400$ complex pairs $(z,f(z))$, $|z|<0.2$ (or a subset of $100, 200$ points). The accuracy of the data is $10^{-10}$. The coefficients of all polynomials decrease fast. The fit is done using MulitNonlinearModelFit,

fit=MultiNonlinearModelFit[{dataRe[LIST], dataIm[LIST]},ComplexExpand[ReIm[Model]],InitialValues,{x, y}]

where LIST is the array of points of the form $\{z_i,f(z_i)\}$ and Model=f[x+I*y]. It works reasonably well when I restrict degrees of polynomials to $4,5$. I get the error of the fit roughly $10^{-6}$. So, I know the location of the minimum and need to increase accuracy to $10^{-10}$ by increasing degrees of polynomials to $8$.

First, I managed to increase accuracy to $10^{-8}$ with the degrees $5,6$, Method to Automatic in the fit, it took about 30 mins. When I increased degrees to $8$, Mathematica got stuck. I ran it first on PC and then on the Unix cluster for 10 hours and it consumed 90% of the cluster memory, 180 Gb, before I stopped it. Apparently, it lost the local minimum which was known from previous runs. I decided to try some local methods like Newton, ConjugateGradient and others. They worked but didn't increase the accuracy of the initial guess at all. I have a few questions:

  1. Is it possible to output the method used by MulitNonlinearModelFit, when it is set to Automatic? I am curious about what method it is using to increase the accuracy of the initial guess.
  2. How to monitor the progress of the MultiNonlinearModelFit? I tried adding the last argument after {x,y} as EvaluationMonitor:>Print["test"] (or StepMonitor) and there is no output.
  3. Can you recommend the local method which may work in this situation?

Thanks for reading.

Source Link
VladM
  • 93
  • 7

The method to use for MultiNonlinearModelFit

I need to fit a complex function $f(z)$ of the form

f[z]=(p_1[z]+p_2[z]^(1/3)+p_3[z]^(2/3)}/(1+p_5[z]^(5/6)+p_6[z]^(19/6))

where all $p_i(z)$ are polynomials of degree up to $8$ in $z$ with real coefficients. So, there are about 20-30 real parameters. The data are provided in the form of $400$ complex pairs $(z,f(z))$, $|z|<0.2$ (or a subset of $100, 200$ points). The accuracy of the data is $10^{-10}$. The coefficients of all polynomials decrease fast. The fit is done using MulitNonlinearModelFit,

fit=MultiNonlinearModelFit[{dataRe[LIST], dataIm[LIST]},ComplexExpand[ReIm[Model]],InitialValues,{x, y}]

where LIST is the array of points of the form $\{z_i,f(z_i)\}$ and Model=f[x+I*y]. It works reasonably well when I restrict degrees of polynomials to $4,5$. I get the error of the fit roughly $10^{-6}$. So, I know the location of the minimum and need to increase accuracy to $10^{-10}$ by increasing degrees of polynomials to $8$.

First, I managed to increase accuracy to $10^{-8}$ with the degrees $5,6$, Method to Automatic in the fit, it took about 30 mins. When I increased degrees to $8$, Mathematica got stuck. I ran it first on PC and then on the Unix cluster for 10 hours and it consumed 90% of the cluster memory, 180 Gb, before I stopped it. Apparently, it lost the local minimum which was known from previous runs. I decided to try some local methods like Newton, ConjugateGradient and others. They worked but didn't increase the accuracy of the initial guess at all. I have a few questions:

  1. Is it possible to output the method used by MulitNonlinearModelFit, when it is set to Automatic? I am curious about what method it is using to increase the accuracy of the initial guess.
  2. How to monitor the progress of the MultiNonlinearModelFit? I tried adding the last argument after {x,y} as EvaluationMonitor:>Print["test"] (or StepMonitor) and there is no output.
  3. Can you recommend the local method which may work in this situation?

Thanks for reading.