How to solve it? - Messages
I think it would not be bad for Davide to verify my algorithm (it does not correspond in any case to the syntactic precepts used in SMath) to append it and add it to its other models, from where I saw the Levenberg-Marquardt method missing . I will not have claims. What Martin has suggested to me is useless in this case. In the file below I tried to apply LevenbergMarquardt(3) to the simple example of 3 unknown 3 equations that appears in the picture in message # 54. An error occurred.
Nicolas
Untitled.sm (5 KiB) downloaded 36 time(s).
WroteHello.
I think it would not be bad for Davide to verify my algorithm (it does not correspond in any case to the syntactic precepts used in SMath) to append it and add it to its other models, from where I saw the Levenberg-Marquardt method missing . I will not have claims.What Martin has suggested to me is useless in this case. In the file below I tried to apply LevenbergMarquardt(3) to the simple example of 3 unknown 3 equations that appears in the picture in message # 54. An error occurred.
Nicolas
Your About LM algorithm is not ready for publishing.
seemingly you got result in 6671, but fails 6179.
norme(,) looks strange 6671 ... and unknown
norme(,) 6179 is by the bible books.
This example gives 9 decimals in native Smath.
Solve GivenFind MCD Example.sm (21 KiB) downloaded 40 time(s).
Levenberg-Marquardt [Nicolas].sm (38 KiB) downloaded 41 time(s).
lm.sm (5 KiB) downloaded 40 time(s).
WroteIn the given case LM works with symbolic optimization, but not with numeric. Also, z=0 does not work as initial value.
Thanks Martin,
Will surely be useful in real applications.
Beats Mathcad in simplicity !
Jean
WroteIn the given case LM works with symbolic optimization, but not with numeric. Also, z=0 does not work as initial value.
lm.sm (5 KiB) downloaded 40 time(s).
The same problem could be solved with many other functions in NonlinearSolvers plugin including the intended FindRoot() as the principal one. Unfortunately, it seems that strictly numerical problems are still problematic and questionable.
Regards,
Radovan
lmext.sm (16 KiB) downloaded 43 time(s).
WroteThe same problem could be solved with many other functions in NonlinearSolvers plugin including the intended FindRoot() as the principal one. Unfortunately, it seems that strictly numerical problems are still problematic and questionable.
Regards,
Radovan
Of all those plugin solvers, they all work ± equivalent.
In this examples , FindRoot(,,,) = Mathcad.
But only Broyden solves for both sets of solutions
Yes, there are two sets of solutions because of z^2
Thanks Radovan.
Solve GivenFind Broyden.sm (23 KiB) downloaded 35 time(s).
SMath can not solve strictly numerically this and similar problems. I wish I was wrong, but I mentioned this quite a lot of times. I am not sure if I was not understood or simply SMath can not cope with this.
Regards,
Radovan
EDIT: Actually, Davide mentioned this in this post
From the point of view of symbolic, versus numeric optimization, something should be done to automate such a choice. From the point of view of the algorithms, I am very little experienced. If the algorithm proposed by me can be processed, including with the help of the skilled ones, then fine. My point of view is that SMath is still a non-livelier ground in terms of resolving non-linear systems containing more than two equations. Practically my skill is to effectively use such algorithms and not to produce them. I just launched a challenge and I would be happy if something new in SMath emerged.
Nicolas
I think it was a mere chance that the FindRoot algorithm solved that system. Try the system in the first picture. You will get the error "Cannot solve. Try using a more specific algorithm". Actually, that's what it is all about. Taking into account all the existing plugins, you need to test a wide variety of possible "more specific" algorithms. But by putting six equations of my system in the form of the image, I finally managed to get a first result using the LevenbergMarquardt algorithm (3) - even if I had to wait almost a minute and 37 seconds. It is illustrated in the second image. What did I actually do? I actually chose three disparate points on the first curve (one with a special shape) and three more on the second curve and formed a system of 6 equations. I have managed to solve it, as shown in the second picture, but the solution is far from the (very precise) found by MathCAD. As soon as I have attached another equation (the seventh) that actually represents a constraint on the system, I have not gotten anything, as shown in the third image. In this sense, it is also necessary to work in SMath. First of all you need to find more efficient algorithms for constrained systems. Then you must necessarily find a way for the program to automatically choose between all possible algorithms, only the applicable one. Let's look at things in the following way. The FindRoot algorithm in SMath could be the GivenFind algorithm in MathCAD. This must actually be a special algorithm to choose the applicable method. Among the applicable methods algorithms with constraints should also be included. Only in this way the work of a researcher using SMath as a tool can be effective. It must be borne in mind that the researcher is not necessarily an excellent mathematician of analysis, but perhaps only one of the occasions, who only attempts to obtain the results that interest him in a particular process. Otherwise, all my respect for everyone, and all the best.
Nicolas.
WroteI have managed to solve it, as shown in the second picture, but the solution is far from the (very precise) found by MathCAD.
1. What is Levenberg-Marquardt ?
An invented gadget solver for some of the casual case of their researchers.
2. Please attach the Smath for the 2nd 6 var example.
3. Mathcd 11 GivenFind solves for 299 simple demand [finite differences DE]
4. The most exhaustive algebraic case MCD 11 solved 22 ... it toke weeks
It had to be associated with lot of < ...> . Straight equalities aren't
solvable by simple algebra.
5. Your base model is not algebraic, thus you can expect infinitely many sols.
That is so true that your LM apparent solution is just one of infinitely many.
6. FindRoot solves your 1rst example.
In your examples, there is the common pitfall ... Explain:
You can't have more accuracy than the given, in this case example [1]
FindRoot epsilon 0.00001. The LM 10^-15 has no meaning at all
Two different results that do sanity identical.
What is the accuracy of pi*0.123 ? Answer => 3 decimals
What is the accuracy of pi *(123/1000) ? Answer => as many decimals as pi
Cheers Nicolas ... Jean
Page1 Nicolas.sm (19 KiB) downloaded 38 time(s).
Two solvers => two sets of solutions among infinitely many possible
from not available infinitely many not yet invented solvers.
What is ! true ! in your proposal ? two sets of experimental values
The model you fabricate may be correct, but not enough experimental data.
If projects are secret or not allowed to be public, public forum
is not the place to expect productive help.
Page2 Nicolas.sm (41 KiB) downloaded 28 time(s).
al_nleqsolve-corr.sm (19 KiB) downloaded 41 time(s).
This is a gradient algorithm. You need Jacobian, unfortunately, which might be quite complicated sometimes and often can give us headaches.
Regards,
Radovan
You do not have to mind Jean Giraud. In the last two posts you made me understand a lot of things. In fact, that's what I wanted from this topic. Thank you very much. Thank you all.
Nicolas.
WroteAnother solver from Alglib. I just copied from this post.
Thanks Radovan, interesting.
Levenberg-Marquardt is one solver, that fails this example.
You can only conclude you have solved if there is a way to
sanity out of doubt. In short, solving is more than some numbers
Jean
Solve Given_Find [CO2_6179].sm (38 KiB) downloaded 39 time(s).
WroteYou are welcome Jean,
We should not forget roots() which was one of the first functions in SMath of its kind.
Thanks Radovan,
... refreshed/updated both versions.
Solve Given_Find [CO2_6179].sm (36 KiB) downloaded 36 time(s).
mechanisms by the Alglib solver

PrimerAlgib.sm (63 KiB) downloaded 49 time(s).
-
New Posts
-
No New Posts