Repository navigation
feat(extensions): N-D projection overload to KnownFunctionLandscape (#1203) - #41
Merged
Merged
Conversation
Port the verbatim MAX-of-uniform-samples projection pattern from the Gtk# LandscapeExplorerSampleController.GetFunctionValue (lines 640-674 @ d05826fd) to a public, deterministic, fully-typed bridge in KnownFunctionLandscape. The verbatim upstream had a bug: coordsRange = min - min = 0, pinning the hidden coordinates to the lower bound and producing a flat, degenerate heatmap. The fix (coordsRange = max - min) is pinned by the G.9 non-vacuous test RenderHeatmap_NdProjection_HiddenCoordsAffectHeatmap (5D != 2D). Two new public overloads: - RenderHeatmap(IFitness, int dimension, int nbSamples, Random?, int, int) - RenderHeatmap(IFitness, xRange, yRange, int dimension, int nbSamples, Random?, int, int) 12 NUnit tests pin the surface, the fix, the bounds, the guards (null, dim<2, nbSamples<1), and the convergence behaviour (sub-martingale maxRed). Plus 6 notebook smoke tests that exercise each cell of MGS-7b-LandscapeMultidim. 180/180 tests pass.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Scope
Add N-D projection overload to
KnownFunctionLandscape, porting the verbatim MAX-of-uniform-samples projection pattern from the Gtk#LandscapeExplorerSampleController.GetFunctionValue(lines 640-674 @ d05826fd) to a public, deterministic, fully-typed bridge.The verbatim upstream had a bug:
coordsRange = min - min = 0, pinning the hidden coordinates to the lower bound and producing a flat, degenerate heatmap. The fix (coordsRange = max - min) is pinned by the G.9 non-vacuous testRenderHeatmap_NdProjection_HiddenCoordsAffectHeatmap.Diff
RenderHeatmapNDMaxProjectionAdapterVerifications
dotnet build -c Release: 0 erreurdotnet test: 180/180 PASS en 4s (174 existants + 6 smoke)Consumer PR : jsboige/CoursIA#7583