Giter Site home page Giter Site logo

chapters's People

Contributors

apw avatar bmabey avatar feste avatar isnit0 avatar juliusc avatar longouyang avatar markusq avatar mhtess avatar ngoodman avatar qhfgva avatar stuhlmueller avatar undefdev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

chapters's Issues

Displaying multiple Histograms

Not sure if this is an issue really, but when multiple histograms are used, e.g.:

(hist (repeat 2000 (lambda () (chain 'a 2))) "a 2")
(hist (repeat 2000 (lambda () (chain 'c 2))) "c 2")
(hist (repeat 2000 (lambda () (chain 'a 10))) "a 10")
(hist (repeat 2000 (lambda () (chain 'c 10))) "c 10")

Only the last one is displayed. If "'done" is added to the end, no histogram at all is displayed. This makes for unclear comparisons and should perhaps be made into subplots all displayed at once.

Histogram way too big

In the joint lung-cancer / TB inference example on the conditioning page, the resulting histogram is humongous - each bar takes up way too much space. NB: this example takes a while to run.

Fix references

In content, some references are still in Mediawiki format

Deleting things in the play space?

It would be useful to be able to delete things from the play-space to avoid clutter, and also to load multiple files into one another to again, avoid clutter.

Tab should re-indent.

Pressing tab in codebox should re-indent the current line (or current region when selected), not be a tab character.

two conditions in a row register as a query (on the condition) and then the other condition

Also this comes out completely crazy in the version of webchurch that chapters is using. The craziness is fixed in the most up-to-date webchurch.

Here's the code examples that's wrong (In "Patterns of Inference")

(define observed-luminance 3.0)

(define samples
   (mh-query
    1000 10

    (define reflectance (gaussian 1 1))
    (define illumination (gaussian 3 0.5))
    (define luminance (* reflectance illumination))

    reflectance

    (condition (= luminance (gaussian observed-luminance 0.1)))
    (condition (= illumination (gaussian 0.5  0.1)))))

(multiviz "Mean reflectance: " (mean samples)
          (hist samples "Reflectance"))

If you replace the two conditions with an and statement it takes a reallllly long time to run, but I think it would do the correct thing.

Live-update histograms for query results

Have a flag to or variant of mh-query and rejection-query that makes a histogram of samples and updates it on each sample. This can be done by extending probabilistic-js inference routines to take a listener function (which is called when a sample is taken), and then creating a listener that calls the _hist vizualization tool.

Refactor CSS

Also, think about using something like Less / Sass.

Refactor to separate content

Separate the content .md files from the scripts and resources.

The scripts repo should have a build script that takes a folder location as input, builds all .md files in that directory, optionally builds an index if there is a chapters.txt file, and puts the generated html and all runtime scripts into a new subdirectory. (Runtime scripts might be just one merged and minified js with all the scripts?)

Ultimately we should move the chapter md files to a separate repository, but for now can just move them to a subdirectory.

CodeMirror injection slow

Is it possible to batch DOM updates?

Preliminary attempts at this have a weird quirk where CodeMirror content isn't actually visible until mousedown on codebox.

take is not defined

trying to use "take" returns:

_take is not defined

(take is used in some examples on the website)

Add quizzes.

Add machinery for simple quizzes (with, e.g., multiple choice answers). Should play nice with accounts so that when students are logged in their quiz results will be logged (and retrievable by admin based on email address). These will be use to make "comprehension tests" for the chapters.

Code folding

It would be useful to have code folding possible in the codemirror boxes, and have a way in the markdown to tell a region to start out folded. This way helper routines could be hidden from sight. Eg:

(define coolfun ...)

;;;folded helper code
(define boringfun ...)
;;;

..the real stuff..

Why? There are lots of examples that build progressively meaning we repeat the same code... It would look much better to hide this code from sight after the first time.

Enhance syntax coloring

In codemirror church style, it would be nice to:

-have a different syntax coloring for erps.

-color queries specially: special color for the query (and matching bracket?), special color for query expression and condition expression.

make script

Switch to make for building project. (Fairly low priority, as everything works right now, but should be done at some point.)

Build html files into a subdirectory.

Hist does not perform correctly for lists of continuous values.

To be more specific, I think the y-axis labels are flipped. Here is a little bit of code that exhibits the problem.

(define samps
  (mh-query
   500 2

   (define x (multinomial '(.1 .3 .5 .7) '(1 3 5 7)))

   (define y (+ x (gaussian 0 0.001)))

   y

   true
   )
  )

(hist samps)

Add analytics

Add analytics hooks so that we can track site usage.

(Use google analytics?)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.