How to solve it? - Сообщения
WroteI would be interested in doing some tests on this method. Unfortunately, I do not know how to do this.
have you tried this:
1. Close PC
2. Open PC
3. Open Smath ... do nothing
4. Menu bar => Options => Interface => Arguments separator => period, coma, semicolon
5. check OK
6. Close PC.
7. Open PC
8. Open Smath, Code by hand Ber7 Primer or try to open.
It went without restarting the computer. I just restarted SMath after choosing the comma. However, a logical explanation should exist. I'm not saying that the algorithm depends on which separator is used. Will there be any bug or any algorithm problem in this case?!
Thanks Ber7 for the example cascade and for the effort to attach the pdf file as well.
Nicolas
WroteIt went without restarting the computer. I just restarted SMath after choosing the comma. However, a logical explanation should exist. I'm not saying that the algorithm depends on which separator is used. Will there be any bug or any algorithm problem in this case?!
This algorithm is from public domain, most probably coded for [,]
as this library may use [;] for other coding ... simplist, makes sense.
Thanks Nicolas for confirming the Doctor has saved the patient.
Jean
The doctor saves a patient suffering. It does not matter what the patient says, because the alternative is unfavorable to himself. If the patient makes the effort to confirm, this is primarily a service to science. Thank you Jean Giraud.
Nicolas
Visualization of finding the roots

Visual.sm (16 КиБ) скачан 54 раз(а).


Underdetermined.sm (52 КиБ) скачан 43 раз(а).
I did some tests. The method is recommended for a system where the number of equations is equal to the number of unknowns. My interest focuses on a method where the number of equations is m, and the number of unknowns is n, with m>n. I'm staying in the study. I'll come back if I find new ideas. Thank you Ber7.
Nicolas
WroteHello
I did some tests. The method is recommended for a system where the number of equations is equal to the number of unknowns. My interest focuses on a method where the number of equations is m, and the number of unknowns is n, with m>n. I'm staying in the study. I'll come back if I find new ideas. Thank you Ber7.
Nicolas
I hope you would not mind repeating myself. If you need to solve the system of m nonlinear equations in n unknowns (m>n) then you have to use some minimization procedure. This is a simple explanation of least square minimization.
One could see that if F(x) is quite close to zero, then all the f1(x), f2(x)... are also close to zero. This minimization procedure will also work with m=n, and then you will also have the solution of n equations with n unknowns as well.
I think that al_nleqsolve() can only solve the system where the number of equations is equal to the number of unknowns, which is not what you need.
Regards,
Radovan
WroteMy interest focuses on a method where the number of equations is m, and the number of unknowns is n, with m>n
I'm not aware of such methods, but don't deny such inventions.
Let's leave al_nleqsolve on the side for the moment, and revisit the more common
real life where n data points must be fitted via some of so many existing methods.
Like Radovan mentioned, the methods revert to minimizing the SSD [SumSquareDifferences].
At this point, it is essential to learn about the extraordinary property of the Cholesky
solver, not new but so vividely visible in Smath.
It fits directly Lagrange polynomials on minimized SSD.
For more complicated models, in Smath, the refined fit is iterative Conjugate Gradient.
Please, take the time to read the minimalist introduction 7 documents.
Jean
Genfit Rational.sm (55 КиБ) скачан 35 раз(а).
Polynomial fit Methods [linfitCheby].sm (42 КиБ) скачан 41 раз(а).
Genfit Rational Type J_8.sm (57 КиБ) скачан 40 раз(а).
PolyFit QUICK.sm (24 КиБ) скачан 37 раз(а).
Genfit Kirby_2 [Transmute].sm (41 КиБ) скачан 35 раз(а).
Solve al_nleqsolve CSTR.sm (38 КиБ) скачан 46 раз(а).
Polynomial fit Methods [ Rational linfit].sm (62 КиБ) скачан 45 раз(а).
WroteMy interest focuses on a method where the number of equations is m, and the number of unknowns is n, with m>n
Look closely at this Curvator, not so easy to fit an overall data set.
In fact, the system is 16 equations for 4 data points.
The derivative adjusts the curvature.
Jean
Spline Curvator.sm (27 КиБ) скачан 40 раз(а).
Wrote... revisit Cholesky SSD solver.
This version is an adaptive fit, worth the visit.
Jean
Polynomial fit_Cholesky.sm (47 КиБ) скачан 49 раз(а).
I have insisted on the LM algorithm and I chose three points on each of the different curves represented by the vectors used as data. I wanted to see how far SMath could go by solving a system of nonlinear equations. I have arrived at the system in the image, taking the basis of the first four vectors, namely a1, b1, c1, d1. I have not tried other combinations, for example vectors a1, b1, c1, e1, etc. Under these circumstances, I can say that the results obtained are satisfactory to the good. Based on a 10-point rating system, I would write the result between 7 and 8. What first of all thanks me is that the algorithm could find this solution, starting from a sufficiently remote approximation. With the approximate solution in the picture, the calculation lasted about four and a half minutes. I still do not have the skill to use graphics. I would be glad if someone would recommend examples and tutorials in this regard. For the moment I made the graphical comparisons using the results obtained with SMath in MathCAD. Any equation added to the system in the image leads to errors, including system constraint. I'll continue the tests. Regards.
Nicolas.
LM1_.sm (13 КиБ) скачан 35 раз(а).
WroteI would be glad if someone would recommend examples and tutorials in this regard. For the moment I made the graphical comparisons using the results obtained with SMath in MathCAD.
The model function looks out the blue, at least can't be proved valid.
What do you get from Mathcad ?
If you get better sanity check from Mathcad, then Smath LM is under-designed.
LM1_.sm (35 КиБ) скачан 32 раз(а).
I continued the tests and wanted to see how SMath could lead. I have tried to define the function in a recurring way, as in the attached picture. The first observation was (as in the other test) that for more distant values of the Ug parameter the algorithm gives errors. Then, although I was able to solve a system of 18 equations (even 19 in one of the attempts), the increase of the number over 20 is also accompanied by errors. A sign that the solution is close to reality is the value of the variable from the exponent, which is naturally very close to 1.5. I think the convergence criteria should be strengthened for the LM algorithm in SMath. Although I have succeeded in introducing several equations in the calculation, however, the result of the first test was better. This is because the equations in that case have been selected based on the results already known to me in MathCAD.
Wrote... If you get better sanity check from Mathcad, then Smath LM is under-designed.
I did not mean to say that. But just as for the Levenberg-Marquardt algorithm in SMath, there is still room for improvement.
Wrote
The model function looks out the blue, at least can't be proved valid.
A mathematical program should not only be considered for those with the highest mathematical skills. If you know how many engineers put on the scale just the empirical arguments revealed by the most palpable practice and run away when it comes to math! That's why I consider MathCAD an excellent program for wide categories of professionals. It's easy to drive even for the most inexperienced. I use the method of viewing on the graph rather for checking. I find it easier to compare two graphical curves than two inexpressive vectors. Therefore, being very little experienced in this regard regarding SMath, I preferred a check in MathCAD. Otherwise, all the best.
Nicolas.
LM1__.sm (44 КиБ) скачан 32 раз(а).
Wrote... then: why not resume the project with some plot ?...
I just said it. Because I have not yet formed the necessary skills for SMath.
Nicolas.
https://en.smath.info/forum/yaf_topics32_Extensions.aspx
Overdetermined.sm (15 КиБ) скачан 51 раз(а).
-
Новые сообщения
-
Нет новых сообщений