Rank: Guest
Groups: Registered
Joined: 04/07/2015(UTC) Posts: 6,866 Was thanked: 981 time(s) in 809 post(s)
|
Originally Posted by: ola_nicolas I 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.
|
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 21/11/2017(UTC) Posts: 114 Location: Olt county Was thanked: 1 time(s) in 1 post(s)
|
Thanks Jean GiraudIt 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 Edited by user 14 July 2018 23:39:24(UTC)
| Reason: Not specified
|
|
|
|
Rank: Guest
Groups: Registered
Joined: 04/07/2015(UTC) Posts: 6,866 Was thanked: 981 time(s) in 809 post(s)
|
Originally Posted by: ola_nicolas 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?! 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
|
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 21/11/2017(UTC) Posts: 114 Location: Olt county Was thanked: 1 time(s) in 1 post(s)
|
Hello. 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 Edited by user 15 July 2018 11:25:32(UTC)
| Reason: Not specified
|
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 15/07/2010(UTC) Posts: 437 Location: Beer-Sheva Was thanked: 520 time(s) in 288 post(s)
|
Underdetermined nonlinear system of equations.Three equations with four unknowns. Visualization of finding the roots Visual.sm (17kb) downloaded 34 time(s).Edited by user 15 July 2018 19:11:08(UTC)
| Reason: Not specified
|
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 15/07/2010(UTC) Posts: 437 Location: Beer-Sheva Was thanked: 520 time(s) in 288 post(s)
|
|
2 users thanked Ber7 for this useful post.
|
on 16/07/2018(UTC), on 29/07/2018(UTC)
|
|
Rank: Advanced Member Groups: Registered
Joined: 21/11/2017(UTC) Posts: 114 Location: Olt county Was thanked: 1 time(s) in 1 post(s)
|
Hello
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
|
|
|
|
Rank: Administration Groups: Registered, Advanced Member Joined: 23/06/2009(UTC) Posts: 1,740 Was thanked: 318 time(s) in 268 post(s)
|
Hello Nicolas Originally Posted by: ola_nicolas Hello
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 |
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!" |
|
|
|
Rank: Guest
Groups: Registered
Joined: 04/07/2015(UTC) Posts: 6,866 Was thanked: 981 time(s) in 809 post(s)
|
Originally Posted by: omorr 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 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 Choleskysolver, 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 (56kb) downloaded 21 time(s). Polynomial fit Methods [linfitCheby].sm (43kb) downloaded 20 time(s). Genfit Rational Type J_8.sm (58kb) downloaded 19 time(s). PolyFit QUICK.sm (25kb) downloaded 22 time(s). Genfit Kirby_2 [Transmute].sm (42kb) downloaded 20 time(s). Solve al_nleqsolve CSTR.sm (39kb) downloaded 25 time(s). Polynomial fit Methods [ Rational linfit].sm (63kb) downloaded 22 time(s).
|
|
|
|
Rank: Guest
Groups: Registered
Joined: 04/07/2015(UTC) Posts: 6,866 Was thanked: 981 time(s) in 809 post(s)
|
Originally Posted by: ola_nicolas My 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 (28kb) downloaded 25 time(s).
|
|
|
|
Rank: Guest
Groups: Registered
Joined: 04/07/2015(UTC) Posts: 6,866 Was thanked: 981 time(s) in 809 post(s)
|
... revisit Cholesky SSD solver.
|
|
|
|
Rank: Advanced Member Groups: Registered, Advanced Member Joined: 10/11/2010(UTC) Posts: 1,494 Was thanked: 1274 time(s) in 745 post(s)
|
Originally Posted by: omorr I think that al_nleqsolve() can only solve the system where the number of equations is equal to the number of unknowns |
Russia ☭ forever Viacheslav N. Mezentsev |
|
|
|
Rank: Guest
Groups: Registered
Joined: 04/07/2015(UTC) Posts: 6,866 Was thanked: 981 time(s) in 809 post(s)
|
Originally Posted by: Jean Giraud ... revisit Cholesky SSD solver. This version is an adaptive fit, worth the visit. Jean Polynomial fit_Cholesky.sm (48kb) downloaded 30 time(s).
|
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 21/11/2017(UTC) Posts: 114 Location: Olt county Was thanked: 1 time(s) in 1 post(s)
|
Hello. 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 (14kb) downloaded 22 time(s).Edited by user 21 July 2018 20:24:40(UTC)
| Reason: Not specified
|
|
|
|
Rank: Guest
Groups: Registered
Joined: 04/07/2015(UTC) Posts: 6,866 Was thanked: 981 time(s) in 809 post(s)
|
Originally Posted by: ola_nicolas 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. 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 (36kb) downloaded 20 time(s).
|
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 21/11/2017(UTC) Posts: 114 Location: Olt county Was thanked: 1 time(s) in 1 post(s)
|
Hello. 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. Originally Posted by: Jean Giraud ... 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. Originally Posted by: Jean Giraud 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 (45kb) downloaded 20 time(s).Edited by user 23 July 2018 11:07:03(UTC)
| Reason: Not specified
|
|
|
|
Rank: Guest
Groups: Registered
Joined: 04/07/2015(UTC) Posts: 6,866 Was thanked: 981 time(s) in 809 post(s)
|
Originally Posted by: ola_nicolas I find it easier to compare two graphical curves than two inexpressive vectors. ... then: why not resume the project with some plot ?
|
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 21/11/2017(UTC) Posts: 114 Location: Olt county Was thanked: 1 time(s) in 1 post(s)
|
Hello. Originally Posted by: Jean Giraud ... 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.
|
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 15/07/2010(UTC) Posts: 437 Location: Beer-Sheva Was thanked: 520 time(s) in 288 post(s)
|
ola_nicolas, I just slightly reduced the code of your program. Nicolas.sm (13kb) downloaded 24 time(s).Edited by user 27 July 2018 16:42:55(UTC)
| Reason: Not specified
|
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 15/07/2010(UTC) Posts: 437 Location: Beer-Sheva Was thanked: 520 time(s) in 288 post(s)
|
|
|
|
|
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.