Repository navigation
Conversation
Add probability/studio/08_bayes_theorem/explainer, a marimo studio view of lesson 8 built around how evidence shrinks the set of outcomes: before/after area models for the worked examples, an "only where E happened" switch on the interactive model, and the notebook's live walkthrough beside it. In the notebook, name the Markdown cells the view places, move the area walkthrough into its own cell, add a hidden area_inputs cell for the view, open the sliders on the student example, and fix the \times typo in the medical example.
Stack the area walkthrough under the parameters with mo.vstack instead of interpolating it into the indented Markdown, which rendered as a code block. In the view, only make the workbench sticky when it fits the viewport, follow hashchange, keep the "prior" label inside one region, update the image's accessible name with the mode, and announce the "E never happens" note.
Contributor
|
@bjornts Thanks for the PR! Can you include a short video that showcases the view you added? |
This branch has not been deployed
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.
📝 Summary
Akshay invited CS 146S students to build marimo studio views of learn notebooks. This adds one for lesson 8, Bayes' theorem, in
probability/studio/08_bayes_theorem/explainer/.The view shows what the lesson describes: evidence shrinks the set of outcomes. Each worked example gets a before/after area model, and the interactive square can collapse to only the outcomes where E happened, so the prior visibly becomes the posterior. The notebook's area walkthrough sits beside it and updates with the sliders. All numbers come from the notebook.
Notebook changes:
area_walkthroughcell. The notebook renders the same.area_inputscell, because a projectedp_h.valuedoesn't update when the slider moves.times→\timesin the medical example.marimo-studio==0.4.1and[tool.marimo-studio].Tested with
marimo runon desktop and phone.marimo-studio validateand the repo checks pass.No learn notebook has a view yet, so this uses Studio's default
<course>/studio/<notebook>/<view>/layout. Happy to move it.📋 Checklist
--sandboxREADME.md(not applicable)