| Literature DB >> 32478282 |
Carl Leake1, Hunter Johnston1, Lidia Smith2, Daniele Mortari1.
Abstract
Differential equations (DEs) are used as numerical models to describe physical phenomena throughout the field of engineering and science, including heat and fluid flow, structural bending, and systems dynamics. While there are many other techniques for finding approximate solutions to these equations, this paper looks to compare the application of the Theory of Functional Connections (TFC) with one based on least-squares support vector machines (LS-SVM). The TFC method uses a constrained expression, an expression that always satisfies the DE constraints, which transforms the process of solving a DE into solving an unconstrained optimization problem that is ultimately solved via least-squares (LS). In addition to individual analysis, the two methods are merged into a new methodology, called constrained SVMs (CSVM), by incorporating the LS-SVM method into the TFC framework to solve unconstrained problems. Numerical tests are conducted on four sample problems: One first order linear ordinary differential equation (ODE), one first order nonlinear ODE, one second order linear ODE, and one two-dimensional linear partial differential equation (PDE). Using the LS-SVM method as a benchmark, a speed comparison is made for all the problems by timing the training period, and an accuracy comparison is made using the maximum error and mean squared error on the training and test sets. In general, TFC is shown to be slightly faster (by an order of magnitude or less) and more accurate (by multiple orders of magnitude) than the LS-SVM and CSVM approaches.Entities:
Keywords: differential equation; function approximation; least-squares; numerical methods; support vector machines; theory of functional connections
Year: 2019 PMID: 32478282 PMCID: PMC7259481 DOI: 10.3390/make1040060
Source DB: PubMed Journal: Mach Learn Knowl Extr ISSN: 2504-4990
Figure 1.Accuracy gain for the Theory of Functional Connections (TFC) and constrained support vector machine (CSVM) methods over least-squares support vector machines (LS-SVMs) for problem #1 using 100 training points.
TFC results for problem #1.
| Number of Training Points | Training Time (s) | Maximum Error on Training Set | MSE on Training Set | Maximum Error on Test Set | MSE on Test Set | |
|---|---|---|---|---|---|---|
| 8 | 7.813 × 10−5 | 6.035 × 10−6 | 1.057 × 10−11 | 6.187 × 10−6 | 8.651 × 10−12 | 7 |
| 16 | 1.406 × 10−4 | 2.012 × 10−11 | 1.257 × 10−22 | 1.814 × 10−11 | 8.964 × 10−23 | 17 |
| 32 | 5.000 × 10−4 | 2.220 × 10−16 | 1.887 × 10−32 | 3.331 × 10−16 | 2.086 × 10−32 | 25 |
| 50 | 7.500 × 10−4 | 2.220 × 10−16 | 9.368 × 10−33 | 2.220 × 10−16 | 1.801 × 10−32 | 25 |
| 100 | 1.266 × 10−3 | 4.441 × 10−16 | 1.750 × 10−32 | 2.220 × 10−16 | 1.138 × 10−32 | 26 |
CSVM results for problem #1.
| Number of Training Points | Training Time (s) | Maximum Error on Training Set | MSE on Training Set | Maximum Error on Test Set | MSE on Test Set | ||
|---|---|---|---|---|---|---|---|
| 8 | 3.125 × 10−4 | 1.018 × 10−5 | 4.131 × 10−11 | 1.357 × 10−5 | 5.547 × 10−11 | 2.154 × 1013 | 3.162 × 100 |
| 16 | 1.406 × 10−3 | 2.894 × 10−7 | 2.588 × 10−14 | 2.818 × 10−7 | 2.468 × 10−14 | 5.995 × 1017 | 6.813 × 10−1 |
| 32 | 5.313 × 10−3 | 2.283 × 10−8 | 1.355 × 10−16 | 2.576 × 10−8 | 1.494 × 10−16 | 3.594 × 1015 | 3.162 × 10−1 |
| 50 | 3.281 × 10−3 | 8.887 × 10−9 | 2.055 × 10−17 | 1.072 × 10−8 | 2.783 × 10−17 | 7.743 × 108 | 3.162 × 10−1 |
| 100 | 1.078 × 10−2 | 2.230 × 10−9 | 5.571 × 10−19 | 2.163 × 10−9 | 5.337 × 10−19 | 3.594 × 1015 | 1.468 × 10−1 |
Figure 2.Mean squared error vs. solution time for problem #1.
Figure 3.Accuracy gain for TFC and CSVM methods over LS-SVM for problem #2 using 100 training points.
TFC results for problem #2.
| Number of Training Points | Training Time (s) | Maximum Error on Training Set | MSE on Training Set | Maximum Error on Test Set | MSE on Test Set | |
|---|---|---|---|---|---|---|
| 8 | 3.437 × 10−4 | 8.994 × 10−6 | 2.242 × 10−11 | 1.192 × 10−5 | 4.132 × 10−11 | 8 |
| 16 | 1.547 × 10−3 | 4.586 × 10−12 | 6.514 × 10−24 | 9.183 × 10−12 | 2.431 × 10−23 | 16 |
| 32 | 1.891 × 10−3 | 3.109 × 10−15 | 9.291 × 10−31 | 4.885 × 10−15 | 9.590 × 10−31 | 32 |
| 50 | 3.125 × 10−3 | 1.110 × 10−15 | 2.100 × 10−31 | 2.665 × 10−15 | 3.954 × 10−31 | 32 |
| 100 | 4.828 × 10−3 | 1.776 × 10−15 | 3.722 × 10 −31 | 2.665 × 10−15 | 4.321 × 10−31 | 32 |
CSVM results for problem #2.
| Number of Training Points | Training Time (s) | Maximum Error on Training Set | MSE on Training Set | Maximum Error on Test Set | MSE on Test Set | ||
|---|---|---|---|---|---|---|---|
| 8 | 1.250 × 10−3 | 1.556 × 10−3 | 7.644 × 10−7 | 1.480 × 10−3 | 5.325 × 10−7 | 1.000 × 1010 | 3.452 × 10−1 |
| 16 | 1.563 × 10−3 | 4.021 × 10−3 | 4.914 × 10−6 | 3.876 × 10−3 | 4.517 × 10−6 | 1.000 × 1010 | 4.719 × 10−1 |
| 32 | 2.594 × 10−2 | 4.047 × 10−3 | 4.834 × 10−6 | 3.901 × 10−3 | 4.575 × 10−6 | 1.000 × 1010 | 5.109 × 10−1 |
| 50 | 4.109 × 10−2 | 4.050 × 10−3 | 4.792 × 10−6 | 3.903 × 10−3 | 4.580 × 10−6 | 1.000 × 1010 | 5.252 × 10−1 |
| 100 | 9.219 × 10−2 | 4.051 × 10−3 | 4.753 × 10−6 | 3.904 × 10−3 | 4.583 × 10−6 | 1.000 × 1010 | 5.469 × 10−1 |
Figure 4.Mean squared error vs. solution time for problem #2.
Figure 5.Accuracy gain for TFC and CSVM methods over LS-SVMs for problem #3 using 100 training points.
TFC results for problem #3.
| Number of Training Points | Training Time (s) | Maximum Error on Training Set | MSE on Training Set | Maximum Error on Test Set | MSE on Test Set | |
|---|---|---|---|---|---|---|
| 8 | 1.563 × 10−4 | 1.313 × 10−6 | 5.184 × 10−13 | 1.456 × 10−6 | 6.818 × 10−13 | 8 |
| 16 | 7.969 × 10−4 | 5.551 × 10−16 | 6.123 × 10−32 | 8.882 × 10−16 | 7.229 × 10−32 | 15 |
| 32 | 7.187 × 10−4 | 1.221 × 10−15 | 2.377 × 10−31 | 9.992 × 10−16 | 2.229 × 10−31 | 15 |
| 50 | 5.000 × 10−4 | 7.772 × 10−16 | 3.991 × 10−32 | 5.551 × 10−16 | 3.672 × 10−32 | 15 |
| 100 | 9.844 × 10−4 | 7.772 × 10−16 | 5.525 × 10−32 | 6.661 × 10−16 | 3.518 × 10−32 | 15 |
CSVM results for problem #3.
| Number of Training Points | Training Time (s) | Maximum Error on Training Set | MSE on Training Set | Maximum Error on Test Set | MSE on Test Set | ||
|---|---|---|---|---|---|---|---|
| 8 | 1.563 × 10−4 | 1.263 × 10−6 | 7.737 × 10−13 | 2.017 × 10−6 | 1.339 × 10−12 | 1.000 × 1020 | 6.813 × 100 |
| 16 | 4.687 × 10−4 | 1.269 × 10−9 | 4.961 × 10−19 | 1.631 × 10−9 | 5.342 × 10−19 | 3.594 × 1015 | 3.162 × 100 |
| 32 | 1.406 × 10−3 | 1.763 × 10−9 | 8.308 × 10−19 | 2.230 × 10−9 | 1.248 × 10−18 | 3.594 × 1015 | 3.162 × 100 |
| 50 | 3.281 × 10−3 | 1.429 × 10−9 | 1.045 × 10−18 | 1.569 × 10−9 | 1.017 × 10−18 | 2.154 × 1013 | 1.468 × 100 |
| 100 | 1.297 × 10−2 | 8.261 × 10−10 | 8.832 × 10−20 | 7.209 × 10−10 | 5.589 × 10 −20 | 2.154 × 1013 | 1.468 × 100 |
Figure 6.Mean squared error vs. solution time for problem #3 accuracy vs. time.
Figure 7.Accuracy gain for TFC and CSVM methods over LS-SVMs for problem #4 using 100 training points in the domain.
TFC results for problem #4.
| Number of Training Points | Training Time (s) | Maximum Error on Training Set | MSE on Training Set | Maximum Error on Test Set | MSE on Test Set | |
|---|---|---|---|---|---|---|
| 9 | 4.375 × 10−3 | 1.107 × 10−7 | 1.904 × 10−15 | 1.543 × 10−7 | 4.633 × 10−15 | 8 |
| 16 | 5.000 × 10−3 | 3.336 × 10−9 | 2.131 × 10−18 | 4.938 × 10−9 | 3.964 × 10−18 | 9 |
| 36 | 6.406 × 10−3 | 6.628 × 10−14 | 5.165 × 10−28 | 2.333 × 10−13 | 6.961 × 10−27 | 12 |
| 64 | 9.844 × 10−3 | 4.441 × 10−16 | 2.091 × 10−32 | 8.882 × 10−16 | 8.320 × 10−32 | 15 |
| 100 | 1.031 × 10−2 | 3.331 × 10−16 | 1.229 × 10−32 | 6.661 × 10−16 | 1.246 × 10−32 | 15 |
CSVM results for problem #4.
| Number of Training Points | Training Time (s) | Maximum Error on Training Set | MSE on Training Set | Maximum Error on Test Set | MSE on Test Set | ||
|---|---|---|---|---|---|---|---|
| 9 | 5.000 × 10−3 | 1.305 × 10−5 | 1.936 × 10−11 | 3.325 × 10−5 | 8.262 × 10−11 | 1.000 × 1014 | 6.948 × 100 |
| 16 | 1.172 × 10−2 | 2.121 × 10−6 | 7.965 × 10−13 | 5.507 × 10−6 | 2.530 × 10−12 | 1.000 × 1014 | 4.894 × 100 |
| 36 | 1.891 × 10−2 | 2.393 × 10−7 | 6.242 × 10−15 | 3.738 × 10−7 | 1.341 × 10−14 | 1.000 × 1014 | 2.154 × 100 |
| 64 | 3.156 × 10−2 | 9.501 × 10−8 | 1.021 × 10−15 | 1.251 × 10−7 | 1.165 × 10−15 | 1.000 × 1014 | 1.371 × 100 |
| 100 | 8.453 × 10−2 | 4.362 × 10−8 | 2.687 × 10−16 | 5.561 × 10−8 | 2.951 × 10−16 | 1.000 × 1014 | 8.891 × 10−1 |
Figure 8.Mean squared error vs. solution time for problem #4 accuracy vs. time.
LS-SVM results for problem #1.
| Number of Training Points | Training Time (s) | Maximum Error on Training Set | MSE on Training Set | Maximum Error on Test Set | MSE on Test Set | ||
|---|---|---|---|---|---|---|---|
| 8 | 1.719 × 10−3 | 1.179 × 10−5 | 5.638 × 10−11 | 1.439 × 10−5 | 7.251 × 10−11 | 5.995 × 1017 | 3.162 × 100 |
| 16 | 1.719 × 10−3 | 1.710 × 10−6 | 1.107 × 10−12 | 1.849 × 10−6 | 1.161 × 10−12 | 3.594 × 1015 | 6.813 × 10−1 |
| 32 | 2.188 × 10−3 | 9.792 × 10−8 | 3.439 × 10−15 | 9.525 × 10−8 | 3.359 × 10−15 | 3.594 × 1015 | 3.162 × 10−1 |
| 50 | 4.375 × 10−3 | 1.440 × 10−8 | 2.983 × 10−17 | 8.586 × 10−9 | 2.356 × 10−17 | 3.594 × 1015 | 3.162 × 10−1 |
| 100 | 1.031 × 10−2 | 3.671 × 10−9 | 3.781 × 10−18 | 3.673 × 10−9 | 3.947 × 10−18 | 2.154 × 1013 | 3.162 × 10−1 |
LS-SVM results for problem #2.
| Number of Training Points | Training Time (s) | Maximum Error on Training Set | MSE on Training Set | Maximum Error on Test Set | MSE on Test Set | ||
|---|---|---|---|---|---|---|---|
| 8 | 7.813 × 10−4 | 1.001 × 10−3 | 1.965 × 10−7 | 1.001 × 10−3 | 7.904 × 10−8 | 1.000 × 1010 | 3.704 × 10−1 |
| 16 | 1.250 × 10−3 | 4.017 × 10−3 | 4.909 × 10−6 | 3.872 × 10−3 | 4.514 × 10−6 | 1.000 × 1010 | 4.198 × 10−1 |
| 32 | 6.875 × 10−3 | 4.046 × 10−3 | 4.834 × 10−6 | 3.900 × 10−3 | 4.575 × 10−6 | 1.000 × 1010 | 4.536 × 10−1 |
| 50 | 1.203 × 10−2 | 4.048 × 10−3 | 4.792 × 10−6 | 3.902 × 10−3 | 4.580 × 10−6 | 1.000 × 1010 | 4.666 × 10−1 |
| 100 | 3.156 × 10−2 | 4.050 × 10−3 | 4.752 × 10−6 | 3.903 × 10−3 | 4.582 × 10−6 | 1.000 × 1010 | 4.853 × 10−1 |
LS-SVM results for problem #3.
| Number of Training Points | Training Time (s) | Maximum Error on Training Set | MSE on Training Set | Maximum Error on Test Set | MSE on Test Set | ||
|---|---|---|---|---|---|---|---|
| 8 | 1.563 × 10−3 | 1.420 × 10−6 | 8.300 × 10−13 | 1.638 × 10−6 | 6.522 × 10−13 | 5.995 × 1017 | 6.813 × 100 |
| 16 | 1.875 × 10−3 | 1.811 × 10−8 | 1.015 × 10−16 | 1.871 × 10−8 | 1.014 × 10−16 | 3.594 × 1015 | 3.162 × 100 |
| 32 | 4.687 × 10−3 | 5.455 × 10−10 | 1.025 × 10−19 | 9.005 × 10−10 | 1.015 × 10−19 | 5.995 × 1017 | 1.468 × 100 |
| 50 | 7.656 × 10−3 | 8.563 × 10−11 | 3.771 × 10−21 | 8.391 × 10−11 | 3.646 × 10−21 | 2.154 × 1013 | 1.468 × 100 |
| 100 | 2.688 × 10−2 | 6.441 × 10−11 | 1.500 × 10−21 | 6.128 × 10−11 | 1.640 × 10−21 | 2.154 × 1013 | 1.468 × 100 |
LS-SVM results for problem #4.
| Number of Training Points | Training Time (s) | Maximum Error on Training Set | MSE on Training Set | Maximum Error on Test Set | MSE on Test Set | ||
|---|---|---|---|---|---|---|---|
| 9 | 2.031 × 10−3 | 2 578 × 10−4 | 9.984 × 10−9 | 3.941 × 10−4 | 3.533 × 10−8 | 1.000 × 1014 | 6.635 × 100 |
| 16 | 2.344 × 10−3 | 2.229 × 10−5 | 6.277 × 10−11 | 3.794 × 10−5 | 1.731 × 10−10 | 1.000 × 1014 | 3.577 × 100 |
| 36 | 4.219 × 10−3 | 1.254 × 10−6 | 2.542 × 10−13 | 2.435 × 10−6 | 4.517 × 10−13 | 1.000 × 1014 | 1.894 × 100 |
| 64 | 5.156 × 10−3 | 2.916 × 10−7 | 1.193 × 10−14 | 4.962 × 10−7 | 1.390 × 10−14 | 1.000 × 1014 | 1.589 × 100 |
| 100 | 1.297 × 10−2 | 1.730 × 10−7 | 3.028 × 10−15 | 2.673 × 10−7 | 3.668 × 10−15 | 1.000 × 1014 | 9.484 × 10−1 |