instancespace.plotting
Thin matplotlib wrappers around a trained Model.
Mirrors MATLAB's InstanceSpace.plot('sources' | 'portfolio' | 'good' | 'footprint',
algoIdx). Two-dimensional calls draw onto the current matplotlib axes by default,
so repeated calls compose in a notebook cell. Three-dimensional calls create native
3D axes when none are supplied. Pass an explicit dimension-compatible ax to draw
somewhere else instead.
These take a Model (or, for testing, anything duck-typing the same shape) rather
than an InstanceSpace.
Scatter training instances in the instance space, coloured by source.
Requires model.data.s (the metadata's optional source column); raises if
it wasn't provided at build time, matching MATLAB's equivalent requirement.
Scatter instances coloured by their best-performing algorithm (data.p).
Scatter instances coloured by PYTHIA's good/bad prediction for one algorithm.
Draw one algorithm's native 2D polygon or 3D tetrahedral footprint.
kind is "good" (region where good performance is statistically inferred)
or "best" (region where this algorithm is expected to dominate), matching
model.trace.good/model.trace.best.