Documentation ¶
Index ¶
- Constants
- func Evaluate(d streams.PredictionDocument) int
- func HTMLFromStreams(w io.Writer, sts []streams.Stream) error
- func Header(st streams.Stream) string
- func MarkdownFromDocument(d streams.PredictionDocument) string
- func MarkdownFromStream(st streams.Stream) string
- func MarkdownFromStreams(sts []streams.Stream, options ...Option) string
- type Option
- type Point
Constants ¶
const ( // ExcludedForCause is used to describe a prediction that has been deliberately excluded from consideration. ExcludedForCause = iota // Ongoing is used to describe a prediction that hasn’t been resolved yet. Ongoing // Resolved is used to describe a prediction that can be evaluated, but cannot be classified as “called” or “missed” because it predicts something will happen at a 50% confidence interval. Resolved // CalledTruePositive is used to describe a prediction where something was predicted to happen, and that thing happened. CalledTruePositive // CalledTrueNegative is used to describe something that was predicted to not happen that did not happen. CalledTrueNegative // MissedFalsePositive is used to describe a prediction where something was predicted to happen, but didn’t. MissedFalsePositive // MissedFalseNegative is used to describe a prediction where something was predicted to not happen, but happened anyway. MissedFalseNegative )
Variables ¶
This section is empty.
Functions ¶
func Evaluate ¶
func Evaluate(d streams.PredictionDocument) int
Evaluate returns an int describing whether the prediction is excluded, ongoing, called, or missed.
func HTMLFromStreams ¶
HTMLFromStreams generates HTML output of streams and writes it to w.
func MarkdownFromDocument ¶
func MarkdownFromDocument(d streams.PredictionDocument) string
MarkdownFromDocument makes a Markdown-formatted document.
Formatting:
- ongoing predictions are plain
- predictions that were called correctly are bold
- predictions that were mis-called are struck through
- excluded-for-cause predictions are italicized
Note that MarkdownFromDocument also uses HTML for the italics and the strikethrough. This may be a problem in some contexts that allow markdown but not HTML, like some forum software in some configurations.
func MarkdownFromStream ¶
MarkdownFromStream makes a markdown-formatted stream.
Types ¶
type Option ¶
type Option func(o *formattingOptions)
Option is the type used for public-facing formatting options.
type Point ¶
A Point struct contains an x and y point. Used for Chart.js.
func (Point) MarshalJSON ¶
MarshalJSON suppresses excess precision in float64’s default marshaling behavior.
Do you want to see tooltips for points on a chart that say (0.7000000000000001, 0.7000000000000001)? Me neither.