github shergin/malevich v1.18.0
1.18.0 (The Knife Grinder)

4 hours ago

The machine-learning release. Band scales on both axes, a logarithmic
colormap, two new cells channels, and bucket-exact matrix reduction turn the
charts ML actually reads — confusion matrices, attention maps, decision
boundaries, images, loss landscapes — into grammar compositions; roc,
auc, and ewma fill out the statistical set, and a nine-chart gallery
wave plus a showcase ML corner prove the vocabulary was sufficient.
Everything is additive, and a long-standing sub-decade log-axis bug died on
the way through.

  • The showcase tour grows an ML corner: a confusion matrix on band axes, a
    log-colormap attention head with a colorbar, a learned filter as rgb cells,
    1-NN decision regions with the training scatter, a momentum trajectory over
    a bucket-reduced loss landscape, seed-variance bands with EWMA smoothing,
    and a spectrogram — every panel upgrading to real pixels beside its cells
    under --features pixel, like the rest of the tour.
  • The loss example's training log now credits topos by its current name —
    the library was renamed from poorgrad — and the data file moved to
    examples/data/topos_loss.csv accordingly.
  • Fixed: a log axis over a range narrower than one decade no longer loses its
    data. The linear-fallback ticks of a sub-decade log range can include zero;
    the domain grew to that tick, zero has no logarithmic position, and the
    whole scale collapsed. Log domains now refuse to grow to a non-positive
    bound, and a tick without a position on its scale is dropped instead of
    drawn at a fabricated column.
  • stat::ewma: debiased exponentially weighted smoothing — TensorBoard's
    scalar smoothing, early outputs unbiased instead of dragged toward zero,
    gaps passing through without disturbing the state. A scan over the ordered
    series, documented as a batch transform rather than pretending a merge law.
    Gallery gains seeds: five runs pooled into per-step quantile bands via
    the existing reducers, with the smoothed median on top.
  • stat::roc and stat::auc: the classifier threshold sweep (standard step
    construction, ties grouped, one-class data returns empty rather than
    invented rates) and the trapezoid area under a polyline, gaps contributing
    no area. Batch transforms in the ecdf family — order statistics, not
    mergeable accumulators — with hand-computed fixtures. Gallery gains roc.
  • Gallery: spectrogram — time × frequency power as dense Cells with a log
    frequency axis and a log colormap; the exponential chirp is a straight
    ridge. The energy is synthesized analytically: no FFT enters the crate.
  • Gallery: ridgeline — distributions over training epochs as lifted KDE
    rows, painter's algorithm back to front, no camera and no new machinery:
    the TensorBoard histogram view and the honest terminal answer to a 3D
    surface.
  • Gallery: calibration — a reliability diagram from stat::binned with a
    Mean reducer over 0/1 outcomes; the overconfident model's curve sags
    under the diagonal. No new API: the reducer vocabulary was sufficient.
  • Gallery: landscape — a loss landscape with a momentum trajectory,
    composed entirely from existing marks (dense Cells on a log ramp, Line and
    glyph Points on top): the gradient-descent chart, no new machinery.
  • Cells grids denser than the raster now reduce honestly instead of sampling:
    every screen bucket owns the cells whose centers fall inside it (adjacent
    buckets partition the centers, proven by a property test) and shows a
    reduction over all of them — Reducer::Mean by default, Cells::reduce
    to choose; Max keeps sparse spikes visible that sampling silently
    dropped. Rgb grids box-filter per channel and class grids reduce to the
    modal class with deterministic ties. 4.19 million cells reduce in ~44 ms
    on the recorded baseline (BENCHMARKS.md). Buckets owning no cell center
    keep the old center-sampling, so ordinary small grids render as before.
    Gallery gains attention-full: one million attention weights rendered
    twice, the mean pane dissolving the long-range spikes the max pane keeps.
  • Cells::classes draws categorical regions: a grid of class labels colored
    through the plot's categorical Palette with a categorical legend — the
    decision-boundary chart. Labels intern in first-appearance order exactly
    like color_by; in plain output each class keeps a stable shade-ramp glyph
    and the legend swatches carry the same glyphs, so regions stay separable
    with no color at all. Gallery gains boundary, 5-NN decision regions with
    the training scatter on top.
  • Cells::rgb draws a grid of direct colors — an image. Raw row-major pixel
    buffers only (decoding files stays the host's job), no colormap and no
    colorbar, honest quantization down the color ladder, and in plain output
    each pixel falls back to its luma on the shade ramp so images survive a
    pipe. With the pixel feature the grid blits at device resolution. The
    serde encoding is additive; value grids encode exactly as before. Gallery
    gains filters, an AlexNet-style Gabor bank rendered as Cells::rgb
    small multiples.
  • Colormap::log() makes any ramp logarithmic: equal color steps for equal
    factors, so attention weights, gradient magnitudes, and spectral power that
    span decades stay distinguishable instead of collapsing into the low end of
    a linear ramp. Values at or below zero have no logarithmic position and
    render as gaps — the same rule log axes follow — and the colorbar places
    decade ticks logarithmically. Logarithmic and centered_at are mutually
    exclusive (validation catches the combination, including deserialized
    specs); the serde encoding stays byte-identical for existing maps. The
    gallery gains attention — token-labeled bands on both axes and a log
    MAGMA ramp.
  • Scale::Bands now works on the y axis: continuous marks position y against
    band indices exactly as they do on x, and a Cells matrix maps row k onto
    band k, top-down — band 0 is the top band, so labeled matrices read in matrix
    order. Cells grids must match their band axes cell-for-band (extents do not
    apply there), Bars still require a numeric y, and Plot::y_scale no longer
    panics on Bands. Confusion matrices and attention maps are now three-line
    grammar compositions; the gallery gains confusion as the proof.

Don't miss a new malevich release

NewReleases is sending notifications on new releases.