probcomp/curve-fitting

Turn opacity-scale into a multimethod that dispatches on mode

Aperta

#53 aperta il 27 nov 2018

 (0 commenti) (0 reazioni) (1 assegnatario)Clojure (3 fork)auto 404
good first issuerefactor

Metriche repository

Star
 (3 stelle)
Metriche merge PR
 (Metriche PR in attesa)

Descrizione

Currently we switch between opacity scales like so:

(let [make-opacity-scale (case mode
                           :resampling resampling/make-opacity-scale
                           :prior prior/make-opacity-scale)
      opacity-scale (make-opacity-scale (map :log-score curves))])

Instead we should define a multimethod curve-fitting.core/opacity-scale (or maybe curve-fitting.sketches/opacity-scale that takes two arguments: The mode and the log scores.

Guida contributor