Maple in SMATH

Maple in SMATH - exponential curve fitting - Сообщения

#1 Опубликовано: 05.06.2023 00:18:53
RegRetired

RegRetired

8 сообщений из 130 понравились пользователям.

Группа: User

Does anyone know if this maple function works in SMATH? I cannot get it to work.
Файл не найден.

If not available, is there another similar regression fit function available?

Sorry about that. Update to sm file.
Файл не найден.Файл не найден.

I am really struggling. It shouldn't be this hard.
This version of Maple 6 regression fit also does not work.
Maybe someone could give me examples of the five input arguments to the SMATH Fit(5) function as noted in the figure.

Файл не найден.

As always, any help is appreciated. I really want to get away from Mathcad 15 because there is no longer any support.
Reg Curry Loveland, CO
#2 Опубликовано: 05.06.2023 02:53:52
Вячеслав Мезенцев

Вячеслав Мезенцев

1402 сообщений из 1708 понравились пользователям.

Группа: Moderator

It is possible to use this function, but it is difficult. To do this, you need to include the stats package in the with.inс file. By default, not all packages are included in the plugin and you must manually specify the required ones in the plugin folder (bin\with.inc):

with(linalg):with(inttrans):with(plots):with(stats):

fit-example.png

Unfortunately, the Maple syntax is difficult to replicate in a document, so the ability to use the symbol engine is limited. I'll see if I can somehow use this solution with vectors from the document. Now I recommend using alternative solutions, which I hope will be offered soon.
Russia ☭ forever, Viacheslav N. Mezentsev
#3 Опубликовано: 05.06.2023 03:02:34
RegRetired

RegRetired

8 сообщений из 130 понравились пользователям.

Группа: User

Yikes, that is beyond me.

What about the built-in Fit(5) function question?

This is what I am trying to achieve, but it defeats my purpose of getting away from Mathcad 15.

Файл не найден.

Surly, there is a simple way to fit data with various functions in SMATH, but maybe not.
Reg Curry Loveland, CO
#4 Опубликовано: 05.06.2023 06:22:53
Alvaro Diaz Falconi

Alvaro Diaz Falconi

992 сообщений из 1674 понравились пользователям.

Группа: User

Hi. In the attached how to use Fit(5), which requires Maxima plugin, and al_nleqsolve applied to an overdetermined system.

CLIMATE CHANGE.sm (19 КиБ) скачан 57 раз(а).

About maple, as far I know, in the version 6 the equation to fit must be linear in the unknown parameters, as it don't have the uppercase 'Fit' package, but the old 'fit' one.

Best regards.
Alvaro.
#5 Опубликовано: 05.06.2023 07:04:43
RegRetired

RegRetired

8 сообщений из 130 понравились пользователям.

Группа: User

Thanks for the info; however, I added both plugins and the maxima calculation failed for some reason.
Файл не найден.

My copy shows both of the plugins are available.
Reg Curry Loveland, CO
#6 Опубликовано: 05.06.2023 07:25:52
Martin Kraska

Martin Kraska

1222 сообщений из 2150 понравились пользователям.

Группа: Moderator

The Maxima plugin is just the interface (works only under Windows) to standard Maxima. Maxima must be installed separately and SMath must be told the path to Maxima. Follow the link in my signature, there you find instructions.
Martin Kraska Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
#7 Опубликовано: 05.06.2023 09:46:15
Jean Giraud

Jean Giraud

983 сообщений из 6866 понравились пользователям.

Группа: User

Wrote

If not available,
is there another similar regression fit function available ?


Under the hood, your model is very reflexive. Thus not easy to fit.
... not easy to fit means various coefficients fit as well.
Differently, Cholesky polynomial fits as well, not reflexive.
Matter of preference.
Climate change is BS. Earth entropy is increasing till much colder.
Global warming [HadCRU] proves the decrease °C since ~ 2010.
Cheers ... Jean.

Page2 Climate.sm (59 КиБ) скачан 25 раз(а).
Inst_HadCRUt4.sm (267 КиБ) скачан 27 раз(а).
#8 Опубликовано: 05.06.2023 16:18:22
RegRetired

RegRetired

8 сообщений из 130 понравились пользователям.

Группа: User

I agree. See my attached report.
CLIMATE MODELS.pdf (1 МиБ) скачан 39 раз(а).
Reg Curry Loveland, CO
#9 Опубликовано: 05.06.2023 16:54:54
RegRetired

RegRetired

8 сообщений из 130 понравились пользователям.

Группа: User

I don't have MAXIMA. Are you telling me that both of these built in SMATH functions require Maxima?

Файл не найден.

Файл не найден.

Since I don't have MAXIMA, why do they show up as available?
Reg Curry Loveland, CO
#10 Опубликовано: 05.06.2023 17:02:27
RegRetired

RegRetired

8 сообщений из 130 понравились пользователям.

Группа: User

So, I have come to the conclusion that there are no built-in curve fitting routines in SMATH that will allow me to do an exponential fit like I do in Mathcad 15.

I assume that means I must write my own since nothing offered so far gives a good fit like the Mathcad exponential fit.

Thanks for all your responses.
Reg Curry Loveland, CO
#11 Опубликовано: 05.06.2023 18:12:25
Jean Giraud

Jean Giraud

983 сообщений из 6866 понравились пользователям.

Группа: User

Wrote

So, I have come to the conclusion that there are no built-in curve fitting routines in SMATH


That's right, Smath has no fitting plugin. However, we miss nothing.
miss nothing: Explain ...
Smath fitting techniques is a HUGE collection of advanced utilities.
By far more capable than MCD 11 unless they have implemented many more than Given/Minerr.
Please confirm you can download from the forum after disabling firewall(s).
Visit Samples ... LMSA Genfit attached few days ago.
Cheers ... Jean.
#12 Опубликовано: 05.06.2023 18:13:59
Jean Giraud

Jean Giraud

983 сообщений из 6866 понравились пользователям.

Группа: User

... by fitting, I mean fitting raw data sets.
#13 Опубликовано: 05.06.2023 18:25:50
CBG

CBG

77 сообщений из 312 понравились пользователям.

Группа: User

Hello

I think you can use the Least Squares algorithm to fit the data.

LS_CBG.png
LS_CBG_2.png
CLIMATE CHANGE WORKING_CBG.sm (35 КиБ) скачан 40 раз(а).


Best Regards

Carlos
#14 Опубликовано: 05.06.2023 18:32:31
Jean Giraud

Jean Giraud

983 сообщений из 6866 понравились пользователям.

Группа: User

... Smath Thurber fit

Thurber Smath.PNG
#15 Опубликовано: 06.06.2023 16:16:11
Jean Giraud

Jean Giraud

983 сообщений из 6866 понравились пользователям.

Группа: User

Extrapolation of your 2020 data set is anon-sense.
Nothing yet, indicates it will be logistic asymptotic,
may be returning a Gaussian or crippled Gaussian.
The last part of the data set is noisy but has a trend.
#16 Опубликовано: 26.06.2023 08:36:47
Filip De Somer

Filip De Somer

0 сообщений из 2 понравились пользователям.

Группа: User

Wrote

It is possible to use this function, but it is difficult. To do this, you need to include the stats package in the with.inс file. By default, not all packages are included in the plugin and you must manually specify the required ones in the plugin folder (bin\with.inc):

with(linalg):with(inttrans):with(plots):with(stats):

fit-example.png

Unfortunately, the Maple syntax is difficult to replicate in a document, so the ability to use the symbol engine is limited. I'll see if I can somehow use this solution with vectors from the document. Now I recommend using alternative solutions, which I hope will be offered soon.



Dear Uni I tried to duplicate your example after adding with(stats) to the plugin\bin\with.inc Unfortunately I seem to do something wrong. Could you assist me? Thanks in advance. I have added my attemptMapleFitTest.sm (3 КиБ) скачан 26 раз(а).
#17 Опубликовано: 26.06.2023 09:05:19
Jean Giraud

Jean Giraud

983 сообщений из 6866 понравились пользователям.

Группа: User

For your little 4 points data set
1. fit linterp(vx,vy,x) but you don't have an export
2. fit Cholesky and export the fitted function.
Jean.
#18 Опубликовано: 26.06.2023 12:11:21
Alvaro Diaz Falconi

Alvaro Diaz Falconi

992 сообщений из 1674 понравились пользователям.

Группа: User

Wrote

So, I have come to the conclusion that there are no built-in curve fitting routines in SMATH that will allow me to do an exponential fit like I do in Mathcad 15. ....



Hi Reg. The solution proposed at the post #4 in the file { CLIMATE CHANGE.sm (19 КиБ) скачан 57 раз(а). } only uses an standard SMath plugin, for al_nleqsolve .

Click to enlarge

Wrote

I assume that means I must write my own since nothing offered so far gives a good fit like the Mathcad exponential fit. ...



In this graph, the solutions of SMath, Maxima and Mathcad are compared. SMath's solution seems as valid to me as Mathcad's.

Click to enlarge

Best regards.
Alvaro.
#19 Опубликовано: 26.06.2023 15:07:10
Jean Giraud

Jean Giraud

983 сообщений из 6866 понравились пользователям.

Группа: User

Wrote

I assume that means I must write my own since nothing offered so far gives a good fit like the Mathcad exponential fit


Mahcad exponential fit is essentially based on LM resident code.
You can do same in Smath from Genfit techniques or Carlos LM.
All MCD fits done in the Mathsoft Collaboratory have been done in Smath.
Smath Genfit compendium is lot more immense.
Jean.
#20 Опубликовано: 26.06.2023 15:17:56
RegRetired

RegRetired

8 сообщений из 130 понравились пользователям.

Группа: User

Jean,
You have my file. If what you say is true, please post an example of an exponential fit to my data.

Thanks
Reg Curry Loveland, CO
  • Новые сообщения Новые сообщения
  • Нет новых сообщений Нет новых сообщений