Why I have errors?

Why I have errors? - See please the attached file - Messages

#1 Posted: 10/14/2023 3:31:44 PM
Valery Ochkov

Valery Ochkov

55 likes in 633 posts.

Group: User

See please the end of the attached file.
6-1-Mister-Class.sm (33 KiB) downloaded 30 time(s).
#2 Posted: 10/14/2023 9:38:32 PM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

Wrote

See please the end of the attached file.


Triplet roots ... FindRoot not doctored.

6-1-Mister-Class (1).sm (66 KiB) downloaded 24 time(s).

#3 Posted: 10/14/2023 9:42:14 PM
Martin Kraska

Martin Kraska

1222 likes in 2150 posts.

Group: Moderator

The first error can be handled by wrapping the function in eval(). For the second one this does not help.

I take the opportunity to advertise the Maxima Fit() function.

It is explained in https://doi.org/10.25933/opus4-2949 chapter 6 (English) and in https://doi.org/10.25933/opus4-2948, chapter 9 (German).

6-1-Mister-Class Kr.sm (56 KiB) downloaded 25 time(s).
2023-10-14 16_31_26-SMath Solver - [6-1-Mister-Class (2).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
Valery Ochkov 10/14/2023 9:45:00 PM
#4 Posted: 10/14/2023 9:53:20 PM
Valery Ochkov

Valery Ochkov

55 likes in 633 posts.

Group: User

And the Lord God created the function eval and the lord said this is good!
And the Lord God created the Maxima and the lord said this is sehr kompliziert!
#5 Posted: 10/14/2023 10:52:25 PM
Martin Kraska

Martin Kraska

1222 likes in 2150 posts.

Group: Moderator

Hm, where exactly do you see the most severe сложности in the use of the Maxima plugin? Perhaps everything that needs a handbook is too complicated nowadays
I really like the curve fitting interface with the Fit() function, which might even be comprehensible from the подсказка in the dynamic help.
Martin Kraska Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
#6 Posted: 10/15/2023 12:19:13 AM
Alvaro Diaz Falconi

Alvaro Diaz Falconi

992 likes in 1674 posts.

Group: User

Hi. Polynomial fitting, returning the same values that Excel returns. From this post.

fit_CKO.sm (51 KiB) downloaded 24 time(s).

Best regards.
Alvaro.
#7 Posted: 10/15/2023 2:35:01 PM
Valery Ochkov

Valery Ochkov

55 likes in 633 posts.

Group: User

Sorry!
But the question was Why not How
Why.png
#8 Posted: 10/15/2023 7:51:16 PM
Alvaro Diaz Falconi

Alvaro Diaz Falconi

992 likes in 1674 posts.

Group: User

Wrote

Sorry!
But the question was Why not How



Hi Valery. Martin showed why. But for the quadratic case Máxima's Fit function does not return the same result as Excel, which could be said to have been taken as standard, since they are also the same as those usually obtained with the 'all powerful' (talking about of gods) a\b of Matlab. I made the post to show how those mythical values can also be obtained in SMath.

Because SMath' solver isn't very powerful you can get those same values with your method using another, like the following one

Clipboard01.png

About the error vectorizing, you can see why taking a look of this

Clipboard02.png

Best regards.
Alvaro.
1 users liked this post
Valery Ochkov 10/15/2023 8:03:00 PM
#9 Posted: 10/15/2023 8:04:14 PM
Valery Ochkov

Valery Ochkov

55 likes in 633 posts.

Group: User

Wrote

Wrote

Sorry!
But the question was Why not How



Hi Valery. Martin showed why. But for the quadratic case Máxima's Fit function does not return the same result as Excel, which could be said to have been taken as standard, since they are also the same as those usually obtained with the 'all powerful' (talking about of gods) a\b of Matlab. I made the post to show how those mythical values can also be obtained in SMath.

Because SMath' solver isn't very powerful you can get those same values with your method using another, like the following one

Clipboard01.png

About the error vectorizing, you can see why taking a look of this

Clipboard02.png

Best regards.
Alvaro.


Send please sm-file!

#10 Posted: 10/15/2023 8:48:34 PM
Alvaro Diaz Falconi

Alvaro Diaz Falconi

992 likes in 1674 posts.

Group: User

Wrote

Send please sm-file!



6-1-Mister-Class with polyfit.sm (39 KiB) downloaded 27 time(s).
6-1-Mister-Class with polyfit.pdf (226 KiB) downloaded 25 time(s).

Best regards.
Alvaro.
1 users liked this post
Valery Ochkov 10/15/2023 9:20:00 PM
#11 Posted: 10/15/2023 11:25:44 PM
Martin Kraska

Martin Kraska

1222 likes in 2150 posts.

Group: Moderator

There is not much sense in fitting functions with many degrees of freedom to data containing not much information. Any function which goes through the centroid of the data points will come up with a similar MSE.

Is the second result really the best just because of it's lowest MSE?

2023-10-15 18_24_01-SMath Solver - [6-1-Mister-Class Kr.sm].png
Martin Kraska Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
#12 Posted: 10/16/2023 12:33:28 AM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

Valery, as it looks all doctored.
Thanks Alvaro for the robust Broyden.
Curious, Solver 30405 Slope/Intercept back on foot.

6-1-Mister-Class (1).sm (65 KiB) downloaded 21 time(s).
#13 Posted: 10/16/2023 1:06:59 AM
Valery Ochkov

Valery Ochkov

55 likes in 633 posts.

Group: User

And what about 3D fitting in SMath?

See please my old problem in Mathcad
http://twt.mpei.ac.ru/ochkov/car/c_e.html

Online calculation
http://twt.mpei.ac.ru/MCS/Worksheets/old-car.xmcd

#14 Posted: 10/16/2023 5:57:28 AM
Martin Kraska

Martin Kraska

1222 likes in 2150 posts.

Group: Moderator

The second and third fit aren't really robust (quite some dependence on initial guesses)


Gebrauchtwagen.png
Gebrauchtwagen.txt (729 B) downloaded 22 time(s).
Gebrauchtwagen.sm (90 KiB) downloaded 27 time(s).
Martin Kraska Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
1 users liked this post
Valery Ochkov 10/16/2023 12:11:00 PM
#15 Posted: 10/16/2023 12:13:21 PM
Valery Ochkov

Valery Ochkov

55 likes in 633 posts.

Group: User

Wunderbar!
Send me please the M matrix as sm-file!
#16 Posted: 10/16/2023 12:48:56 PM
Alvaro Diaz Falconi

Alvaro Diaz Falconi

992 likes in 1674 posts.

Group: User

Wrote

And what about 3D fitting in SMath?

See please my old problem in Mathcad
http://twt.mpei.ac.ru/ochkov/car/c_e.html

Online calculation
http://twt.mpei.ac.ru/MCS/Worksheets/old-car.xmcd



Another way, from the same previous post .

fit cars.sm (83 KiB) downloaded 23 time(s).

Best regards.
Alvaro.


#17 Posted: 10/16/2023 1:45:10 PM
Valery Ochkov

Valery Ochkov

55 likes in 633 posts.

Group: User

Thanks!

But the last plot must be so
MCS-Old-Car.png

#18 Posted: 10/16/2023 3:32:33 PM
Martin Kraska

Martin Kraska

1222 likes in 2150 posts.

Group: Moderator

Wrote

Wunderbar!
Send me please the M matrix as sm-file!



The data is from your website. I copy-pasted the table to a new text file and imported it. Just use the files provided in my post.

As to the last plot: I guess the mileage limits of the individual lines are taken from the minimum and maximum slope observed in the age-mileage plot (fig.2 in your reference)?

Do you see any particular problem or do you just want the work getting done?
Martin Kraska Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
#19 Posted: 10/16/2023 6:38:46 PM
Valery Ochkov

Valery Ochkov

55 likes in 633 posts.

Group: User

do you just want the work getting done?
Yes ;-)
#20 Posted: 10/17/2023 12:58:58 AM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

Global fit Cholesky
Frequently, you can manage the Phi vector for a best regional fit.

Project fit cars Cholesky.sm (19 KiB) downloaded 25 time(s).
1 users liked this post
Valery Ochkov 10/17/2023 1:09:00 AM
  • New Posts New Posts
  • No New Posts No New Posts