{"id":982,"date":"2023-05-25T08:10:47","date_gmt":"2023-05-25T08:10:47","guid":{"rendered":"https:\/\/nag.com\/?page_id=982"},"modified":"2023-07-11T15:42:11","modified_gmt":"2023-07-11T15:42:11","slug":"faster-data-fitting-solver","status":"publish","type":"page","link":"https:\/\/nag.com\/faster-data-fitting-solver\/","title":{"rendered":"Faster Data Fitting Solver"},"content":{"rendered":"\n<div class=\"gbc-title-banner ta ta-lg ta-xl\" style='background-color: #082d48ff; color: #ffffffff; border-radius: 0px; '>\n    <div class=\"container\" style='border-radius: 0px; '>\n        <div class=\"row justify-content--center\" style='color: #ffffffff;'>\n            <div class=\"col-12\"  >\n                <div class=\"wrap pv-4 \" style=\"0px\">\n                                <div class=\"col-12 col-md-12 col-lg-10 col-xl-8  banner-content\"  >\n    \n                                             <h1>Faster Data Fitting Solver<\/h1>\n                    \n                    <div class=\"mt-1 mb-1 content\"><\/div>\n\n                    \n                                    <\/div>\n                <\/div>\n            <\/div>\n        <\/div>\n    <\/div>\n<\/div>\n\n\n\n\n<div class=\"content-split-three pv-4 \" >\n    <div class=\"container\">\n        <div class=\"row justify-content--center content-area-default\">\n            \n \n                <div class=\"col-4                            col-lg-4 \n                            col-xl-4                             ta ta-lg ta-xl                            content-split-three__wrap\n                            order-1 order-lg-1                            mb-2                            \">\n                    <div class=\"content-split-three__col\">\n                        <p>Calibrating the parameters of complex numerical models to fit real-world observations is one of the most common problems found in industries such as finance, physics, simulations, engineering, etc. <span class=\"nag-n-override\" style=\"margin-left: 0 !important;\"><i>n<\/i><\/span>AG introduces at Mark\u00a027.1 of the <span class=\"nag-n-override\" style=\"margin-left: 0 !important;\"><i>n<\/i><\/span>AG Library a novel nonlinear least squares (NLN-LSQ) trust-region solver\u00a0<a style=\"color: #ff7d21;\" href=\"https:\/\/support.nag.com\/numeric\/nl\/nagdoc_latest\/clhtml\/e04\/e04ggc.html\" target=\"_blank\" rel=\"noopener\"><span class=\"cmtt-10\">handle<\/span><span class=\"cmtt-10\">_solve<\/span><span class=\"cmtt-10\">_bxnl<\/span><\/a>\u00a0(<a style=\"color: #ff7d21;\" href=\"http:\/\/support.nag.com\/numeric\/nl\/nagdoc_latest\/flhtml\/e04\/e04ggf.html\" target=\"_blank\" rel=\"noopener\">e04gg<\/a>) for unconstrained and bound-constrained fitting problems which implements various algorithms and regularization techniques. It is aimed at small to medium-sized fitting problems (up to 1000s of parameters) of the form<\/p>\n                    <\/div>\n                <\/div>\n\n            \n \n                <div class=\"col-4                            col-lg-4 \n                            col-xl-4                             ta ta-lg ta-xl                            content-split-three__wrap\n                            order-2 order-lg-2                            mb-2                            \">\n                    <div class=\"content-split-three__col\">\n                        <p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-984\" src=\"https:\/\/nag.com\/wp-content\/uploads\/2023\/05\/non-linear-least-squares-fit.png\" alt=\"\" width=\"780\" height=\"600\" \/><\/p>\n                    <\/div>\n                <\/div>\n\n            \n            \n        <\/div>\n    <\/div>\n<\/div>\n\n\n<math display=\"block\" xmlns=\"http:\/\/www.w3.org\/1998\/Math\/MathML\"> <mtable columnalign=\"left\"> <mtr> <mtd columnalign=\"right\"> <munder> <mtext>minimize<\/mtext> <mrow> <mi>x<\/mi> <mo>\u2208<\/mo> <msup> <mi>\u211d<\/mi> <mi>n<\/mi> <\/msup> <\/mrow> <\/munder> <\/mtd> <mtd><mstyle displaystyle=\"true\"> <munderover accent=\"false\" accentunder=\"false\"> <mo>\u2211<\/mo> <mrow> <mi>i<\/mi> <mo>=<\/mo> <mn>1<\/mn> <\/mrow> <mi>m<\/mi> <\/munderover> <msup> <mfenced separators=\"\"> <mi>\u03d5<\/mi> <mrow> <mo>(<\/mo> <mrow> <msub> <mrow> <mi>t<\/mi> <\/mrow> <mrow> <mi>i<\/mi> <\/mrow> <\/msub> <mo>,<\/mo> <mi>x<\/mi> <\/mrow> <mo>)<\/mo> <\/mrow> <mo>&#8211;<\/mo> <msub> <mrow> <mi>y<\/mi> <\/mrow> <mrow> <mi>i<\/mi> <\/mrow> <\/msub> <\/mfenced> <mn>2<\/mn> <\/msup> <\/mstyle> <\/mtd> <mtd columnalign=\"right\"> <\/mtd> <mtd> <mspace width=\"2em\"><\/mspace> <\/mtd> <\/mtr> <mtr> <mtd columnalign=\"right\"> <mtext>subject to<\/mtext> <\/mtd> <mtd> <mspace width=\"2.77695pt\"><\/mspace> <mi>\u2113<\/mi> <mo>\u2264<\/mo> <mi>x<\/mi> <mo>\u2264<\/mo> <mi>u<\/mi> <mo>,<\/mo> <mspace width=\"2em\"><\/mspace> <\/mtd> <mtd columnalign=\"right\"> <\/mtd> <mtd> <mspace width=\"2em\"><\/mspace> <\/mtd> <\/mtr> <\/mtable> <\/math>\n\n\n<!-- Spacer -->\n<div class=\"pt-4 pt-lg-4 pt-xl-4\" ><\/div>\n\n<div class=\"container content-area-default \">\n    <div class=\"row justify-content--center\">\n        <div class=\"col-12 col-md-12 col-lg-10 col-xl-8\">\n            <p>where the idea is to find optimal values for the parameters, \\(x\\), of the model represented by the smooth function \\(\u03d5(t,x)\\) (blue line) which fit \\(m\\) observed data points \\((t_{i},y_{i})\\) (black dots). That is, to minimize the squared error between the model and the data (vertical red bars).<\/p>\n<p><span style=\"color: #ff7d21;\"><a style=\"color: #ff7d21;\" href=\"http:\/\/support.nag.com\/numeric\/nl\/nagdoc_latest\/flhtml\/e04\/e04ggf.html\" target=\"_blank\" rel=\"noopener\">e04gg<\/a>\u00a0<\/span>should present a significant improvement over the current nonlinear least squares solvers in the <span class=\"nag-n-override\" style=\"margin-left: 0 !important;\"><i>n<\/i><\/span>AG Library. In addition, this solver fills the gap between unconstrained solvers such as\u00a0<span style=\"color: #ff7d21;\"><a style=\"color: #ff7d21;\" href=\"https:\/\/support.nag.com\/numeric\/nl\/nagdoc_latest\/clhtml\/e04\/e04gbc.html\"><span class=\"cmtt-10\">lsq<\/span><span class=\"cmtt-10\">_uncon<\/span><span class=\"cmtt-10\">_quasi<\/span><span class=\"cmtt-10\">_deriv<\/span><span class=\"cmtt-10\">_comp<\/span><\/a>\u00a0<\/span>(<span style=\"color: #ff7d21;\"><a style=\"color: #ff7d21;\" href=\"https:\/\/support.nag.com\/numeric\/nl\/nagdoc_latest\/flhtml\/e04\/e04gbf.html\">e04gb<\/a><\/span>) and the fully constrained ones, such as\u00a0<span style=\"color: #ff7d21;\"><a style=\"color: #ff7d21;\" href=\"https:\/\/support.nag.com\/numeric\/nl\/nagdoc_latest\/clhtml\/e04\/e04unc.html\"><span class=\"cmtt-10\">lsq<\/span><span class=\"cmtt-10\">_gencon<\/span><span class=\"cmtt-10\">_deriv<\/span><\/a>\u00a0<\/span>(<span style=\"color: #ff7d21;\"><a style=\"color: #ff7d21;\" href=\"https:\/\/support.nag.com\/numeric\/nl\/nagdoc_latest\/flhtml\/e04\/e04usf.html\">e04us<\/a><\/span>).<\/p>\n<p><span style=\"color: #ff7d21;\"><a style=\"color: #ff7d21;\" href=\"https:\/\/support.nag.com\/numeric\/nl\/nagdoc_latest\/flhtml\/e04\/e04ggf.html\">e04gg<\/a>\u00a0<\/span>is part of the\u00a0<a href=\"https:\/\/support.nag.com\/numeric\/nl\/nagdoc_latest\/flhtml\/e04\/e04intro.html#optsuite\"><span class=\"nag-n-override\" style=\"margin-left: 0 !important;\"><i>n<\/i><\/span>AG Optimization Modelling Suite<\/a>\u00a0which offers clarity and consistency on the interface of the solvers within the suite.<\/p>\n<p>The new solver stems from a collaboration with the Rutherford Appleton Laboratory\u00a0<span class=\"cite\">[<a style=\"color: #ff7d21;\" href=\"#Xral1\">1<\/a>]<\/span>\u00a0and demonstrates <span class=\"nag-n-override\" style=\"margin-left: 0 !important;\"><i>n<\/i><\/span>AG\u2019s ongoing effort to expand and improve its offering in mathematical optimization.<\/p>\n        <\/div>\n    <\/div>\n<\/div>\n\n\n<div class=\"gbc-title-banner ta ta-lg ta-xl\" style='border-radius: 0px; '>\n    <div class=\"container\" style='border-radius: 0px; '>\n        <div class=\"row justify-content--center\" >\n            <div class=\"col-12\"  >\n                <div class=\"wrap pv-4 \" style=\"0pxbackground-color: \">\n                                <div class=\"col-12 col-md-12 col-lg-10 col-xl-8  banner-content\"  >\n    \n                    \n                    <div class=\"mt-1 mb-1 content\"><\/div>\n\n                    \n                    <a href='https:\/\/support.nag.com\/content\/getting-started-nag-library' style='background-color: #ff7d21ff; color: #ffffffff; border-radius: 30px; font-weight: 600; ' class='btn mr-1  ' >Try the solver <i class='fas fa-angle-right'><\/i><\/a>                <\/div>\n                <\/div>\n            <\/div>\n        <\/div>\n    <\/div>\n<\/div>\n\n\n\n<div class=\"gbc-title-banner ta ta-lg ta-xl\" style='border-radius: 0px; '>\n    <div class=\"container\" style='border-radius: 0px; '>\n        <div class=\"row justify-content--center\" >\n            <div class=\"col-12\"  >\n                <div class=\"wrap pv-4 \" style=\"0pxbackground-color: #eaeaeaff\">\n                                <div class=\"col-12 col-md-12 col-lg-10 col-xl-8  banner-content\"  >\n    \n                                             <h3>Features:<\/h3>\n                    \n                    <div class=\"mt-1 mb-1 content\"><ul>\n<li>Well established trust-region method with a variety of implemented algorithms, ranging from simple Powell\u2019s\u00a0<span class=\"cmti-10\">dogleg\u00a0<\/span>or Gauss-Newton methods to sophisticated Tensor\u2013Newton schemes which overcome convergence difficulties present in simpler methods;<\/li>\n<li>Avoids data over-fitting by incorporating different types of regularization for both the problem formulation and the trust-region subproblem;<\/li>\n<li>Ability to recover when it is not possible to evaluate the function \\(\u03d5(t,x)\\) or its gradient at a given point;<\/li>\n<li>Account for uncertainty in the observed data by using optional residual weights;<\/li>\n<li>Flexible stopping criteria that can suit the problem and data tolerances.<\/li>\n<\/ul>\n<\/div>\n\n                    \n                                    <\/div>\n                <\/div>\n            <\/div>\n        <\/div>\n    <\/div>\n<\/div>\n\n\n<!-- Spacer -->\n<div class=\"pt-4 pt-lg-4 pt-xl-4\" ><\/div>\n\n<div class=\"container content-area-default \">\n    <div class=\"row justify-content--center\">\n        <div class=\"col-12 col-md-12 col-lg-10 col-xl-8\">\n            <h4>Modern Replacement for\u00a0<a href=\"https:\/\/support.nag.com\/numeric\/nl\/nagdoc_latest\/flhtml\/e04\/e04gbf.html\">e04gb<\/a>\u00a0and\u00a0<a href=\"https:\/\/support.nag.com\/numeric\/nl\/nagdoc_latest\/flhtml\/e04\/e04usf.html\">e04us<\/a><\/h4>\n<p><span class=\"cmbx-10\">The new solver\u00a0<\/span><a href=\"https:\/\/support.nag.com\/numeric\/nl\/nagdoc_latest\/flhtml\/e04\/e04ggf.html\"><span class=\"cmbx-10\">e04gg<\/span><\/a>\u00a0<span class=\"cmbx-10\">offers unprecedented robustness and a significant<\/span>\u00a0<span class=\"cmbx-10\">speed-up over current alternatives in the Library, namely\u00a0<\/span><a href=\"https:\/\/support.nag.com\/numeric\/nl\/nagdoc_latest\/flhtml\/e04\/e04gbf.html\"><span class=\"cmbx-10\">e04gb<\/span><\/a>\u00a0<span class=\"cmbx-10\">for<\/span>\u00a0<span class=\"cmbx-10\">unconstrained nonlinear least squares problems and\u00a0<\/span><a href=\"https:\/\/support.nag.com\/numeric\/nl\/nagdoc_latest\/flhtml\/e04\/e04usf.html\"><span class=\"cmbx-10\">e04us<\/span><\/a>\u00a0<span class=\"cmbx-10\">for problems<\/span>\u00a0<span class=\"cmbx-10\">with simple variable bounds. You are highly recommended to upgrade to<\/span>\u00a0<span class=\"cmbx-10\">the new solver.<\/span><\/p>\n<p>Our benchmarks comparing\u00a0<a href=\"https:\/\/support.nag.com\/numeric\/nl\/nagdoc_latest\/flhtml\/e04\/e04ggf.html\">e04gg<\/a>\u00a0to\u00a0<a href=\"https:\/\/support.nag.com\/numeric\/nl\/nagdoc_latest\/flhtml\/e04\/e04gbf.html\">e04gb<\/a>\u00a0on 68 unconstrained nonlinear least squares CUTEst problems are reported in Figure\u00a0<a href=\"#fig1\">1<\/a>\u00a0(a)\u2013(c) using performance profiles. The three plots show that the new solver is faster: solving 60% of the problems in less time\u00a0(a) and is more robust, solving 25% more problems. Requires fewer user callbacks: 55% of problems require fewer function calls (b) and 65% require fewer gradient evaluations (c).<\/p>\n<p>As the\u00a0<a href=\"https:\/\/support.nag.com\/numeric\/nl\/nagdoc_latest\/flhtml\/e04\/e04gbf.html\">e04gb<\/a>\u00a0solver was not designed to tackle simple bounds directly, typically\u00a0<a href=\"https:\/\/support.nag.com\/numeric\/nl\/nagdoc_latest\/flhtml\/e04\/e04usf.html\">e04us<\/a>\u00a0would be used instead for such problems. However,\u00a0<a href=\"https:\/\/support.nag.com\/numeric\/nl\/nagdoc_latest\/flhtml\/e04\/e04usf.html\">e04us<\/a>\u00a0being a more general solver does not fully exploit the structure of NLN-LSQ problems as\u00a0<a href=\"https:\/\/support.nag.com\/numeric\/nl\/nagdoc_latest\/flhtml\/e04\/e04ggf.html\">e04gg<\/a>\u00a0does in the presence of simple bounds. That\u2019s why a speed-up on 45% of problems can be observed\u00a0(d) as well as a reduction in user callbacks: 65% of problems require fewer function and gradient calls (e and f) when comparing\u00a0<a href=\"https:\/\/support.nag.com\/numeric\/nl\/nagdoc_latest\/flhtml\/e04\/e04usf.html\">e04us<\/a>\u00a0and\u00a0<a href=\"https:\/\/support.nag.com\/numeric\/nl\/nagdoc_latest\/flhtml\/e04\/e04ggf.html\">e04gg<\/a>\u00a0on 112 unconstrained and bound-constrained nonlinear least square CUTEst problems.<\/p>\n        <\/div>\n    <\/div>\n<\/div>\n\n\n\n<div class=\"content-split-three pv-4 \" >\n    <div class=\"container\">\n        <div class=\"row justify-content--center content-area-default\">\n            \n \n                <div class=\"col-3                            col-lg-3 \n                            col-xl-3                             ta ta-lg ta-xl                            content-split-three__wrap\n                            order-1 order-lg-1                            mb-2                            \">\n                    <div class=\"content-split-three__col\">\n                        <p id=\"fig1\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1042\" src=\"https:\/\/nag.com\/wp-content\/uploads\/2023\/05\/b-ral_sif-e04gg-e04gb-nt.png\" alt=\"\" width=\"495\" height=\"406\" \/><\/p>\n<p class=\"para-sm\" style=\"text-align: center;\">(a) Time<\/p>\n                    <\/div>\n                <\/div>\n\n            \n \n                <div class=\"col-3                            col-lg-3 \n                            col-xl-3                             ta ta-lg ta-xl                            content-split-three__wrap\n                            order-2 order-lg-2                            mb-2                            \">\n                    <div class=\"content-split-three__col\">\n                        <p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1043\" style=\"display: block; margin-left: auto; margin-right: auto;\" src=\"https:\/\/nag.com\/wp-content\/uploads\/2023\/05\/b-ral_sif-e04gg-e04gb-nf.png\" alt=\"\" width=\"495\" height=\"406\" \/><\/p>\n<p class=\"para-sm\" style=\"text-align: center;\">(b) Function calls<\/p>\n                    <\/div>\n                <\/div>\n\n            \n \n                <div class=\"col-3                            col-lg-3 \n                            col-xl-3                             ta ta-lg ta-xl                            content-split-three__wrap\n                            order-3 order-lg-3                            mb-2                            \">\n                    <div class=\"content-split-three__col\">\n                        <p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1044\" style=\"display: block; margin-left: auto; margin-right: auto;\" src=\"https:\/\/nag.com\/wp-content\/uploads\/2023\/05\/b-ral_sif-e04gg-e04gb-ng.png\" alt=\"\" width=\"495\" height=\"407\" \/><\/p>\n<p class=\"para-sm\" style=\"text-align: center;\">(c) Gradient calls<\/p>\n                    <\/div>\n                <\/div>\n\n            \n            \n        <\/div>\n    <\/div>\n<\/div>\n\n\n\n<div class=\"content-split-three pv-4 \" >\n    <div class=\"container\">\n        <div class=\"row justify-content--center content-area-default\">\n            \n \n                <div class=\"col-3                            col-lg-3 \n                            col-xl-3                             ta ta-lg ta-xl                            content-split-three__wrap\n                            order-1 order-lg-1                            mb-0                            \">\n                    <div class=\"content-split-three__col\">\n                        <p>\u00a0<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1046\" src=\"https:\/\/nag.com\/wp-content\/uploads\/2023\/05\/m-cutest-e04gg-e04us-nt.png\" alt=\"\" width=\"495\" height=\"406\" \/><\/p>\n<p class=\"para-sm\" style=\"text-align: center;\">(d) Time<\/p>\n                    <\/div>\n                <\/div>\n\n            \n \n                <div class=\"col-3                            col-lg-3 \n                            col-xl-3                             ta ta-lg ta-xl                            content-split-three__wrap\n                            order-2 order-lg-2                            mb-0                            \">\n                    <div class=\"content-split-three__col\">\n                        <p>\u00a0<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1047\" src=\"https:\/\/nag.com\/wp-content\/uploads\/2023\/05\/m-cutest-e04gg-e04us-nf.png\" alt=\"\" width=\"495\" height=\"406\" \/><\/p>\n<p class=\"para-sm\" style=\"text-align: center;\">(e) Function calls<\/p>\n                    <\/div>\n                <\/div>\n\n            \n \n                <div class=\"col-3                            col-lg-3 \n                            col-xl-3                             ta ta-lg ta-xl                            content-split-three__wrap\n                            order-3 order-lg-3                            mb-0                            \">\n                    <div class=\"content-split-three__col\">\n                        <p>\u00a0<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1049\" src=\"https:\/\/nag.com\/wp-content\/uploads\/2023\/05\/m-cutest-e04gg-e04us-ng-1.png\" alt=\"\" width=\"495\" height=\"406\" \/><\/p>\n<p class=\"para-sm\" style=\"text-align: center;\">(f) Gradient calls<\/p>\n                    <\/div>\n                <\/div>\n\n            \n            \n        <\/div>\n    <\/div>\n<\/div>\n\n<div class=\"container content-area-default \">\n    <div class=\"row justify-content--center\">\n        <div class=\"col-12 col-md-12 col-lg-10 col-xl-8\">\n            <p class=\"para-sm\"><span class=\"id\">Figure\u00a01:\u00a0<\/span><span class=\"content\">(a)\u2013(c) Performance profiles comparing solvers\u00a0<a href=\"https:\/\/support.nag.com\/numeric\/nl\/nagdoc_latest\/flhtml\/e04\/e04ggf.html\">e04gg<\/a>\u00a0and\u00a0<a href=\"https:\/\/support.nag.com\/numeric\/nl\/nagdoc_latest\/flhtml\/e04\/e04gbf.html\">e04gb<\/a>\u00a0over 68 CUTEst unconstrained nonlinear least squares problems, while (d)\u2013(f) report the performance profiles of\u00a0<a href=\"https:\/\/support.nag.com\/numeric\/nl\/nagdoc_latest\/flhtml\/e04\/e04ggf.html\">e04gg<\/a>\u00a0and\u00a0<a href=\"https:\/\/support.nag.com\/numeric\/nl\/nagdoc_latest\/flhtml\/e04\/e04usf.html\">e04us<\/a>\u00a0for 112 CUTEst unconstrained and bound constrained nonlinear least squares problems. Performance measures are time in seconds (a and d), number of function calls (b and e), and number of gradient calls (c and f). For the time plots, the higher line indicates the faster solver. For the centre and right column plots, the higher line represents fewer functions and gradients calls respectively.<\/span><\/p>\n        <\/div>\n    <\/div>\n<\/div>\n\n<!-- Spacer -->\n<div class=\"pt-4 pt-lg-4 pt-xl-4\" ><\/div>\n\n<div class=\"container content-area-default \">\n    <div class=\"row justify-content--center\">\n        <div class=\"col-12 col-md-12 col-lg-10 col-xl-8\">\n            <h4>Real-world example: a particle track data-fitting<\/h4>\n<p>The following example illustrates the usage of\u00a0<a href=\"https:\/\/support.nag.com\/numeric\/nl\/nagdoc_latest\/flhtml\/e04\/e04ggf.html\">e04gg<\/a>\u00a0to fit PADC etched nuclear track data to a convoluted distribution. A target sheet is scanned and track diameters are recorded (red wedges in left image of Figure\u00a0<a href=\"#fig2\">2<\/a>) into a histogram (blue bars in right plot of Figure\u00a0<a href=\"#fig2\">2<\/a>) and a mixed Normal and log-Normal model is to be fitted to the obtained experimental histogram.\u00a0<a href=\"https:\/\/support.nag.com\/numeric\/nl\/nagdoc_latest\/flhtml\/e04\/e04ggf.html\">e04gg<\/a>\u00a0is used to fit the six parameter model<\/p>\n        <\/div>\n    <\/div>\n<\/div>\n\n<!-- Spacer -->\n<div class=\"pt-4 pt-lg-4 pt-xl-4\" ><\/div>\n\n\n<math display=\"block\" xmlns=\"http:\/\/www.w3.org\/1998\/Math\/MathML\"><mtable class=\"align-star\" columnalign=\"left\"><mtr><mtd class=\"align-odd\" columnalign=\"right\"><mi>\u03d5<\/mi><mstyle mathsize=\"1.19em\"><mfenced close=\"\" open=\"(\" separators=\"\"><mrow><\/mrow><\/mfenced><\/mstyle><mi>t<\/mi><mo class=\"MathClass-punc\">,<\/mo><mi>x<\/mi><mo class=\"MathClass-rel\">=<\/mo><mrow><mo class=\"MathClass-open\">(<\/mo><mrow><mi>\u00b5<\/mi><mo class=\"MathClass-punc\">,<\/mo><mi>s<\/mi><mo class=\"MathClass-punc\">,<\/mo><msub><mrow><mi>A<\/mi><\/mrow><mrow><mi>g<\/mi><\/mrow><\/msub><mo class=\"MathClass-punc\">,<\/mo><mi>a<\/mi><mo class=\"MathClass-punc\">,<\/mo><mi>b<\/mi><mo class=\"MathClass-punc\">,<\/mo><msub><mrow><mi>A<\/mi><\/mrow><mrow><mi>l<\/mi><\/mrow><\/msub><\/mrow><mo class=\"MathClass-close\">)<\/mo><\/mrow><mstyle mathsize=\"1.19em\"><mfenced close=\"\" open=\")\" separators=\"\"><mrow><\/mrow><\/mfenced><\/mstyle><\/mtd><mtd class=\"align-even\"><mo class=\"MathClass-rel\">=<\/mo><mstyle class=\"text\"><mtext>Normal<\/mtext><\/mstyle><mrow><mo class=\"MathClass-open\">(<\/mo><mrow><mi>\u00b5<\/mi><mo class=\"MathClass-punc\">,<\/mo><mi>s<\/mi><mo class=\"MathClass-punc\">,<\/mo><msub><mrow><mi>A<\/mi><\/mrow><mrow><mi>g<\/mi><\/mrow><\/msub><\/mrow><mo class=\"MathClass-close\">)<\/mo><\/mrow><mo class=\"MathClass-bin\">+<\/mo><mstyle class=\"text\"><mtext>log-Normal<\/mtext><\/mstyle><mrow><mo class=\"MathClass-open\">(<\/mo><mrow><mi>a<\/mi><mo class=\"MathClass-punc\">,<\/mo><mi>b<\/mi><mo class=\"MathClass-punc\">,<\/mo><msub><mrow><mi>A<\/mi><\/mrow><mrow><mi>l<\/mi><\/mrow><\/msub><\/mrow><mo class=\"MathClass-close\">)<\/mo><\/mrow><mspace width=\"2em\"><\/mspace><\/mtd><mtd class=\"align-label\" columnalign=\"right\"><\/mtd><mtd class=\"align-label\"><mspace width=\"2em\"><\/mspace><\/mtd><\/mtr><mtr><mtd class=\"align-odd\" columnalign=\"right\"><mstyle class=\"text\"><mtext>subject to<\/mtext><\/mstyle><\/mtd><mtd class=\"align-even\"><mspace class=\"quad\" width=\"1em\"><\/mspace><mn>0<\/mn><mo class=\"MathClass-rel\">\u2264<\/mo><mi>x<\/mi><mo class=\"MathClass-punc\">,<\/mo><mspace width=\"2em\"><\/mspace><\/mtd><mtd class=\"align-label\" columnalign=\"right\"><\/mtd><mtd class=\"align-label\"><mspace width=\"2em\"><\/mspace><\/mtd><\/mtr><\/mtable><\/math>\n\n\n<!-- Spacer -->\n<div class=\"pt-4 pt-lg-4 pt-xl-4\" ><\/div>\n\n<div class=\"container content-area-default \">\n    <div class=\"row justify-content--center\">\n        <div class=\"col-12 col-md-12 col-lg-10 col-xl-8\">\n            <p>using the histogram heights. Thanks to the use of regularization and residual weights,\u00a0<a href=\"https:\/\/support.nag.com\/numeric\/nl\/nagdoc_latest\/flhtml\/e04\/e04ggf.html\">e04gg<\/a> provided a robust solution \\(x^*\\) to unfold the parameters for the two distributions (red and blue curves in right plot of Figure\u00a0<a href=\"#fig2\">2<\/a>). Adding these together produce the green curve which is the one used to perform the fitting. Data and complete python source code for this example are available\u00a0<a href=\"https:\/\/github.com\/numericalalgorithmsgroup\/NAGPythonExamples\/tree\/master\/local_optimization\/BXNL\" target=\"_blank\" rel=\"noopener\">here<\/a>.<\/p>\n<div class=\"figure\" id=\"fig2\">\u00a0<\/div>\n<div><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-1050 aligncenter\" src=\"https:\/\/nag.com\/wp-content\/uploads\/2023\/05\/padc.png\" alt=\"\" width=\"733\" height=\"335\" \/><\/div>\n<div>\n<p class=\"caption para-sm\"><span class=\"id\">Figure\u00a02:\u00a0<\/span><span class=\"content\">Left: example of a PADC target with \\(<span id=\"MathJax-Element-9-Frame\" class=\"MathJax\" style=\"box-sizing: border-box; display: inline; font-style: normal; font-weight: normal; line-height: normal; font-size: 16px; text-indent: 0px; text-align: left; text-transform: none; letter-spacing: normal; word-spacing: normal; overflow-wrap: normal; white-space: nowrap; float: none; direction: ltr; max-width: none; max-height: none; min-width: 0px; min-height: 0px; border: 0px; padding: 0px; margin: 0px; position: relative;\" tabindex=\"0\" role=\"presentation\" data-mathml=\"&lt;math xmlns=&quot;http:\/\/www.w3.org\/1998\/Math\/MathML&quot; display=&quot;inline&quot;&gt;&lt;mi&gt;a&lt;\/mi&gt;&lt;\/math&gt;\"><span id=\"MathJax-Span-229\" class=\"math\"><span id=\"MathJax-Span-230\" class=\"mrow\"><span id=\"MathJax-Span-231\" class=\"mi\">a\\)<\/span><\/span><\/span><\/span>\u00a0particle etched tracks, wedges in red show the track diameter. Right: diameter histogram from experimental data (blue bars), aggregated model used for the fitting (green curve) and unfolded models (blue and red curves). Optimal parameter values are reported in the legend.<\/span><\/p>\n<p class=\"para-sm\">For further examples and reading visit our\u00a0<a href=\"https:\/\/github.com\/numericalalgorithmsgroup\/NAGPythonExamples\/tree\/master\/local_optimization\" target=\"_blank\" rel=\"noopener\">GitHub Local Optimization<\/a>\u00a0page.<\/p>\n<\/div>\n        <\/div>\n    <\/div>\n<\/div>\n\n<!-- Spacer -->\n<div class=\"pt-4 pt-lg-4 pt-xl-4\" ><\/div>\n\n\n<div class=\"gbc-title-banner ta ta-lg ta-xl\" style='color: #ffffffff; border-radius: 20px; '>\n    <div class=\"container\" style='border-radius: 20px; '>\n        <div class=\"row justify-content--center\" style='color: #ffffffff;'>\n            <div class=\"col-12\"  >\n                <div class=\"wrap pv-4 \" style=\"border-radius: 20px;background-color: #082d48ff\">\n                                <div class=\"col-12 col-md-12 col-lg-10 col-xl-8  banner-content\"  >\n    \n                                             <h3>References<\/h3>\n                    \n                    <div class=\"mt-1 mb-1 content\"><p id=\"Xral1\">[1] Gould N I M, Rees T, and Scott J A (2017) A higher order method for solving nonlinear least-squares problems. Technical report, RAL-P-1027-010 RAL Library. STFC Rutherford Appleton Laboratory. <span style=\"color: #ff7d21;\"><a style=\"color: #ff7d21;\" href=\"http:\/\/www.numerical.rl.ac.uk\/people\/rees\/pdf\/RAL-P-2017-010.pdf\" target=\"_blank\" rel=\"noopener\"><span style=\"text-decoration: underline;\">Link to report<\/span>.<\/a><\/span><\/p>\n<p>[2] Kanzow C, Yamashita N, and Fukushima M (2004) Levenberg-Marquardt methods with strong local convergence properties for solving nonlinear equations with convex constraints. Journal of Computational and Applied Mathematics 174 375\u2013397.<\/p>\n<p>[3] Sajo-Bohus L. (2020) Data provided in private communication.<\/p>\n<\/div>\n\n                    \n                                    <\/div>\n                <\/div>\n            <\/div>\n        <\/div>\n    <\/div>\n<\/div>\n\n\n<!-- Spacer -->\n<div class=\"pt-4 pt-lg-4 pt-xl-4\" ><\/div>","protected":false},"excerpt":{"rendered":"<p>minimize x \u2208 \u211d n \u2211 i = 1 m \u03d5 ( t i , x ) &#8211; y i 2 subject to \u2113 \u2264 x \u2264 u , \u03d5t,x=(\u00b5,s,Ag,a,b,Al)=Normal(\u00b5,s,Ag)+log-Normal(a,b,Al)subject to0\u2264x,<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"content-type":"","footnotes":""},"class_list":["post-982","page","type-page","status-publish","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.8 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Faster Data Fitting Solver - nAG<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/nag.com\/faster-data-fitting-solver\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Faster Data Fitting Solver - nAG\" \/>\n<meta property=\"og:description\" content=\"minimize x \u2208 \u211d n \u2211 i = 1 m \u03d5 ( t i , x ) &#8211; y i 2 subject to \u2113 \u2264 x \u2264 u , \u03d5t,x=(\u00b5,s,Ag,a,b,Al)=Normal(\u00b5,s,Ag)+log-Normal(a,b,Al)subject to0\u2264x,\" \/>\n<meta property=\"og:url\" content=\"https:\/\/nag.com\/faster-data-fitting-solver\/\" \/>\n<meta property=\"og:site_name\" content=\"nAG\" \/>\n<meta property=\"article:modified_time\" content=\"2023-07-11T15:42:11+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/nag.com\/wp-content\/uploads\/2024\/02\/NAG-Logo-White-On-Blue.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"12770\" \/>\n\t<meta property=\"og:image:height\" content=\"4353\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:site\" content=\"@NAGTalk\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/nag.com\/faster-data-fitting-solver\/\",\"url\":\"https:\/\/nag.com\/faster-data-fitting-solver\/\",\"name\":\"Faster Data Fitting Solver - nAG\",\"isPartOf\":{\"@id\":\"https:\/\/nag.com\/#website\"},\"datePublished\":\"2023-05-25T08:10:47+00:00\",\"dateModified\":\"2023-07-11T15:42:11+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/nag.com\/faster-data-fitting-solver\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/nag.com\/faster-data-fitting-solver\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/nag.com\/faster-data-fitting-solver\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/nag.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Faster Data Fitting Solver\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/nag.com\/#website\",\"url\":\"https:\/\/nag.com\/\",\"name\":\"NAG\",\"description\":\"Robust, trusted numerical software and computational expertise.\",\"publisher\":{\"@id\":\"https:\/\/nag.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/nag.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/nag.com\/#organization\",\"name\":\"Numerical Algorithms Group\",\"alternateName\":\"NAG\",\"url\":\"https:\/\/nag.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/nag.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/nag.com\/wp-content\/uploads\/2023\/11\/NAG-Logo.png\",\"contentUrl\":\"https:\/\/nag.com\/wp-content\/uploads\/2023\/11\/NAG-Logo.png\",\"width\":1244,\"height\":397,\"caption\":\"Numerical Algorithms Group\"},\"image\":{\"@id\":\"https:\/\/nag.com\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/x.com\/NAGTalk\",\"https:\/\/www.linkedin.com\/company\/nag\/\",\"https:\/\/www.youtube.com\/user\/NumericalAlgorithms\",\"https:\/\/github.com\/numericalalgorithmsgroup\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Faster Data Fitting Solver - nAG","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/nag.com\/faster-data-fitting-solver\/","og_locale":"en_US","og_type":"article","og_title":"Faster Data Fitting Solver - nAG","og_description":"minimize x \u2208 \u211d n \u2211 i = 1 m \u03d5 ( t i , x ) &#8211; y i 2 subject to \u2113 \u2264 x \u2264 u , \u03d5t,x=(\u00b5,s,Ag,a,b,Al)=Normal(\u00b5,s,Ag)+log-Normal(a,b,Al)subject to0\u2264x,","og_url":"https:\/\/nag.com\/faster-data-fitting-solver\/","og_site_name":"nAG","article_modified_time":"2023-07-11T15:42:11+00:00","og_image":[{"width":12770,"height":4353,"url":"https:\/\/nag.com\/wp-content\/uploads\/2024\/02\/NAG-Logo-White-On-Blue.jpg","type":"image\/jpeg"}],"twitter_card":"summary_large_image","twitter_site":"@NAGTalk","twitter_misc":{"Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/nag.com\/faster-data-fitting-solver\/","url":"https:\/\/nag.com\/faster-data-fitting-solver\/","name":"Faster Data Fitting Solver - nAG","isPartOf":{"@id":"https:\/\/nag.com\/#website"},"datePublished":"2023-05-25T08:10:47+00:00","dateModified":"2023-07-11T15:42:11+00:00","breadcrumb":{"@id":"https:\/\/nag.com\/faster-data-fitting-solver\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/nag.com\/faster-data-fitting-solver\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/nag.com\/faster-data-fitting-solver\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/nag.com\/"},{"@type":"ListItem","position":2,"name":"Faster Data Fitting Solver"}]},{"@type":"WebSite","@id":"https:\/\/nag.com\/#website","url":"https:\/\/nag.com\/","name":"NAG","description":"Robust, trusted numerical software and computational expertise.","publisher":{"@id":"https:\/\/nag.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/nag.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/nag.com\/#organization","name":"Numerical Algorithms Group","alternateName":"NAG","url":"https:\/\/nag.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/nag.com\/#\/schema\/logo\/image\/","url":"https:\/\/nag.com\/wp-content\/uploads\/2023\/11\/NAG-Logo.png","contentUrl":"https:\/\/nag.com\/wp-content\/uploads\/2023\/11\/NAG-Logo.png","width":1244,"height":397,"caption":"Numerical Algorithms Group"},"image":{"@id":"https:\/\/nag.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/x.com\/NAGTalk","https:\/\/www.linkedin.com\/company\/nag\/","https:\/\/www.youtube.com\/user\/NumericalAlgorithms","https:\/\/github.com\/numericalalgorithmsgroup"]}]}},"_links":{"self":[{"href":"https:\/\/nag.com\/wp-json\/wp\/v2\/pages\/982","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/nag.com\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/nag.com\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/nag.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/nag.com\/wp-json\/wp\/v2\/comments?post=982"}],"version-history":[{"count":28,"href":"https:\/\/nag.com\/wp-json\/wp\/v2\/pages\/982\/revisions"}],"predecessor-version":[{"id":3230,"href":"https:\/\/nag.com\/wp-json\/wp\/v2\/pages\/982\/revisions\/3230"}],"wp:attachment":[{"href":"https:\/\/nag.com\/wp-json\/wp\/v2\/media?parent=982"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}