linfitCheby [Revisit]

linfitCheby [Revisit] - linfitCheby [Revisit] - Messages

#1 Posted: 2/21/2019 1:35:46 PM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

linfitCheby is one so many fitting techniques.
In this example doing extraordinary well where none else cut the mustard.
Coefficients are transited/isolated via spool to file.
It should create the C:\SmathFile by itself, if not => create it.
Data set from unknown source/application.

Jean

Genfit linfitCheby.sm (71 KiB) downloaded 81 time(s).
#2 Posted: 2/21/2019 3:37:47 PM
Radovan Omorjan

Radovan Omorjan

325 likes in 2052 posts.

Group: Moderator

Hello Jean,

I appreciate very much many of your fitting/interpolation examples. However, if I recall well I think that all of your examples were based on a single independent and a single dependent variable with many unknown parameters. If I was wrong, please excuse me.

On the other hand, I find almost impossible to solve in SMath a nonlinear (based on parameters) fitting problem with a single dependent variable and many independent ones. There are no similar functions like Mathcad mineer(), genfit() or LeastSquaresFit() which will solve the general nonlinear fitting problem with many independent variables.

Regards,
Radovan
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
#3 Posted: 2/21/2019 4:12:43 PM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

Wrote

I appreciate very much many of your fitting/interpolation examples. However, if I recall well I think that all of your examples were based on a single independent and a single dependent variable with many unknown parameters.



Hello Radovan,
I read you well, tough we don't have the Mathcad basis Genfit, the core
component of Minerr, the Smath Genfit fits unknown parameters. Easy or
not easy to fit depends upon the reflexivity of the model function.
Even so, Mathcad can't fit some model functions. The limit in Smath
Genfit is at least 4 or more from recollection.
Actually, there is an immense brew of fitting techniques, it might
turn Vodka with age. Post your example(s) of raw data, will try.

Cheers Radovan ... see you soon ... Jean.
1 users liked this post
Radovan Omorjan 2/22/2019 5:40:00 AM
#4 Posted: 2/22/2019 5:53:46 AM
Radovan Omorjan

Radovan Omorjan

325 likes in 2052 posts.

Group: Moderator

Hello Jean,

Here is an example posted few times somewhere here in this Forum 6-7 years ago. It is still a univariate fitting problem, but nonlinear in parameters.I think these examples motivated Davide Carpi to make the NonlinearSolvers plugin. You can find there lots of similar discussion (from my side) where I constantly nagged about numerical solvers for nonlinear equations and optimization. There is no plugin solution in SMath yet concerning these problems.

NLMinimization-9c.png

NLMinimization-9c.sm (42 KiB) downloaded 65 time(s).

I simply do not know, for years now, how to solve in SMath the general nonlinear fitting problem y=f( X, b ), y - given vector of size n; X - given matrix of size n rows, m columns; b - unknown parameters of size m (m
For example, like this one (also remained unsolved for me in SMath for years)

linfit_multiple-1.sm (22 KiB) downloaded 74 time(s).
linfit_multiple-1-1.sm (22 KiB) downloaded 59 time(s).

Regards,
Radovan
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
#5 Posted: 2/22/2019 12:57:35 PM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

Wrote

I simply do not know, for years now, how to solve in SMath the general nonlinear fitting problem y=f( X, b ), y - given vector of size n; X - given matrix of size n rows, m columns; b - unknown parameters of size m (m


Hello Radovan, let me examine your unsolved examples.
In the mean time, these two examples non-linear are educative for new visitors.
1. solves by itself directly from Cholesky LS solver.
2. is hyper robust from the Smath Genfit module [3 iterates]
F.B. Hildebrand wrote "fitting is an art".
Many broke their nose inventing the art of fitting.
The worst is that each case is specific and the fitting techniques is immense.
All in all, Smath did and surely will do all Mathcad 11,
Can't tell more about PTC/Mathcad "cluster fuck"
None of Paul, Robert, Tom exploded the Mathsoft Proprietary Minerr.
Maybe Viacheslav could do, he is a smart cat enough for that.

Cheers ... Jean.

NON-Linear.PNG

Genfit NonLinearFit [Revisit].sm (109 KiB) downloaded 67 time(s).
#6 Posted: 2/22/2019 3:05:36 PM
Martin Kraska

Martin Kraska

1222 likes in 2150 posts.

Group: Moderator

Wrote



For example, like this one (also remained unsolved for me in SMath for years)

linfit_multiple-1.sm (22 KiB) downloaded 74 time(s).



I don't know whether this counts as a reasonable fit, but at least you get a solution.

2019-02-22 18_58_15-SMath Studio 0.99.6988 - [linfit_multiple-1_Kr.sm].png
linfit_multiple-1_Kr.sm (162 KiB) downloaded 60 time(s).

Edit: second example shows the same MSE, and nearly the same b2 and b3.

2019-02-22 19_29_55-SMath Studio 0.99.6988 - [linfit_multiple-1-1.sm_].png
Martin Kraska Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
1 users liked this post
Radovan Omorjan 2/23/2019 4:42:00 AM
#7 Posted: 2/22/2019 3:10:36 PM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

Wrote

Hello Radovan, let me examine your unsolved examples.


... part 1 NLMinimization-9c doctors by itself
... part 2 LM complains ,,, not doctored yet
Thanks for this LM

NLMinimization-9c Scrap.sm (43 KiB) downloaded 65 time(s).
#8 Posted: 2/22/2019 4:26:00 PM
Radovan Omorjan

Radovan Omorjan

325 likes in 2052 posts.

Group: Moderator

Wrote



I don't know whether this counts as a reasonable fit, but at least you get a solution.

2019-02-22 18_58_15-SMath Studio 0.99.6988 - [linfit_multiple-1_Kr.sm].png
linfit_multiple-1_Kr.sm (162 KiB) downloaded 60 time(s).

Edit: second example shows the same MSE, and nearly the same b2 and b3.

2019-02-22 19_29_55-SMath Studio 0.99.6988 - [linfit_multiple-1-1.sm_].png



Thank you Martin. It was a direct answer to my question - Fit() function from Maxima. Thank you for reminding us of this once more. Fortunately, we have Maxima plugin for nonlinear fitting (it slipped my mind) and I am glad that I was wrong. I also would have liked to be wrong by saying that this is the only function in SMath performing this task (maple plugin maybe?).

Regards,
Radovan
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
#9 Posted: 2/22/2019 10:26:14 PM
Alvaro Diaz Falconi

Alvaro Diaz Falconi

992 likes in 1675 posts.

Group: User

Wrote

I also would have liked to be wrong by saying that this is the only function in SMath performing this task (maple plugin maybe?).



Hi Radovan. In the attached, one of the two maple's fitting functions. Issues at the end.

maple_fit.sm (20 KiB) downloaded 66 time(s).

Best regards.
Alvaro.
1 users liked this post
Radovan Omorjan 2/23/2019 4:25:00 AM
#10 Posted: 2/23/2019 4:41:56 AM
Radovan Omorjan

Radovan Omorjan

325 likes in 2052 posts.

Group: Moderator

Thank you Alvaro,

You pointed out some issues with the maple module and using subpackeges.

BTW, could you remind me where can I find the Help for Maple V rev 5. I know I've used it but I forgot where it was.

Regards,
Radovan

When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
#11 Posted: 2/23/2019 5:59:51 AM
Alvaro Diaz Falconi

Alvaro Diaz Falconi

992 likes in 1675 posts.

Group: User

Wrote



BTW, could you remind me where can I find the Help for Maple V rev 5. I know I've used it but I forgot where it was.



Hi Radovan. In the online help: stats
Best regards.
Alvaro.
#12 Posted: 2/23/2019 2:02:55 PM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

... you can as well apply Medfit to the Y data.
It will have some smoothing effect on the bivariate,
considering enough data points are in cause.
Not 1/1 Mathcad, but very close.

Maths SlopeIntercept [Medfit].sm (13 KiB) downloaded 70 time(s).

  • New Posts New Posts
  • No New Posts No New Posts