Files
Rbm/source
jensandClaude Sonnet 5 cb20060732 Implement L1 regularization
Rbm::Params had no l1Lambda field at all -- L1 didn't exist anywhere in
the C++ codebase. Status::L1 was a dead field always -1 (never assigned
outside its constructor), and the GUI's "Lambda" control was explicitly
tooltipped "Unused" with an empty change-handler stub. Scaffolded, never
implemented.

Add Params::l1Lambda (default 0.0, inert unless set) with full toJson/
fromJson round-trip. Apply its subgradient (lambda*sign(W), matching
pyRBM's l1_lambda) directly to m_whv in Rbm::train, in the same place
and same decoupled-from-momentum manner as the weightDecay fix from the
previous commit -- folding it into inc_whv's momentum recursion would
cause the same momentum-amplification bug. Doesn't touch the biases,
matching pyRBM's state_adjust().

Also wire up Status::L1 to actually report something (the current L1
norm of the weights, sum(abs(W))) instead of permanently printing -1,
computed alongside status.err/err_total.

Inert by default (l1Lambda=0.0 in every existing .prj): confirmed via
unchanged poet.elf output and unchanged test-suite results (9 passed,
1 known issue, 2 failed).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016K8Gu7Qejd11JbdiHZqYAs
2026-07-27 15:31:59 +02:00
..
2024-01-22 12:26:03 +01:00
2024-01-22 12:26:03 +01:00
2024-01-22 13:55:51 +01:00
2024-01-22 12:26:03 +01:00
2024-01-22 12:26:03 +01:00
2024-01-22 13:55:51 +01:00
2026-07-27 15:31:59 +02:00
2026-07-27 15:31:59 +02:00
2024-01-22 13:55:51 +01:00
2024-01-22 13:55:51 +01:00
2026-07-26 21:49:32 +02:00
2022-01-18 20:14:56 +00:00
2022-01-17 18:40:50 +00:00