Welcome Guest! To enable all features please Login. New Registrations are disabled.

Notification

Icon
Error

Login


Options
Go to last post Go to first unread
Offline Jean Giraud  
#1 Posted : 21 February 2019 19:35:46(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,866
Canada

Was thanked: 981 time(s) in 809 post(s)
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 (72kb) downloaded 36 time(s).

Wanna join the discussion?! Login to your SMath Studio Forum forum account. New Registrations are disabled.

Offline omorr  
#2 Posted : 21 February 2019 21:37:47(UTC)
omorr


Rank: Administration

Groups: Registered, Advanced Member
Joined: 23/06/2009(UTC)
Posts: 1,740
Man
Serbia

Was thanked: 318 time(s) in 268 post(s)
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!"
Offline Jean Giraud  
#3 Posted : 21 February 2019 22:12:43(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,866
Canada

Was thanked: 981 time(s) in 809 post(s)
Originally Posted by: omorr Go to Quoted Post
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.
thanks 1 user thanked Jean Giraud for this useful post.
on 22/02/2019(UTC)
Offline omorr  
#4 Posted : 22 February 2019 11:53:46(UTC)
omorr


Rank: Administration

Groups: Registered, Advanced Member
Joined: 23/06/2009(UTC)
Posts: 1,740
Man
Serbia

Was thanked: 318 time(s) in 268 post(s)
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 (43kb) downloaded 27 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<n). Just pick whatever example you want with, say, n=10 and m=3 with an f( X,b ) function highly nonlinear in b parameters.

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

linfit_multiple-1.sm (23kb) downloaded 29 time(s).
linfit_multiple-1-1.sm (23kb) downloaded 19 time(s).

Regards,
Radovan

Edited by user 22 February 2019 12:28:49(UTC)  | Reason: Not specified

When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
Offline Jean Giraud  
#5 Posted : 22 February 2019 18:57:35(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,866
Canada

Was thanked: 981 time(s) in 809 post(s)
Originally Posted by: omorr Go to Quoted Post
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 (110kb) downloaded 26 time(s).
Offline mkraska  
#6 Posted : 22 February 2019 21:05:36(UTC)
mkraska


Rank: Advanced Member

Groups: Registered
Joined: 15/04/2012(UTC)
Posts: 1,986
Germany

Was thanked: 1124 time(s) in 721 post(s)
Originally Posted by: omorr Go to Quoted Post


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

linfit_multiple-1.sm (23kb) downloaded 29 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 (163kb) downloaded 23 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

Edited by user 22 February 2019 21:33:21(UTC)  | Reason: Not specified

Martin Kraska

Pre-configured portable distribution of SMath Studio: https://smath.com/wiki/SMath_with_Plugins.ashx
thanks 1 user thanked mkraska for this useful post.
on 23/02/2019(UTC)
Offline Jean Giraud  
#7 Posted : 22 February 2019 21:10:36(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,866
Canada

Was thanked: 981 time(s) in 809 post(s)
Originally Posted by: Jean Giraud Go to Quoted Post
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 (44kb) downloaded 19 time(s).
Offline omorr  
#8 Posted : 22 February 2019 22:26:00(UTC)
omorr


Rank: Administration

Groups: Registered, Advanced Member
Joined: 23/06/2009(UTC)
Posts: 1,740
Man
Serbia

Was thanked: 318 time(s) in 268 post(s)
Originally Posted by: mkraska Go to Quoted Post


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 (163kb) downloaded 23 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

Edited by user 22 February 2019 22:55:24(UTC)  | Reason: Not specified

When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
Offline Razonar  
#9 Posted : 23 February 2019 04:26:14(UTC)
Razonar


Rank: Advanced Member

Groups: Registered
Joined: 28/08/2014(UTC)
Posts: 1,356
Uruguay

Was thanked: 815 time(s) in 516 post(s)
Originally Posted by: omorr Go to Quoted Post
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 (21kb) downloaded 30 time(s).

Best regards.
Alvaro.
thanks 1 user thanked Razonar for this useful post.
on 23/02/2019(UTC)
Offline omorr  
#10 Posted : 23 February 2019 10:41:56(UTC)
omorr


Rank: Administration

Groups: Registered, Advanced Member
Joined: 23/06/2009(UTC)
Posts: 1,740
Man
Serbia

Was thanked: 318 time(s) in 268 post(s)
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!"
Offline Razonar  
#11 Posted : 23 February 2019 11:59:51(UTC)
Razonar


Rank: Advanced Member

Groups: Registered
Joined: 28/08/2014(UTC)
Posts: 1,356
Uruguay

Was thanked: 815 time(s) in 516 post(s)
Originally Posted by: omorr Go to Quoted Post


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.

Edited by user 23 February 2019 12:03:31(UTC)  | Reason: Not specified

Offline Jean Giraud  
#12 Posted : 23 February 2019 20:02:55(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,866
Canada

Was thanked: 981 time(s) in 809 post(s)
... 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 (14kb) downloaded 25 time(s).

Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.