Add PLS model-inversion null-space score-plot figure#59
Merged
Conversation
New figure for the pid-book PLS model-inversion page: a two-component score plot of the cheddar-cheese model (trained on cheeses 5 to 30), inverted toward a taste of 20.9. Shows the calibration cheeses, the direct-inversion solution, the null space, and the O-PLS orthogonal space projected into the PLS score space; the null space and the projected orthogonal space coincide. Committed alongside its matplotlib generator, which imports process_improve. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DsTypY4FcRbrXRxorb9raz
…cond target Recolours the main null-space line to orange, enlarges the O-PLS orthogonal-space circles and thickens their edge, and adds a red dashed null-space line for a second inversion (held-out cheese 4, taste 47.9). The two null-space lines are parallel, since a single-response model has one null-space direction and only the offset changes with the target. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DsTypY4FcRbrXRxorb9raz
… line Adds a purple dotted null-space line for the lowest held-out taste (cheese 1, 12.3), in a cool colour contrasting the warm orange and red. All three lines are exactly parallel (shared direction g = [0.433, 0.902]); only the offset shifts with the target, confirming that a single-response model has one fixed null-space direction. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DsTypY4FcRbrXRxorb9raz
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DsTypY4FcRbrXRxorb9raz
The lines legend lists the null spaces from lowest to highest taste (12.3, 20.9, 47.9); the markers legend holds the calibration cheeses, the O-PLS orthogonal space, and the direct-inversion solution. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DsTypY4FcRbrXRxorb9raz
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.
What changed
A new figure for the pid-book PLS model-inversion page, with its matplotlib
generator committed alongside (the repo convention):
pls/pls-model-inversion-null-space.pngpls/pls-model-inversion-null-space.pyThe figure is a two-component score plot of the cheddar-cheese model (trained on
cheeses 5 to 30), inverted toward a taste of 20.9. It shows the calibration
cheeses, the direct-inversion solution, the null space (the line of scores that
all predict the target taste), and the O-PLS orthogonal space projected into the
PLS score space. The null space and the projected orthogonal space coincide,
which is the point of the accompanying page and of García-Carrión et al. (2025).
The generator imports
process_improve(PLS,OPLS) and follows the style ofthe other modern scripts here (e.g.
monitoring/adaptive-softsensor-figures.py):mpl.use("Agg"), anoutput_dirargument defaulting to the script's directory,and named colour constants.
Related
PLS.invert/OPLSAPIs thegenerator uses).
🤖 Generated with Claude Code
https://claude.ai/code/session_01DsTypY4FcRbrXRxorb9raz
Generated by Claude Code