From 4648b771bd34ad3d60178b6c7405e921d7febcdc Mon Sep 17 00:00:00 2001
From: sanchay <sanchaynts9422@gmail.com>
Date: Wed, 19 Mar 2025 09:15:08 +0000
Subject: [PATCH 1/3] feat: adding stats/incr/nanmmse

---
type: pre_commit_static_analysis_report
description: Results of running static analysis checks when committing changes.
report:
  - task: lint_filenames
    status: passed
  - task: lint_editorconfig
    status: passed
  - task: lint_markdown
    status: passed
  - task: lint_package_json
    status: passed
  - task: lint_repl_help
    status: passed
  - task: lint_javascript_src
    status: passed
  - task: lint_javascript_cli
    status: na
  - task: lint_javascript_examples
    status: passed
  - task: lint_javascript_tests
    status: passed
  - task: lint_javascript_benchmarks
    status: passed
  - task: lint_python
    status: na
  - task: lint_r
    status: na
  - task: lint_c_src
    status: na
  - task: lint_c_examples
    status: na
  - task: lint_c_benchmarks
    status: na
  - task: lint_c_tests_fixtures
    status: na
  - task: lint_shell
    status: na
  - task: lint_typescript_declarations
    status: passed
  - task: lint_typescript_tests
    status: passed
  - task: lint_license_headers
    status: passed
---
---
 .../@stdlib/stats/incr/nanmmse/README.md      | 181 ++++++++++++++++++
 .../stats/incr/nanmmse/benchmark/benchmark.js |  69 +++++++
 .../docs/img/equation_mean_squared_error.svg  |  60 ++++++
 .../@stdlib/stats/incr/nanmmse/docs/repl.txt  |  49 +++++
 .../stats/incr/nanmmse/docs/types/index.d.ts  |  76 ++++++++
 .../stats/incr/nanmmse/docs/types/test.ts     |  74 +++++++
 .../stats/incr/nanmmse/examples/index.js      |  45 +++++
 .../@stdlib/stats/incr/nanmmse/lib/index.js   |  63 ++++++
 .../@stdlib/stats/incr/nanmmse/lib/main.js    |  94 +++++++++
 .../@stdlib/stats/incr/nanmmse/package.json   |  84 ++++++++
 .../@stdlib/stats/incr/nanmmse/test/test.js   | 133 +++++++++++++
 11 files changed, 928 insertions(+)
 create mode 100644 lib/node_modules/@stdlib/stats/incr/nanmmse/README.md
 create mode 100644 lib/node_modules/@stdlib/stats/incr/nanmmse/benchmark/benchmark.js
 create mode 100644 lib/node_modules/@stdlib/stats/incr/nanmmse/docs/img/equation_mean_squared_error.svg
 create mode 100644 lib/node_modules/@stdlib/stats/incr/nanmmse/docs/repl.txt
 create mode 100644 lib/node_modules/@stdlib/stats/incr/nanmmse/docs/types/index.d.ts
 create mode 100644 lib/node_modules/@stdlib/stats/incr/nanmmse/docs/types/test.ts
 create mode 100644 lib/node_modules/@stdlib/stats/incr/nanmmse/examples/index.js
 create mode 100644 lib/node_modules/@stdlib/stats/incr/nanmmse/lib/index.js
 create mode 100644 lib/node_modules/@stdlib/stats/incr/nanmmse/lib/main.js
 create mode 100644 lib/node_modules/@stdlib/stats/incr/nanmmse/package.json
 create mode 100644 lib/node_modules/@stdlib/stats/incr/nanmmse/test/test.js

diff --git a/lib/node_modules/@stdlib/stats/incr/nanmmse/README.md b/lib/node_modules/@stdlib/stats/incr/nanmmse/README.md
new file mode 100644
index 000000000000..708267f9b673
--- /dev/null
+++ b/lib/node_modules/@stdlib/stats/incr/nanmmse/README.md
@@ -0,0 +1,181 @@
+<!--
+
+@license Apache-2.0
+
+Copyright (c) 2025 The Stdlib Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+-->
+
+# incrnanmmse
+
+> Compute a moving [mean squared error][mean-squared-error] (MSE) incrementally, ignoring `NaN` values.
+
+<section class="intro">
+
+For a window of size `W`, the [mean squared error][mean-squared-error] is defined as
+
+<!-- <equation class="equation" label="eq:mean_squared_error" align="center" raw="\operatorname{MSE} = \frac{1}{W} \sum_{i=0}^{W-1} (y_i - x_i)^2" alt="Equation for the mean squared error."> -->
+
+```math
+\mathop{\mathrm{MSE}} = \frac{1}{W} \sum_{i=0}^{W-1} (y_i - x_i)^2
+```
+
+<!-- <div class="equation" align="center" data-raw-text="\operatorname{MSE} = \frac{1}{W} \sum_{i=0}^{W-1} (y_i - x_i)^2" data-equation="eq:mean_squared_error">
+    <img src="https://cdn.jsdelivr.net/gh/stdlib-js/stdlib@9cb3c4a2fcf92ca07ed60c34de1ceda40f75919c/lib/node_modules/@stdlib/stats/incr/nanmmse/docs/img/equation_mean_squared_error.svg" alt="Equation for the mean squared error.">
+    <br>
+</div> -->
+
+<!-- </equation> -->
+
+</section>
+
+<!-- /.intro -->
+
+<section class="usage">
+
+## Usage
+
+```javascript
+var incrnanmmse = require( '@stdlib/stats/incr/nanmmse' );
+```
+
+#### incrnanmmse( window )
+
+Returns an accumulator `function` which incrementally computes a moving [mean squared error][mean-squared-error]. The `window` parameter defines the number of values over which to compute the moving [mean squared error][mean-squared-error].
+
+```javascript
+var accumulator = incrnanmmse( 3 );
+```
+
+#### accumulator( \[x, y] )
+
+If provided input values `x` and `y`, the accumulator function returns an updated [mean squared error][mean-squared-error]. If not provided input values `x` and `y`, the accumulator function returns the current [mean squared error][mean-squared-error].
+
+```javascript
+var accumulator = incrnanmmse( 3 );
+
+var m = accumulator();
+// returns null
+
+// Fill the window...
+m = accumulator( 2.0, 3.0 ); // [(2.0,3.0)]
+// returns 1.0
+
+m = accumulator( -1.0, 4.0 ); // [(2.0,3.0), (-1.0,4.0)]
+// returns 13.0
+
+m = accumulator( 3.0, 9.0 ); // [(2.0,3.0), (-1.0,4.0), (3.0,9.0)]
+// returns ~20.67
+
+// Window begins sliding...
+m = accumulator( -7.0, 3.0 ); // [(-1.0,4.0), (3.0,9.0), (-7.0,3.0)]
+// returns ~53.67
+
+m = accumulator( NaN, 3.0 ); // [(-1.0,4.0), (3.0,9.0), (-7.0,3.0)]
+// returns ~53.67
+
+m = accumulator( -5.0, -3.0 ); // [(3.0,9.0), (-7.0,3.0), (-5.0,-3.0)]
+// returns ~46.67
+
+m = accumulator();
+// returns ~46.67
+```
+
+</section>
+
+<!-- /.usage -->
+
+<section class="notes">
+
+## Notes
+
+-   Input values are **not** type checked. If non-numeric inputs are possible, you are advised to type check and handle accordingly **before** passing the value to the accumulator function.
+-   As `W` (x,y) pairs are needed to fill the window buffer, the first `W-1` returned values are calculated from smaller sample sizes. Until the window is full, each returned value is calculated from all provided values.
+
+</section>
+
+<!-- /.notes -->
+
+<section class="examples">
+
+## Examples
+
+<!-- eslint no-undef: "error" -->
+
+```javascript
+var randu = require( '@stdlib/random/base/randu' );
+var incrnanmmse = require( '@stdlib/stats/incr/nanmmse' );
+
+var accumulator;
+var v1;
+var v2;
+var i;
+
+// Initialize an accumulator:
+accumulator = incrnanmmse( 5 );
+
+// For each simulated datum, update the moving mean squared error...
+for ( i = 0; i < 100; i++ ) {
+    if ( randu() < 0.2 ) {
+        v1 = NaN;
+        v2 = NaN;
+    } else {
+        v1 = ( randu()*100.0 ) - 50.0;
+        v2 = ( randu()*100.0 ) - 50.0;
+    }
+    accumulator( v1, v2 );
+}
+console.log( accumulator() );
+```
+
+</section>
+
+<!-- /.examples -->
+
+<!-- Section for related `stdlib` packages. Do not manually edit this section, as it is automatically populated. -->
+
+<section class="related">
+
+* * *
+
+## See Also
+
+-   <span class="package-name">[`@stdlib/stats/incr/mrmse`][@stdlib/stats/incr/mrmse]</span><span class="delimiter">: </span><span class="description">compute a moving root mean squared error (RMSE) incrementally.</span>
+-   <span class="package-name">[`@stdlib/stats/incr/mrss`][@stdlib/stats/incr/mrss]</span><span class="delimiter">: </span><span class="description">compute a moving residual sum of squares (RSS) incrementally.</span>
+-   <span class="package-name">[`@stdlib/stats/incr/mse`][@stdlib/stats/incr/mse]</span><span class="delimiter">: </span><span class="description">compute the mean squared error (MSE) incrementally.</span>
+
+</section>
+
+<!-- /.related -->
+
+<!-- Section for all links. Make sure to keep an empty line after the `section` element and another before the `/section` close. -->
+
+<section class="links">
+
+[mean-squared-error]: https://en.wikipedia.org/wiki/Mean_squared_error
+
+<!-- <related-links> -->
+
+[@stdlib/stats/incr/mrmse]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/stats/incr/mrmse
+
+[@stdlib/stats/incr/mrss]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/stats/incr/mrss
+
+[@stdlib/stats/incr/mse]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/stats/incr/mse
+
+<!-- </related-links> -->
+
+</section>
+
+<!-- /.links -->
diff --git a/lib/node_modules/@stdlib/stats/incr/nanmmse/benchmark/benchmark.js b/lib/node_modules/@stdlib/stats/incr/nanmmse/benchmark/benchmark.js
new file mode 100644
index 000000000000..5980a019aa20
--- /dev/null
+++ b/lib/node_modules/@stdlib/stats/incr/nanmmse/benchmark/benchmark.js
@@ -0,0 +1,69 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+*    http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+'use strict';
+
+// MODULES //
+
+var bench = require( '@stdlib/bench' );
+var randu = require( '@stdlib/random/base/randu' );
+var pkg = require( './../package.json' ).name;
+var incrnanmmse = require( './../lib' );
+
+
+// MAIN //
+
+bench( pkg, function benchmark( b ) {
+	var f;
+	var i;
+	b.tic();
+	for ( i = 0; i < b.iterations; i++ ) {
+		f = incrnanmmse( (i%5)+1 );
+		if ( typeof f !== 'function' ) {
+			b.fail( 'should return a function' );
+		}
+	}
+	b.toc();
+	if ( typeof f !== 'function' ) {
+		b.fail( 'should return a function' );
+	}
+	b.pass( 'benchmark finished' );
+	b.end();
+});
+
+bench( pkg+'::accumulator', function benchmark( b ) {
+	var acc;
+	var v;
+	var i;
+
+	acc = incrnanmmse( 5 );
+
+	b.tic();
+	for ( i = 0; i < b.iterations; i++ ) {
+		v = acc( randu()-0.5, randu()-0.5 );
+		if ( v !== v ) {
+			b.fail( 'should not return NaN' );
+		}
+	}
+	b.toc();
+	if ( v !== v ) {
+		b.fail( 'should not return NaN' );
+	}
+	b.pass( 'benchmark finished' );
+	b.end();
+});
diff --git a/lib/node_modules/@stdlib/stats/incr/nanmmse/docs/img/equation_mean_squared_error.svg b/lib/node_modules/@stdlib/stats/incr/nanmmse/docs/img/equation_mean_squared_error.svg
new file mode 100644
index 000000000000..e2a699216122
--- /dev/null
+++ b/lib/node_modules/@stdlib/stats/incr/nanmmse/docs/img/equation_mean_squared_error.svg
@@ -0,0 +1,60 @@
+<svg xmlns:xlink="http://www.w3.org/1999/xlink" width="25.358ex" height="7.343ex" style="vertical-align: -3.005ex;" viewBox="0 -1867.7 10918 3161.4" role="img" focusable="false" xmlns="http://www.w3.org/2000/svg" aria-labelledby="MathJax-SVG-1-Title">
+<title id="MathJax-SVG-1-Title">upper M upper S upper E equals StartFraction 1 Over upper W EndFraction sigma-summation Underscript i equals 0 Overscript upper W minus 1 Endscripts left-parenthesis y Subscript i Baseline minus x Subscript i Baseline right-parenthesis squared</title>
+<defs aria-hidden="true">
+<path stroke-width="1" id="E1-MJMAIN-4D" d="M132 622Q125 629 121 631T105 634T62 637H29V683H135Q221 683 232 682T249 675Q250 674 354 398L458 124L562 398Q666 674 668 675Q671 681 683 682T781 683H887V637H854Q814 636 803 634T785 622V61Q791 51 802 49T854 46H887V0H876Q855 3 736 3Q605 3 596 0H585V46H618Q660 47 669 49T688 61V347Q688 424 688 461T688 546T688 613L687 632Q454 14 450 7Q446 1 430 1T410 7Q409 9 292 316L176 624V606Q175 588 175 543T175 463T175 356L176 86Q187 50 261 46H278V0H269Q254 3 154 3Q52 3 37 0H29V46H46Q78 48 98 56T122 69T132 86V622Z"></path>
+<path stroke-width="1" id="E1-MJMAIN-53" d="M55 507Q55 590 112 647T243 704H257Q342 704 405 641L426 672Q431 679 436 687T446 700L449 704Q450 704 453 704T459 705H463Q466 705 472 699V462L466 456H448Q437 456 435 459T430 479Q413 605 329 646Q292 662 254 662Q201 662 168 626T135 542Q135 508 152 480T200 435Q210 431 286 412T370 389Q427 367 463 314T500 191Q500 110 448 45T301 -21Q245 -21 201 -4T140 27L122 41Q118 36 107 21T87 -7T78 -21Q76 -22 68 -22H64Q61 -22 55 -16V101Q55 220 56 222Q58 227 76 227H89Q95 221 95 214Q95 182 105 151T139 90T205 42T305 24Q352 24 386 62T420 155Q420 198 398 233T340 281Q284 295 266 300Q261 301 239 306T206 314T174 325T141 343T112 367T85 402Q55 451 55 507Z"></path>
+<path stroke-width="1" id="E1-MJMAIN-45" d="M128 619Q121 626 117 628T101 631T58 634H25V680H597V676Q599 670 611 560T625 444V440H585V444Q584 447 582 465Q578 500 570 526T553 571T528 601T498 619T457 629T411 633T353 634Q266 634 251 633T233 622Q233 622 233 621Q232 619 232 497V376H286Q359 378 377 385Q413 401 416 469Q416 471 416 473V493H456V213H416V233Q415 268 408 288T383 317T349 328T297 330Q290 330 286 330H232V196V114Q232 57 237 52Q243 47 289 47H340H391Q428 47 452 50T505 62T552 92T584 146Q594 172 599 200T607 247T612 270V273H652V270Q651 267 632 137T610 3V0H25V46H58Q100 47 109 49T128 61V619Z"></path>
+<path stroke-width="1" id="E1-MJMAIN-3D" d="M56 347Q56 360 70 367H707Q722 359 722 347Q722 336 708 328L390 327H72Q56 332 56 347ZM56 153Q56 168 72 173H708Q722 163 722 153Q722 140 707 133H70Q56 140 56 153Z"></path>
+<path stroke-width="1" id="E1-MJMAIN-31" d="M213 578L200 573Q186 568 160 563T102 556H83V602H102Q149 604 189 617T245 641T273 663Q275 666 285 666Q294 666 302 660V361L303 61Q310 54 315 52T339 48T401 46H427V0H416Q395 3 257 3Q121 3 100 0H88V46H114Q136 46 152 46T177 47T193 50T201 52T207 57T213 61V578Z"></path>
+<path stroke-width="1" id="E1-MJMATHI-57" d="M436 683Q450 683 486 682T553 680Q604 680 638 681T677 682Q695 682 695 674Q695 670 692 659Q687 641 683 639T661 637Q636 636 621 632T600 624T597 615Q597 603 613 377T629 138L631 141Q633 144 637 151T649 170T666 200T690 241T720 295T759 362Q863 546 877 572T892 604Q892 619 873 628T831 637Q817 637 817 647Q817 650 819 660Q823 676 825 679T839 682Q842 682 856 682T895 682T949 681Q1015 681 1034 683Q1048 683 1048 672Q1048 666 1045 655T1038 640T1028 637Q1006 637 988 631T958 617T939 600T927 584L923 578L754 282Q586 -14 585 -15Q579 -22 561 -22Q546 -22 542 -17Q539 -14 523 229T506 480L494 462Q472 425 366 239Q222 -13 220 -15T215 -19Q210 -22 197 -22Q178 -22 176 -15Q176 -12 154 304T131 622Q129 631 121 633T82 637H58Q51 644 51 648Q52 671 64 683H76Q118 680 176 680Q301 680 313 683H323Q329 677 329 674T327 656Q322 641 318 637H297Q236 634 232 620Q262 160 266 136L501 550L499 587Q496 629 489 632Q483 636 447 637Q428 637 422 639T416 648Q416 650 418 660Q419 664 420 669T421 676T424 680T428 682T436 683Z"></path>
+<path stroke-width="1" id="E1-MJSZ2-2211" d="M60 948Q63 950 665 950H1267L1325 815Q1384 677 1388 669H1348L1341 683Q1320 724 1285 761Q1235 809 1174 838T1033 881T882 898T699 902H574H543H251L259 891Q722 258 724 252Q725 250 724 246Q721 243 460 -56L196 -356Q196 -357 407 -357Q459 -357 548 -357T676 -358Q812 -358 896 -353T1063 -332T1204 -283T1307 -196Q1328 -170 1348 -124H1388Q1388 -125 1381 -145T1356 -210T1325 -294L1267 -449L666 -450Q64 -450 61 -448Q55 -446 55 -439Q55 -437 57 -433L590 177Q590 178 557 222T452 366T322 544L56 909L55 924Q55 945 60 948Z"></path>
+<path stroke-width="1" id="E1-MJMATHI-69" d="M184 600Q184 624 203 642T247 661Q265 661 277 649T290 619Q290 596 270 577T226 557Q211 557 198 567T184 600ZM21 287Q21 295 30 318T54 369T98 420T158 442Q197 442 223 419T250 357Q250 340 236 301T196 196T154 83Q149 61 149 51Q149 26 166 26Q175 26 185 29T208 43T235 78T260 137Q263 149 265 151T282 153Q302 153 302 143Q302 135 293 112T268 61T223 11T161 -11Q129 -11 102 10T74 74Q74 91 79 106T122 220Q160 321 166 341T173 380Q173 404 156 404H154Q124 404 99 371T61 287Q60 286 59 284T58 281T56 279T53 278T49 278T41 278H27Q21 284 21 287Z"></path>
+<path stroke-width="1" id="E1-MJMAIN-30" d="M96 585Q152 666 249 666Q297 666 345 640T423 548Q460 465 460 320Q460 165 417 83Q397 41 362 16T301 -15T250 -22Q224 -22 198 -16T137 16T82 83Q39 165 39 320Q39 494 96 585ZM321 597Q291 629 250 629Q208 629 178 597Q153 571 145 525T137 333Q137 175 145 125T181 46Q209 16 250 16Q290 16 318 46Q347 76 354 130T362 333Q362 478 354 524T321 597Z"></path>
+<path stroke-width="1" id="E1-MJMAIN-2212" d="M84 237T84 250T98 270H679Q694 262 694 250T679 230H98Q84 237 84 250Z"></path>
+<path stroke-width="1" id="E1-MJMAIN-28" d="M94 250Q94 319 104 381T127 488T164 576T202 643T244 695T277 729T302 750H315H319Q333 750 333 741Q333 738 316 720T275 667T226 581T184 443T167 250T184 58T225 -81T274 -167T316 -220T333 -241Q333 -250 318 -250H315H302L274 -226Q180 -141 137 -14T94 250Z"></path>
+<path stroke-width="1" id="E1-MJMATHI-79" d="M21 287Q21 301 36 335T84 406T158 442Q199 442 224 419T250 355Q248 336 247 334Q247 331 231 288T198 191T182 105Q182 62 196 45T238 27Q261 27 281 38T312 61T339 94Q339 95 344 114T358 173T377 247Q415 397 419 404Q432 431 462 431Q475 431 483 424T494 412T496 403Q496 390 447 193T391 -23Q363 -106 294 -155T156 -205Q111 -205 77 -183T43 -117Q43 -95 50 -80T69 -58T89 -48T106 -45Q150 -45 150 -87Q150 -107 138 -122T115 -142T102 -147L99 -148Q101 -153 118 -160T152 -167H160Q177 -167 186 -165Q219 -156 247 -127T290 -65T313 -9T321 21L315 17Q309 13 296 6T270 -6Q250 -11 231 -11Q185 -11 150 11T104 82Q103 89 103 113Q103 170 138 262T173 379Q173 380 173 381Q173 390 173 393T169 400T158 404H154Q131 404 112 385T82 344T65 302T57 280Q55 278 41 278H27Q21 284 21 287Z"></path>
+<path stroke-width="1" id="E1-MJMATHI-78" d="M52 289Q59 331 106 386T222 442Q257 442 286 424T329 379Q371 442 430 442Q467 442 494 420T522 361Q522 332 508 314T481 292T458 288Q439 288 427 299T415 328Q415 374 465 391Q454 404 425 404Q412 404 406 402Q368 386 350 336Q290 115 290 78Q290 50 306 38T341 26Q378 26 414 59T463 140Q466 150 469 151T485 153H489Q504 153 504 145Q504 144 502 134Q486 77 440 33T333 -11Q263 -11 227 52Q186 -10 133 -10H127Q78 -10 57 16T35 71Q35 103 54 123T99 143Q142 143 142 101Q142 81 130 66T107 46T94 41L91 40Q91 39 97 36T113 29T132 26Q168 26 194 71Q203 87 217 139T245 247T261 313Q266 340 266 352Q266 380 251 392T217 404Q177 404 142 372T93 290Q91 281 88 280T72 278H58Q52 284 52 289Z"></path>
+<path stroke-width="1" id="E1-MJMAIN-29" d="M60 749L64 750Q69 750 74 750H86L114 726Q208 641 251 514T294 250Q294 182 284 119T261 12T224 -76T186 -143T145 -194T113 -227T90 -246Q87 -249 86 -250H74Q66 -250 63 -250T58 -247T55 -238Q56 -237 66 -225Q221 -64 221 250T66 725Q56 737 55 738Q55 746 60 749Z"></path>
+<path stroke-width="1" id="E1-MJMAIN-32" d="M109 429Q82 429 66 447T50 491Q50 562 103 614T235 666Q326 666 387 610T449 465Q449 422 429 383T381 315T301 241Q265 210 201 149L142 93L218 92Q375 92 385 97Q392 99 409 186V189H449V186Q448 183 436 95T421 3V0H50V19V31Q50 38 56 46T86 81Q115 113 136 137Q145 147 170 174T204 211T233 244T261 278T284 308T305 340T320 369T333 401T340 431T343 464Q343 527 309 573T212 619Q179 619 154 602T119 569T109 550Q109 549 114 549Q132 549 151 535T170 489Q170 464 154 447T109 429Z"></path>
+</defs>
+<g stroke="currentColor" fill="currentColor" stroke-width="0" transform="matrix(1 0 0 -1 0 0)" aria-hidden="true">
+ <use xlink:href="#E1-MJMAIN-4D"></use>
+ <use xlink:href="#E1-MJMAIN-53" x="917" y="0"></use>
+ <use xlink:href="#E1-MJMAIN-45" x="1474" y="0"></use>
+ <use xlink:href="#E1-MJMAIN-3D" x="2433" y="0"></use>
+<g transform="translate(3211,0)">
+<g transform="translate(397,0)">
+<rect stroke="none" width="1168" height="60" x="0" y="220"></rect>
+ <use xlink:href="#E1-MJMAIN-31" x="334" y="676"></use>
+ <use xlink:href="#E1-MJMATHI-57" x="60" y="-704"></use>
+</g>
+</g>
+<g transform="translate(5064,0)">
+ <use xlink:href="#E1-MJSZ2-2211" x="100" y="0"></use>
+<g transform="translate(248,-1090)">
+ <use transform="scale(0.707)" xlink:href="#E1-MJMATHI-69" x="0" y="0"></use>
+ <use transform="scale(0.707)" xlink:href="#E1-MJMAIN-3D" x="345" y="0"></use>
+ <use transform="scale(0.707)" xlink:href="#E1-MJMAIN-30" x="1124" y="0"></use>
+</g>
+<g transform="translate(0,1151)">
+ <use transform="scale(0.707)" xlink:href="#E1-MJMATHI-57" x="0" y="0"></use>
+ <use transform="scale(0.707)" xlink:href="#E1-MJMAIN-2212" x="1048" y="0"></use>
+ <use transform="scale(0.707)" xlink:href="#E1-MJMAIN-31" x="1827" y="0"></use>
+</g>
+</g>
+ <use xlink:href="#E1-MJMAIN-28" x="6710" y="0"></use>
+<g transform="translate(7100,0)">
+ <use xlink:href="#E1-MJMATHI-79" x="0" y="0"></use>
+ <use transform="scale(0.707)" xlink:href="#E1-MJMATHI-69" x="693" y="-213"></use>
+</g>
+ <use xlink:href="#E1-MJMAIN-2212" x="8157" y="0"></use>
+<g transform="translate(9157,0)">
+ <use xlink:href="#E1-MJMATHI-78" x="0" y="0"></use>
+ <use transform="scale(0.707)" xlink:href="#E1-MJMATHI-69" x="809" y="-213"></use>
+</g>
+<g transform="translate(10074,0)">
+ <use xlink:href="#E1-MJMAIN-29" x="0" y="0"></use>
+ <use transform="scale(0.707)" xlink:href="#E1-MJMAIN-32" x="550" y="583"></use>
+</g>
+</g>
+</svg>
\ No newline at end of file
diff --git a/lib/node_modules/@stdlib/stats/incr/nanmmse/docs/repl.txt b/lib/node_modules/@stdlib/stats/incr/nanmmse/docs/repl.txt
new file mode 100644
index 000000000000..5012117fc6db
--- /dev/null
+++ b/lib/node_modules/@stdlib/stats/incr/nanmmse/docs/repl.txt
@@ -0,0 +1,49 @@
+
+{{alias}}( W )
+    Returns an accumulator function which incrementally computes a moving mean
+    squared error (MSE), ignoring `NaN` values.
+
+    The `W` parameter defines the number of values over which to compute the
+    moving mean squared error.
+
+    If provided a value, the accumulator function returns an updated moving mean
+    squared error. If not provided a value, the accumulator function returns the
+    current moving mean squared error.
+
+    As `W` values are needed to fill the window buffer, the first `W-1` returned
+    values are calculated from smaller sample sizes. Until the window is full,
+    each returned value is calculated from all provided values.
+
+    Parameters
+    ----------
+    W: integer
+        Window size.
+
+    Returns
+    -------
+    acc: Function
+        Accumulator function.
+
+    Examples
+    --------
+    > var accumulator = {{alias}}( 3 );
+    > var m = accumulator()
+    null
+    > m = accumulator( 2.0, 3.0 )
+    1.0
+    > m = accumulator( -5.0, 2.0 )
+    25.0
+    > m = accumulator( NaN, 2.0 )
+    25.0
+    > m = accumulator( 3.0, 2.0 )
+    17.0
+    > m = accumulator( 3.0, NaN )
+    17.0
+    > m = accumulator( 5.0, -2.0 )
+    33.0
+    > m = accumulator()
+    33.0
+
+    See Also
+    --------
+
diff --git a/lib/node_modules/@stdlib/stats/incr/nanmmse/docs/types/index.d.ts b/lib/node_modules/@stdlib/stats/incr/nanmmse/docs/types/index.d.ts
new file mode 100644
index 000000000000..f5fbe4c0fbfe
--- /dev/null
+++ b/lib/node_modules/@stdlib/stats/incr/nanmmse/docs/types/index.d.ts
@@ -0,0 +1,76 @@
+/*
+* @license Apache-2.0
+*
+* Copyright (c) 2025 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+*    http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+// TypeScript Version: 4.1
+
+/// <reference types="@stdlib/types"/>
+
+/**
+* If provided input values, the accumulator function returns an updated mean squared error. If not provided input values, the accumulator function returns the current mean squared error.
+*
+* @param x - input value
+* @param y - input value
+* @returns mean squared error or null
+*/
+type accumulator = ( x?: number, y?: number ) => number | null;
+
+/**
+* Returns an accumulator function which incrementally computes a moving mean squared error, ignoring `NaN` values.
+*
+* ## Notes
+*
+* -   The `W` parameter defines the number of values over which to compute the moving mean squared error.
+* -   As `W` values are needed to fill the window buffer, the first `W-1` returned values are calculated from smaller sample sizes. Until the window is full, each returned value is calculated from all provided values.
+*
+* @param W - window size
+* @throws must provide a positive integer
+* @returns accumulator function
+*
+* @example
+* var accumulator = incrnanmmse( 3 );
+*
+* var m = accumulator();
+* // returns null
+*
+* m = accumulator( 2.0, 3.0 );
+* // returns 1.0
+*
+* m = accumulator( -5.0, 2.0 );
+* // returns 25.0
+*
+* m = accumulator( NaN, 2.0 );
+* // returns 25.0
+*
+* m = accumulator( 3.0, 2.0 );
+* // returns 17.0
+*
+* m = accumulator( 3.0, NaN );
+* // returns 17.0
+*
+* m = accumulator( 5.0, -2.0 );
+* // returns 33.0
+*
+* m = accumulator();
+* // returns 33.0
+*/
+declare function incrnanmmse( W: number ): accumulator;
+
+
+// EXPORTS //
+
+export = incrnanmmse;
diff --git a/lib/node_modules/@stdlib/stats/incr/nanmmse/docs/types/test.ts b/lib/node_modules/@stdlib/stats/incr/nanmmse/docs/types/test.ts
new file mode 100644
index 000000000000..e1b9ee9d2d1d
--- /dev/null
+++ b/lib/node_modules/@stdlib/stats/incr/nanmmse/docs/types/test.ts
@@ -0,0 +1,74 @@
+/*
+* @license Apache-2.0
+*
+* Copyright (c) 2025 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+*    http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+import incrnanmmse = require( './index' );
+
+
+// TESTS //
+
+// The function returns an accumulator function...
+{
+	incrnanmmse( 3 ); // $ExpectType accumulator
+}
+
+// The compiler throws an error if the function is provided an argument which is not a number...
+{
+	incrnanmmse( '5' ); // $ExpectError
+	incrnanmmse( true ); // $ExpectError
+	incrnanmmse( false ); // $ExpectError
+	incrnanmmse( null ); // $ExpectError
+	incrnanmmse( undefined ); // $ExpectError
+	incrnanmmse( [] ); // $ExpectError
+	incrnanmmse( {} ); // $ExpectError
+	incrnanmmse( ( x: number ): number => x ); // $ExpectError
+}
+
+// The compiler throws an error if the function is provided an invalid number of arguments...
+{
+	incrnanmmse(); // $ExpectError
+	incrnanmmse( 2, 3 ); // $ExpectError
+}
+
+// The function returns an accumulator function which returns an accumulated result...
+{
+	const acc = incrnanmmse( 3 );
+
+	acc(); // $ExpectType number | null
+	acc( 3.14, 2.0 ); // $ExpectType number | null
+}
+
+// The compiler throws an error if the returned accumulator function is provided invalid arguments...
+{
+	const acc = incrnanmmse( 3 );
+
+	acc( '5', 2.0 ); // $ExpectError
+	acc( true, 2.0 ); // $ExpectError
+	acc( false, 2.0 ); // $ExpectError
+	acc( null, 2.0 ); // $ExpectError
+	acc( [], 2.0 ); // $ExpectError
+	acc( {}, 2.0 ); // $ExpectError
+	acc( ( x: number ): number => x, 2.0 ); // $ExpectError
+
+	acc( 3.14, '5' ); // $ExpectError
+	acc( 3.14, true ); // $ExpectError
+	acc( 3.14, false ); // $ExpectError
+	acc( 3.14, null ); // $ExpectError
+	acc( 3.14, [] ); // $ExpectError
+	acc( 3.14, {} ); // $ExpectError
+	acc( 3.14, ( x: number ): number => x ); // $ExpectError
+}
diff --git a/lib/node_modules/@stdlib/stats/incr/nanmmse/examples/index.js b/lib/node_modules/@stdlib/stats/incr/nanmmse/examples/index.js
new file mode 100644
index 000000000000..894ee8f191ae
--- /dev/null
+++ b/lib/node_modules/@stdlib/stats/incr/nanmmse/examples/index.js
@@ -0,0 +1,45 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+*    http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+'use strict';
+
+var randu = require( '@stdlib/random/base/randu' );
+var incrnanmmse = require( './../lib' );
+
+var accumulator;
+var mse;
+var v1;
+var v2;
+var i;
+
+// Initialize an accumulator:
+accumulator = incrnanmmse( 5 );
+
+// For each simulated datum, update the moving mean squared error...
+console.log( '\nValue\tValue\tMSE\n' );
+for ( i = 0; i < 100; i++ ) {
+	if ( randu() < 0.2 ) {
+		v1 = NaN;
+		v2 = NaN;
+	} else {
+		v1 = ( randu()*100.0 ) - 50.0;
+		v2 = ( randu()*100.0 ) - 50.0;
+	}
+	mse = accumulator( v1, v2 );
+	console.log( '%d\t%d\t%d', v1.toFixed( 3 ), v2.toFixed( 3 ), ( mse === null ) ? NaN : mse.toFixed( 3 ) );
+}
diff --git a/lib/node_modules/@stdlib/stats/incr/nanmmse/lib/index.js b/lib/node_modules/@stdlib/stats/incr/nanmmse/lib/index.js
new file mode 100644
index 000000000000..029bb580b5dc
--- /dev/null
+++ b/lib/node_modules/@stdlib/stats/incr/nanmmse/lib/index.js
@@ -0,0 +1,63 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+*    http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+'use strict';
+
+/**
+* Compute a moving mean squared error (MSE) incrementally, ignoring `NaN` values.
+*
+* @module @stdlib/stats/incr/nanmmse
+*
+* @example
+* var incrnanmmse = require( '@stdlib/stats/incr/nanmmse' );
+*
+* var accumulator = incrnanmmse( 3 );
+*
+* var m = accumulator();
+* // returns null
+*
+* m = accumulator( 2.0, 3.0 );
+* // returns 1.0
+*
+* m = accumulator( -5.0, 2.0 );
+* // returns 25.0
+*
+* m = accumulator( NaN, 2.0 );
+* // returns 25.0
+*
+* m = accumulator( 3.0, 2.0 );
+* // returns 17.0
+*
+* m = accumulator( 3.0, NaN );
+* // returns 17.0
+*
+* m = accumulator( 5.0, -2.0 );
+* // returns 33.0
+*
+* m = accumulator();
+* // returns 33.0
+*/
+
+// MODULES //
+
+var main = require( './main.js' );
+
+
+// EXPORTS //
+
+module.exports = main;
diff --git a/lib/node_modules/@stdlib/stats/incr/nanmmse/lib/main.js b/lib/node_modules/@stdlib/stats/incr/nanmmse/lib/main.js
new file mode 100644
index 000000000000..adceff3ec0fa
--- /dev/null
+++ b/lib/node_modules/@stdlib/stats/incr/nanmmse/lib/main.js
@@ -0,0 +1,94 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+*    http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+'use strict';
+
+// MODULES //
+
+var isPositiveInteger = require( '@stdlib/assert/is-positive-integer' ).isPrimitive;
+var incrmmean = require( '@stdlib/stats/incr/mmean' );
+var format = require( '@stdlib/string/format' );
+var isnan = require( '@stdlib/math/base/assert/is-nan' );
+
+
+// MAIN //
+
+/**
+* Returns an accumulator function which incrementally computes a moving mean squared error, ignoring `NaN` values.
+*
+* @param {PositiveInteger} W - window size
+* @throws {TypeError} must provide a positive integer
+* @returns {Function} accumulator function
+*
+* @example
+* var accumulator = incrnanmmse( 3 );
+*
+* var m = accumulator();
+* // returns null
+*
+* m = accumulator( 2.0, 3.0 );
+* // returns 1.0
+*
+* m = accumulator( -5.0, 2.0 );
+* // returns 25.0
+*
+* m = accumulator( NaN, 2.0 );
+* // returns 25.0
+*
+* m = accumulator( 3.0, 2.0 );
+* // returns 17.0
+*
+* m = accumulator( 3.0, NaN );
+* // returns 17.0
+*
+* m = accumulator( 5.0, -2.0 );
+* // returns 33.0
+*
+* m = accumulator();
+* // returns 33.0
+*/
+function incrnanmmse( W ) {
+	var mean;
+	if ( !isPositiveInteger( W ) ) {
+		throw new TypeError( format( 'invalid argument. Must provide a positive integer. Value: `%s`.', W ) );
+	}
+	mean = incrmmean( W );
+	return accumulator;
+
+	/**
+	* If provided input values, the accumulator function returns an updated mean squared error. If not provided input values, the accumulator function returns the current mean squared error.
+	*
+	* @private
+	* @param {number} [x] - input value
+	* @param {number} [y] - input value
+	* @returns {(number|null)} mean squared error or null
+	*/
+	function accumulator( x, y ) {
+		var r;
+		if ( arguments.length === 0 || isnan( x ) || isnan( y ) ) {
+			return mean();
+		}
+		r = y - x;
+		return mean( r*r );
+	}
+}
+
+
+// EXPORTS //
+
+module.exports = incrnanmmse;
diff --git a/lib/node_modules/@stdlib/stats/incr/nanmmse/package.json b/lib/node_modules/@stdlib/stats/incr/nanmmse/package.json
new file mode 100644
index 000000000000..879f1ff35b12
--- /dev/null
+++ b/lib/node_modules/@stdlib/stats/incr/nanmmse/package.json
@@ -0,0 +1,84 @@
+{
+  "name": "@stdlib/stats/incr/nanmmse",
+  "version": "0.0.0",
+  "description": "Compute a moving mean squared error (MSE) incrementally, ignoring `NaN` values.",
+  "license": "Apache-2.0",
+  "author": {
+    "name": "The Stdlib Authors",
+    "url": "https://github.com/stdlib-js/stdlib/graphs/contributors"
+  },
+  "contributors": [
+    {
+      "name": "The Stdlib Authors",
+      "url": "https://github.com/stdlib-js/stdlib/graphs/contributors"
+    }
+  ],
+  "main": "./lib",
+  "directories": {
+    "benchmark": "./benchmark",
+    "doc": "./docs",
+    "example": "./examples",
+    "lib": "./lib",
+    "test": "./test"
+  },
+  "types": "./docs/types",
+  "scripts": {},
+  "homepage": "https://github.com/stdlib-js/stdlib",
+  "repository": {
+    "type": "git",
+    "url": "git://github.com/stdlib-js/stdlib.git"
+  },
+  "bugs": {
+    "url": "https://github.com/stdlib-js/stdlib/issues"
+  },
+  "dependencies": {},
+  "devDependencies": {},
+  "engines": {
+    "node": ">=0.10.0",
+    "npm": ">2.7.0"
+  },
+  "os": [
+    "aix",
+    "darwin",
+    "freebsd",
+    "linux",
+    "macos",
+    "openbsd",
+    "sunos",
+    "win32",
+    "windows"
+  ],
+  "keywords": [
+    "stdlib",
+    "stdmath",
+    "statistics",
+    "stats",
+    "mathematics",
+    "math",
+    "error",
+    "err",
+    "mse",
+    "msd",
+    "nan",
+    "residuals",
+    "squares",
+    "deviation",
+    "difference",
+    "diff",
+    "delta",
+    "incremental",
+    "accumulator",
+    "sliding window",
+    "sliding",
+    "window",
+    "moving",
+    "time series",
+    "timeseries",
+    "forecasting",
+    "forecast",
+    "model",
+    "selection",
+    "evaluation",
+    "prediction"
+  ]
+}
diff --git a/lib/node_modules/@stdlib/stats/incr/nanmmse/test/test.js b/lib/node_modules/@stdlib/stats/incr/nanmmse/test/test.js
new file mode 100644
index 000000000000..ff984bf72223
--- /dev/null
+++ b/lib/node_modules/@stdlib/stats/incr/nanmmse/test/test.js
@@ -0,0 +1,133 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+*    http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+'use strict';
+
+// MODULES //
+
+var tape = require( 'tape' );
+var abs = require( '@stdlib/math/base/special/abs' );
+var EPS = require( '@stdlib/constants/float64/eps' );
+var incrnanmmse = require( './../lib' );
+
+
+// TESTS //
+
+tape( 'main export is a function', function test( t ) {
+	t.ok( true, __filename );
+	t.strictEqual( typeof incrnanmmse, 'function', 'main export is a function' );
+	t.end();
+});
+
+tape( 'the function throws an error if not provided a positive integer', function test( t ) {
+	var values;
+	var i;
+
+	values = [
+		'5',
+		-5.0,
+		0.0,
+		3.14,
+		true,
+		null,
+		void 0,
+		NaN,
+		[],
+		{},
+		function noop() {}
+	];
+
+	for ( i = 0; i < values.length; i++ ) {
+		t.throws( badValue( values[i] ), TypeError, 'throws an error when provided '+values[i] );
+	}
+	t.end();
+
+	function badValue( value ) {
+		return function badValue() {
+			incrnanmmse( value );
+		};
+	}
+});
+
+tape( 'the function returns an accumulator function', function test( t ) {
+	t.equal( typeof incrnanmmse( 3 ), 'function', 'returns a function' );
+	t.end();
+});
+
+tape( 'the accumulator function computes a moving mean squared error incrementally', function test( t ) {
+	var expected;
+	var actual;
+	var delta;
+	var data;
+	var acc;
+	var tol;
+	var N;
+	var i;
+
+	data = [
+		[ 2.0, 3.0 ],
+		[ 3.0, -1.0 ],
+		[ 2.0, 5.0 ],
+		[ NaN, 5.0 ],
+		[ 4.0, -4.0 ],
+		[ 3.0, 0.0 ],
+		[ 3.0, NaN ],
+		[ -4.0, 5.0 ]
+	];
+	N = data.length;
+
+	acc = incrnanmmse( 3 );
+
+	expected = [ 1.0, 17.0/2.0, 26.0/3.0, 26.0/3.0, 89.0/3.0, 82.0/3.0, 82.0/3.0, 154.0/3.0 ];
+	for ( i = 0; i < N; i++ ) {
+		actual = acc( data[i][0], data[i][1] );
+		if ( actual === expected[i] ) {
+			t.equal( actual, expected[i], 'returns expected value' );
+		} else {
+			delta = abs( expected[i] - actual );
+			tol = 1.0 * EPS * abs( expected[i] );
+			t.equal( delta <= tol, true, 'within tolerance. Actual: '+actual+'. Expected: '+expected[i]+'. Delta: '+delta+'. Tol: '+tol+'.' );
+		}
+	}
+	t.end();
+});
+
+tape( 'if not provided an input value, the accumulator function returns the current mean squared error', function test( t ) {
+	var data;
+	var acc;
+	var i;
+
+	data = [
+		[ 2.0, 3.0 ],
+		[ 3.0, -5.0 ],
+		[ 3.0, NaN ],
+		[ 1.0, 10.0 ]
+	];
+	acc = incrnanmmse( 2 );
+	for ( i = 0; i < data.length; i++ ) {
+		acc( data[i][0], data[i][1] );
+	}
+	t.equal( acc(), 145.0/2.0, 'returns expected value' );
+	t.end();
+});
+
+tape( 'if data has yet to be provided, the accumulator function returns `null`', function test( t ) {
+	var acc = incrnanmmse( 3 );
+	t.equal( acc(), null, 'returns null' );
+	t.end();
+});

From 694e89c213ee2b389dde8cdfffb2ef0180ae1ea3 Mon Sep 17 00:00:00 2001
From: sanchay <sanchaynts9422@gmail.com>
Date: Thu, 20 Mar 2025 18:23:57 +0000
Subject: [PATCH 2/3] style: as suggested by the reviewer

---
type: pre_commit_static_analysis_report
description: Results of running static analysis checks when committing changes.
report:
  - task: lint_filenames
    status: passed
  - task: lint_editorconfig
    status: passed
  - task: lint_markdown
    status: na
  - task: lint_package_json
    status: na
  - task: lint_repl_help
    status: na
  - task: lint_javascript_src
    status: passed
  - task: lint_javascript_cli
    status: na
  - task: lint_javascript_examples
    status: na
  - task: lint_javascript_tests
    status: na
  - task: lint_javascript_benchmarks
    status: na
  - task: lint_python
    status: na
  - task: lint_r
    status: na
  - task: lint_c_src
    status: na
  - task: lint_c_examples
    status: na
  - task: lint_c_benchmarks
    status: na
  - task: lint_c_tests_fixtures
    status: na
  - task: lint_shell
    status: na
  - task: lint_typescript_declarations
    status: na
  - task: lint_typescript_tests
    status: na
  - task: lint_license_headers
    status: passed
---
---
 .../@stdlib/stats/incr/nanmmse/lib/main.js           | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/lib/node_modules/@stdlib/stats/incr/nanmmse/lib/main.js b/lib/node_modules/@stdlib/stats/incr/nanmmse/lib/main.js
index adceff3ec0fa..c265f4df7e66 100644
--- a/lib/node_modules/@stdlib/stats/incr/nanmmse/lib/main.js
+++ b/lib/node_modules/@stdlib/stats/incr/nanmmse/lib/main.js
@@ -21,7 +21,7 @@
 // MODULES //
 
 var isPositiveInteger = require( '@stdlib/assert/is-positive-integer' ).isPrimitive;
-var incrmmean = require( '@stdlib/stats/incr/mmean' );
+var incrmmse = require( '@stdlib/stats/incr/mmse' );
 var format = require( '@stdlib/string/format' );
 var isnan = require( '@stdlib/math/base/assert/is-nan' );
 
@@ -63,11 +63,11 @@ var isnan = require( '@stdlib/math/base/assert/is-nan' );
 * // returns 33.0
 */
 function incrnanmmse( W ) {
-	var mean;
+	var mmse;
 	if ( !isPositiveInteger( W ) ) {
 		throw new TypeError( format( 'invalid argument. Must provide a positive integer. Value: `%s`.', W ) );
 	}
-	mean = incrmmean( W );
+	mmse = incrmmse( W );
 	return accumulator;
 
 	/**
@@ -79,12 +79,10 @@ function incrnanmmse( W ) {
 	* @returns {(number|null)} mean squared error or null
 	*/
 	function accumulator( x, y ) {
-		var r;
 		if ( arguments.length === 0 || isnan( x ) || isnan( y ) ) {
-			return mean();
+			return mmse();
 		}
-		r = y - x;
-		return mean( r*r );
+		return mmse( x, y );
 	}
 }
 

From 86ff247698f722cc65bd69f1e21e07693e328d36 Mon Sep 17 00:00:00 2001
From: sanchay <sanchaynts9422@gmail.com>
Date: Thu, 20 Mar 2025 20:12:53 +0000
Subject: [PATCH 3/3] style: as suggested by the reviewer

---
type: pre_commit_static_analysis_report
description: Results of running static analysis checks when committing changes.
report:
  - task: lint_filenames
    status: passed
  - task: lint_editorconfig
    status: passed
  - task: lint_markdown
    status: na
  - task: lint_package_json
    status: na
  - task: lint_repl_help
    status: na
  - task: lint_javascript_src
    status: passed
  - task: lint_javascript_cli
    status: na
  - task: lint_javascript_examples
    status: na
  - task: lint_javascript_tests
    status: na
  - task: lint_javascript_benchmarks
    status: na
  - task: lint_python
    status: na
  - task: lint_r
    status: na
  - task: lint_c_src
    status: na
  - task: lint_c_examples
    status: na
  - task: lint_c_benchmarks
    status: na
  - task: lint_c_tests_fixtures
    status: na
  - task: lint_shell
    status: na
  - task: lint_typescript_declarations
    status: na
  - task: lint_typescript_tests
    status: na
  - task: lint_license_headers
    status: passed
---
---
 lib/node_modules/@stdlib/stats/incr/nanmmse/lib/main.js | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/lib/node_modules/@stdlib/stats/incr/nanmmse/lib/main.js b/lib/node_modules/@stdlib/stats/incr/nanmmse/lib/main.js
index c265f4df7e66..9632ac17bd15 100644
--- a/lib/node_modules/@stdlib/stats/incr/nanmmse/lib/main.js
+++ b/lib/node_modules/@stdlib/stats/incr/nanmmse/lib/main.js
@@ -20,9 +20,7 @@
 
 // MODULES //
 
-var isPositiveInteger = require( '@stdlib/assert/is-positive-integer' ).isPrimitive;
 var incrmmse = require( '@stdlib/stats/incr/mmse' );
-var format = require( '@stdlib/string/format' );
 var isnan = require( '@stdlib/math/base/assert/is-nan' );
 
 
@@ -64,9 +62,6 @@ var isnan = require( '@stdlib/math/base/assert/is-nan' );
 */
 function incrnanmmse( W ) {
 	var mmse;
-	if ( !isPositiveInteger( W ) ) {
-		throw new TypeError( format( 'invalid argument. Must provide a positive integer. Value: `%s`.', W ) );
-	}
 	mmse = incrmmse( W );
 	return accumulator;