Discovery ran stlsq_standardized (thresholds in RMS-normalized feature space) but then re-filtered the restored *original-unit* coefficients by config.sparse.threshold. That defeated the standardization: genuine terms whose coefficient is small purely because their state carries a large magnitude (e.g. SIR's beta/N ~ 3e-4 with populations ~1e3) were pruned, collapsing the law unless the user hand-tuned the threshold to the data scale. Keep every non-zero term the standardized solver returns. Fixing that unmasked a second bug: when a threshold prunes every remaining active term in one step, STLSQ's loop broke on empty support and returned the pre-prune *dense* fit, so an aggressive threshold silently produced a denser model. Zero the coefficients when the support drains, matching the reference STLSQ contract. - Add regression tests: keeps_scale_small_coefficients_after_standardized_fit and threshold_above_every_coefficient_yields_the_empty_model. - SIR now recovers the S*I interaction at raw population scale (thr 0.02); Lorenz/Lotka-Volterra/damped-pendulum recovery unchanged. - Add a reproducible discovery gallery (examples/discovery-gallery) and a site showcase page (docs/showcase) with deterministic observed-vs-recovered SVG plots served from the docs site. - .gitignore: local datasets, scratch worlds, and regenerable run/work dirs. Workspace: 1653 tests pass; docs-site render stays byte-identical.
15 lines
14 KiB
XML
15 lines
14 KiB
XML
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 760 380" role="img" aria-label="Lotka–Volterra predator–prey (2-state): observed vs. simulated from the recovered law" font-family="ui-sans-serif,system-ui,sans-serif">
|
||
<rect width="760" height="380" fill="#0b1020"/>
|
||
<rect x="54" y="20" width="556" height="320" fill="#0f1630" stroke="#26304f"/>
|
||
<text x="54" y="368" fill="#8a94b0" font-size="12">time →</text>
|
||
<polyline fill="none" stroke="#6ea8fe" stroke-opacity="0.28" stroke-width="6" points="54.00,109.29 56.32,120.33 58.63,131.50 60.95,142.69 63.27,153.82 65.58,164.79 67.90,175.52 70.22,185.95 72.53,196.03 74.85,205.71 77.17,214.95 79.48,223.74 81.80,232.06 84.12,239.91 86.43,247.29 88.75,254.21 91.07,260.67 93.38,266.69 95.70,272.29 98.02,277.50 100.33,282.33 102.65,286.80 104.97,290.94 107.28,294.77 109.60,298.30 111.92,301.57 114.23,304.58 116.55,307.36 118.87,309.93 121.18,312.30 123.50,314.49 125.82,316.51 128.13,318.38 130.45,320.11 132.77,321.70 135.08,323.17 137.40,324.53 139.72,325.79 142.03,326.96 144.35,328.03 146.67,329.03 148.98,329.96 151.30,330.81 153.62,331.61 155.93,332.34 158.25,333.03 160.57,333.66 162.88,334.24 165.20,334.79 167.52,335.29 169.83,335.76 172.15,336.19 174.47,336.59 176.78,336.95 179.10,337.29 181.42,337.61 183.73,337.90 186.05,338.16 188.37,338.40 190.68,338.62 193.00,338.83 195.32,339.01 197.63,339.17 199.95,339.32 202.27,339.45 204.58,339.57 206.90,339.67 209.22,339.76 211.53,339.83 213.85,339.89 216.17,339.93 218.48,339.97 220.80,339.99 223.12,340.00 225.43,339.99 227.75,339.98 230.07,339.95 232.38,339.91 234.70,339.86 237.02,339.80 239.33,339.73 241.65,339.65 243.97,339.55 246.28,339.45 248.60,339.33 250.92,339.20 253.23,339.06 255.55,338.91 257.87,338.75 260.18,338.57 262.50,338.39 264.82,338.18 267.13,337.97 269.45,337.75 271.77,337.51 274.08,337.25 276.40,336.98 278.72,336.70 281.03,336.41 283.35,336.09 285.67,335.76 287.98,335.42 290.30,335.06 292.62,334.68 294.93,334.28 297.25,333.87 299.57,333.43 301.88,332.98 304.20,332.50 306.52,332.00 308.83,331.48 311.15,330.94 313.47,330.37 315.78,329.78 318.10,329.16 320.42,328.51 322.73,327.84 325.05,327.14 327.37,326.40 329.68,325.64 332.00,324.84 334.32,324.01 336.63,323.14 338.95,322.24 341.27,321.30 343.58,320.31 345.90,319.29 348.22,318.22 350.53,317.11 352.85,315.95 355.17,314.74 357.48,313.48 359.80,312.17 362.12,310.81 364.43,309.38 366.75,307.90 369.07,306.36 371.38,304.75 373.70,303.08 376.02,301.33 378.33,299.52 380.65,297.63 382.97,295.66 385.28,293.61 387.60,291.48 389.92,289.26 392.23,286.96 394.55,284.56 396.87,282.06 399.18,279.47 401.50,276.77 403.82,273.96 406.13,271.05 408.45,268.02 410.77,264.88 413.08,261.61 415.40,258.22 417.72,254.71 420.03,251.06 422.35,247.27 424.67,243.35 426.98,239.29 429.30,235.08 431.62,230.73 433.93,226.23 436.25,221.57 438.57,216.76 440.88,211.79 443.20,206.67 445.52,201.39 447.83,195.95 450.15,190.35 452.47,184.60 454.78,178.70 457.10,172.64 459.42,166.44 461.73,160.10 464.05,153.63 466.37,147.04 468.68,140.34 471.00,133.53 473.32,126.64 475.63,119.68 477.95,112.68 480.27,105.65 482.58,98.62 484.90,91.63 487.22,84.69 489.53,77.85 491.85,71.15 494.17,64.62 496.48,58.32 498.80,52.30 501.12,46.61 503.43,41.30 505.75,36.44 508.07,32.08 510.38,28.30 512.70,25.14 515.02,22.68 517.33,20.97 519.65,20.07 521.97,20.03 524.28,20.89 526.60,22.69 528.92,25.45 531.23,29.18 533.55,33.87 535.87,39.51 538.18,46.06 540.50,53.48 542.82,61.70 545.13,70.64 547.45,80.22 549.77,90.33 552.08,100.87 554.40,111.73 556.72,122.81 559.03,133.99 561.35,145.18 563.67,156.27 565.98,167.20 568.30,177.87 570.62,188.22 572.93,198.22 575.25,207.80 577.57,216.95 579.88,225.63 582.20,233.85 584.52,241.60 586.83,248.87 589.15,255.68 591.47,262.04 593.78,267.97 596.10,273.49 598.42,278.61 600.73,283.35 603.05,287.75 605.37,291.82 607.68,295.58 610.00,299.05"/>
|
||
<polyline fill="none" stroke="#6ea8fe" stroke-width="1.8" points="54.00,109.29 56.32,120.32 58.63,131.48 60.95,142.67 63.27,153.79 65.58,164.75 67.90,175.48 70.22,185.90 72.53,195.97 74.85,205.65 77.17,214.89 79.48,223.68 81.80,232.00 84.12,239.85 86.43,247.23 88.75,254.14 91.07,260.60 93.38,266.63 95.70,272.23 98.02,277.44 100.33,282.27 102.65,286.74 104.97,290.88 107.28,294.71 109.60,298.25 111.92,301.52 114.23,304.53 116.55,307.32 118.87,309.89 121.18,312.26 123.50,314.46 125.82,316.48 128.13,318.35 130.45,320.07 132.77,321.67 135.08,323.14 137.40,324.50 139.72,325.76 142.03,326.93 144.35,328.01 146.67,329.01 148.98,329.94 151.30,330.79 153.62,331.59 155.93,332.33 158.25,333.01 160.57,333.64 162.88,334.23 165.20,334.77 167.52,335.28 169.83,335.74 172.15,336.18 174.47,336.57 176.78,336.94 179.10,337.28 181.42,337.60 183.73,337.89 186.05,338.15 188.37,338.40 190.68,338.62 193.00,338.82 195.32,339.01 197.63,339.17 199.95,339.32 202.27,339.45 204.58,339.57 206.90,339.67 209.22,339.76 211.53,339.83 213.85,339.89 216.17,339.94 218.48,339.97 220.80,339.99 223.12,340.00 225.43,340.00 227.75,339.98 230.07,339.96 232.38,339.92 234.70,339.87 237.02,339.81 239.33,339.74 241.65,339.66 243.97,339.56 246.28,339.46 248.60,339.34 250.92,339.22 253.23,339.08 255.55,338.93 257.87,338.76 260.18,338.59 262.50,338.40 264.82,338.20 267.13,337.99 269.45,337.76 271.77,337.53 274.08,337.27 276.40,337.01 278.72,336.73 281.03,336.43 283.35,336.12 285.67,335.79 287.98,335.45 290.30,335.09 292.62,334.71 294.93,334.32 297.25,333.90 299.57,333.47 301.88,333.01 304.20,332.54 306.52,332.05 308.83,331.53 311.15,330.99 313.47,330.42 315.78,329.83 318.10,329.22 320.42,328.57 322.73,327.90 325.05,327.20 327.37,326.47 329.68,325.71 332.00,324.92 334.32,324.09 336.63,323.23 338.95,322.33 341.27,321.39 343.58,320.41 345.90,319.39 348.22,318.33 350.53,317.22 352.85,316.07 355.17,314.86 357.48,313.61 359.80,312.31 362.12,310.95 364.43,309.53 366.75,308.06 369.07,306.52 371.38,304.92 373.70,303.25 376.02,301.52 378.33,299.71 380.65,297.83 382.97,295.87 385.28,293.83 387.60,291.71 389.92,289.51 392.23,287.21 394.55,284.82 396.87,282.34 399.18,279.76 401.50,277.07 403.82,274.28 406.13,271.38 408.45,268.37 410.77,265.24 413.08,261.99 415.40,258.62 417.72,255.12 420.03,251.49 422.35,247.72 424.67,243.82 426.98,239.78 429.30,235.59 431.62,231.26 433.93,226.77 436.25,222.14 438.57,217.35 440.88,212.41 443.20,207.31 445.52,202.05 447.83,196.63 450.15,191.06 452.47,185.33 454.78,179.45 457.10,173.42 459.42,167.24 461.73,160.92 464.05,154.47 466.37,147.90 468.68,141.21 471.00,134.43 473.32,127.55 475.63,120.61 477.95,113.62 480.27,106.59 482.58,99.57 484.90,92.57 487.22,85.63 489.53,78.78 491.85,72.06 494.17,65.51 496.48,59.18 498.80,53.13 501.12,47.39 503.43,42.03 505.75,37.10 508.07,32.68 510.38,28.81 512.70,25.56 515.02,23.00 517.33,21.18 519.65,20.17 521.97,20.00 524.28,20.73 526.60,22.39 528.92,25.00 531.23,28.59 533.55,33.14 535.87,38.63 538.18,45.05 540.50,52.34 542.82,60.44 545.13,69.27 547.45,78.75 549.77,88.78 552.08,99.25 554.40,110.07 556.72,121.11 559.03,132.28 561.35,143.46 563.67,154.57 565.98,165.52 568.30,176.23 570.62,186.63 572.93,196.67 575.25,206.32 577.57,215.53 579.88,224.28 582.20,232.57 584.52,240.39 586.83,247.73 589.15,254.61 591.47,261.04 593.78,267.04 596.10,272.61 598.42,277.79 600.73,282.60 603.05,287.05 605.37,291.16 607.68,294.97 610.00,298.49"/>
|
||
<rect x="626" y="17" width="16" height="4" fill="#6ea8fe"/>
|
||
<text x="648" y="22" fill="#c9d2ea" font-size="12">prey</text>
|
||
<polyline fill="none" stroke="#f7a072" stroke-opacity="0.28" stroke-width="6" points="54.00,230.83 56.32,227.27 58.63,223.90 60.95,220.74 63.27,217.81 65.58,215.14 67.90,212.72 70.22,210.56 72.53,208.68 74.85,207.07 77.17,205.72 79.48,204.64 81.80,203.81 84.12,203.23 86.43,202.88 88.75,202.74 91.07,202.81 93.38,203.08 95.70,203.52 98.02,204.12 100.33,204.88 102.65,205.77 104.97,206.79 107.28,207.91 109.60,209.14 111.92,210.45 114.23,211.84 116.55,213.31 118.87,214.83 121.18,216.41 123.50,218.03 125.82,219.68 128.13,221.37 130.45,223.09 132.77,224.83 135.08,226.58 137.40,228.35 139.72,230.12 142.03,231.90 144.35,233.68 146.67,235.46 148.98,237.23 151.30,239.00 153.62,240.76 155.93,242.51 158.25,244.25 160.57,245.98 162.88,247.69 165.20,249.38 167.52,251.06 169.83,252.72 172.15,254.37 174.47,255.99 176.78,257.60 179.10,259.18 181.42,260.74 183.73,262.29 186.05,263.81 188.37,265.31 190.68,266.79 193.00,268.25 195.32,269.69 197.63,271.10 199.95,272.50 202.27,273.87 204.58,275.22 206.90,276.55 209.22,277.86 211.53,279.14 213.85,280.41 216.17,281.65 218.48,282.88 220.80,284.08 223.12,285.26 225.43,286.42 227.75,287.56 230.07,288.68 232.38,289.78 234.70,290.87 237.02,291.93 239.33,292.97 241.65,294.00 243.97,295.00 246.28,295.99 248.60,296.96 250.92,297.91 253.23,298.84 255.55,299.75 257.87,300.65 260.18,301.53 262.50,302.40 264.82,303.24 267.13,304.08 269.45,304.89 271.77,305.69 274.08,306.47 276.40,307.24 278.72,307.99 281.03,308.73 283.35,309.45 285.67,310.16 287.98,310.85 290.30,311.53 292.62,312.19 294.93,312.84 297.25,313.48 299.57,314.10 301.88,314.71 304.20,315.31 306.52,315.89 308.83,316.46 311.15,317.02 313.47,317.56 315.78,318.10 318.10,318.62 320.42,319.12 322.73,319.62 325.05,320.10 327.37,320.58 329.68,321.04 332.00,321.48 334.32,321.92 336.63,322.35 338.95,322.76 341.27,323.16 343.58,323.56 345.90,323.94 348.22,324.31 350.53,324.66 352.85,325.01 355.17,325.35 357.48,325.67 359.80,325.99 362.12,326.29 364.43,326.59 366.75,326.87 369.07,327.14 371.38,327.40 373.70,327.65 376.02,327.89 378.33,328.11 380.65,328.33 382.97,328.53 385.28,328.73 387.60,328.91 389.92,329.08 392.23,329.23 394.55,329.38 396.87,329.51 399.18,329.63 401.50,329.74 403.82,329.83 406.13,329.91 408.45,329.98 410.77,330.03 413.08,330.07 415.40,330.09 417.72,330.10 420.03,330.09 422.35,330.06 424.67,330.02 426.98,329.95 429.30,329.87 431.62,329.77 433.93,329.64 436.25,329.50 438.57,329.33 440.88,329.13 443.20,328.91 445.52,328.66 447.83,328.39 450.15,328.08 452.47,327.74 454.78,327.36 457.10,326.95 459.42,326.50 461.73,326.01 464.05,325.47 466.37,324.88 468.68,324.25 471.00,323.56 473.32,322.81 475.63,321.99 477.95,321.11 480.27,320.16 482.58,319.13 484.90,318.02 487.22,316.82 489.53,315.52 491.85,314.13 494.17,312.63 496.48,311.01 498.80,309.28 501.12,307.42 503.43,305.42 505.75,303.29 508.07,301.00 510.38,298.57 512.70,295.98 515.02,293.24 517.33,290.33 519.65,287.26 521.97,284.03 524.28,280.65 526.60,277.13 528.92,273.46 531.23,269.68 533.55,265.78 535.87,261.80 538.18,257.76 540.50,253.68 542.82,249.58 545.13,245.51 547.45,241.48 549.77,237.54 552.08,233.71 554.40,230.02 556.72,226.50 559.03,223.17 561.35,220.07 563.67,217.20 565.98,214.57 568.30,212.21 570.62,210.12 572.93,208.30 575.25,206.75 577.57,205.46 579.88,204.44 582.20,203.66 584.52,203.13 586.83,202.83 589.15,202.74 591.47,202.86 593.78,203.16 596.10,203.64 598.42,204.28 600.73,205.07 603.05,205.99 605.37,207.03 607.68,208.18 610.00,209.42"/>
|
||
<polyline fill="none" stroke="#f7a072" stroke-width="1.8" points="54.00,230.83 56.32,227.27 58.63,223.90 60.95,220.74 63.27,217.82 65.58,215.14 67.90,212.72 70.22,210.57 72.53,208.68 74.85,207.07 77.17,205.73 79.48,204.64 81.80,203.81 84.12,203.23 86.43,202.87 88.75,202.74 91.07,202.80 93.38,203.07 95.70,203.51 98.02,204.11 100.33,204.86 102.65,205.75 104.97,206.76 107.28,207.88 109.60,209.11 111.92,210.42 114.23,211.81 116.55,213.27 118.87,214.79 121.18,216.37 123.50,217.98 125.82,219.64 128.13,221.33 130.45,223.04 132.77,224.78 135.08,226.53 137.40,228.30 139.72,230.07 142.03,231.85 144.35,233.63 146.67,235.40 148.98,237.18 151.30,238.94 153.62,240.70 155.93,242.45 158.25,244.19 160.57,245.92 162.88,247.63 165.20,249.32 167.52,251.00 169.83,252.66 172.15,254.30 174.47,255.93 176.78,257.53 179.10,259.12 181.42,260.68 183.73,262.23 186.05,263.75 188.37,265.25 190.68,266.73 193.00,268.19 195.32,269.63 197.63,271.04 199.95,272.44 202.27,273.81 204.58,275.16 206.90,276.49 209.22,277.80 211.53,279.08 213.85,280.35 216.17,281.59 218.48,282.82 220.80,284.02 223.12,285.20 225.43,286.36 227.75,287.50 230.07,288.62 232.38,289.72 234.70,290.81 237.02,291.87 239.33,292.91 241.65,293.94 243.97,294.94 246.28,295.93 248.60,296.90 250.92,297.85 253.23,298.78 255.55,299.70 257.87,300.60 260.18,301.48 262.50,302.34 264.82,303.19 267.13,304.02 269.45,304.84 271.77,305.64 274.08,306.42 276.40,307.19 278.72,307.94 281.03,308.68 283.35,309.40 285.67,310.11 287.98,310.80 290.30,311.48 292.62,312.15 294.93,312.80 297.25,313.43 299.57,314.06 301.88,314.67 304.20,315.26 306.52,315.85 308.83,316.42 311.15,316.98 313.47,317.52 315.78,318.06 318.10,318.58 320.42,319.08 322.73,319.58 325.05,320.07 327.37,320.54 329.68,321.00 332.00,321.45 334.32,321.89 336.63,322.31 338.95,322.73 341.27,323.13 343.58,323.52 345.90,323.90 348.22,324.27 350.53,324.63 352.85,324.98 355.17,325.32 357.48,325.65 359.80,325.96 362.12,326.27 364.43,326.56 366.75,326.84 369.07,327.12 371.38,327.38 373.70,327.63 376.02,327.87 378.33,328.09 380.65,328.31 382.97,328.52 385.28,328.71 387.60,328.89 389.92,329.06 392.23,329.22 394.55,329.37 396.87,329.50 399.18,329.62 401.50,329.73 403.82,329.83 406.13,329.91 408.45,329.98 410.77,330.03 413.08,330.07 415.40,330.09 417.72,330.10 420.03,330.09 422.35,330.07 424.67,330.02 426.98,329.96 429.30,329.88 431.62,329.78 433.93,329.66 436.25,329.52 438.57,329.35 440.88,329.16 443.20,328.94 445.52,328.70 447.83,328.43 450.15,328.12 452.47,327.79 454.78,327.42 457.10,327.01 459.42,326.56 461.73,326.08 464.05,325.54 466.37,324.96 468.68,324.33 471.00,323.65 473.32,322.91 475.63,322.10 477.95,321.23 480.27,320.29 482.58,319.27 484.90,318.17 487.22,316.99 489.53,315.71 491.85,314.33 494.17,312.84 496.48,311.24 498.80,309.53 501.12,307.68 503.43,305.71 505.75,303.59 508.07,301.33 510.38,298.92 512.70,296.36 515.02,293.64 517.33,290.75 519.65,287.71 521.97,284.51 524.28,281.15 526.60,277.65 528.92,274.01 531.23,270.24 533.55,266.36 535.87,262.39 538.18,258.36 540.50,254.28 542.82,250.19 545.13,246.11 547.45,242.08 549.77,238.13 552.08,234.28 554.40,230.57 556.72,227.02 559.03,223.67 561.35,220.53 563.67,217.62 565.98,214.96 568.30,212.56 570.62,210.43 572.93,208.56 575.25,206.97 577.57,205.64 579.88,204.58 582.20,203.76 584.52,203.19 586.83,202.85 589.15,202.73 591.47,202.82 593.78,203.09 596.10,203.54 598.42,204.16 600.73,204.92 603.05,205.82 605.37,206.84 607.68,207.97 610.00,209.20"/>
|
||
<rect x="626" y="39" width="16" height="4" fill="#f7a072"/>
|
||
<text x="648" y="44" fill="#c9d2ea" font-size="12">predator</text>
|
||
<text x="626" y="78" fill="#8a94b0" font-size="11">thick = observed</text>
|
||
<text x="626" y="94" fill="#8a94b0" font-size="11">thin = recovered law</text>
|
||
</svg> |