Skip to content

Commit

Permalink
build based on 59ab837
Browse files Browse the repository at this point in the history
  • Loading branch information
Documenter.jl committed Jul 23, 2023
1 parent 309454b commit b52ec60
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion dev/api.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dev/design.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@
outputs = StatsBase.predict(
model::Model,
inputs::AbstractMatrix # always Features x Observations
)::AbstractVector{&lt;:Distribution} # length Observations</code></pre><p><a href="api.html#StatsAPI.fit"><code>fit</code></a> takes in a <a href="api.html#Models.Template"><code>Template</code></a> and some <em>data</em> and returns a <a href="api.html#Models.Model"><code>Model</code></a> that has been fit to the data. <a href="api.html#StatsAPI.predict"><code>predict</code></a> takes a <a href="api.html#Models.Model"><code>Model</code></a> (that has been <a href="api.html#StatsAPI.fit"><code>fit</code></a> from a <a href="api.html#Models.Template"><code>Template</code></a>) and produces a predicted output.</p><p>Important facts about <a href="api.html#StatsAPI.fit"><code>fit</code></a> and <a href="api.html#StatsAPI.predict"><code>predict</code></a>:</p><ul><li><code>outputs</code> and <code>inputs</code> always have observations as the second dimension – even if it is <a href="api.html#Models.SingleOutput"><code>SingleOutput</code></a> (that just means that it will be a <code>1 x num_obs</code> output. (See <a href="https://docs.julialang.org/en/v1/manual/performance-tips/#Access-arrays-in-memory-order,-along-columns-1">Docs on Julia being column-major</a>)</li><li>The functions must accept any <code>AbstractMatrix</code> for the <code>inputs</code> and <code>outputs</code> (<a href="api.html#StatsAPI.fit"><code>fit</code></a> only). If the underlying implementation needs a plain dense <code>Matrix</code> then <a href="api.html#StatsAPI.fit"><code>fit</code></a>/<a href="api.html#StatsAPI.predict"><code>predict</code></a> should perform the conversion.</li><li><a href="api.html#StatsAPI.fit"><code>fit</code></a> always accepts a <code>weights</code> argument. If the underlying <a href="api.html#Models.Model"><code>Model</code></a> does not support weighted fitting, then <a href="api.html#StatsAPI.fit"><code>fit</code></a> should throw and error if the weights that passed in and are not all equal.</li><li><a href="api.html#StatsAPI.fit"><code>fit</code></a>/<a href="api.html#StatsAPI.predict"><code>predict</code></a> take no keyword arguments, or any other arguments except the ones shown.</li></ul><h2 id="Traits"><a class="docs-heading-anchor" href="#Traits">Traits</a><a id="Traits-1"></a><a class="docs-heading-anchor-permalink" href="#Traits" title="Permalink"></a></h2><p>This package largely avoids using complicated abstract types, or relying on a <a href="api.html#Models.Model"><code>Model</code></a> having a particular abstract type. Instead we use <a href="https://invenia.github.io/blog/2019/11/06/julialang-features-part-2/">traits</a> to determine <a href="api.html#Models.Model"><code>Model</code></a> behavior.</p><p>Here are the current <a href="api.html#Models.Model"><code>Model</code></a> traits in use and their possible values:</p><ul><li><a href="api.html#Models.estimate_type"><code>estimate_type</code></a> - determines what kinds of estimates the <a href="api.html#Models.Model"><code>Model</code></a> outputs.<ul><li><a href="api.html#Models.PointEstimate"><code>PointEstimate</code></a>: Predicts point-estimates of the most likely values.</li><li><a href="api.html#Models.DistributionEstimate"><code>DistributionEstimate</code></a>: Estimates distributions over possible values.</li></ul></li><li><a href="api.html#Models.output_type"><code>output_type</code></a> - determines how many output variates a <a href="api.html#Models.Model"><code>Model</code></a> can learn<ul><li><a href="api.html#Models.SingleOutput"><code>SingleOutput</code></a>: Fits and predicts on a single output only.</li><li><a href="api.html#Models.MultiOutput"><code>MultiOutput</code></a>: Fits and predicts on multiple outputs at a time.</li></ul></li><li><a href="api.html#Models.predict_input_type"><code>predict_input_type</code></a> - determines which datatypes a <a href="api.html#Models.Model"><code>Model</code></a> can accept at predict time.<ul><li><a href="api.html#Models.PointPredictInput"><code>PointPredictInput</code></a>: Real valued input variables accepted at predict time.</li><li><a href="api.html#Models.PointOrDistributionPredictInput"><code>PointOrDistributionPredictInput</code></a>: Either real valued or distributions of input variables accepted at predict time.</li></ul></li></ul><p>The traits always agree between the <a href="api.html#Models.Model"><code>Model</code></a> and the <a href="api.html#Models.Template"><code>Template</code></a>. Every <a href="api.html#Models.Model"><code>Model</code></a> and <a href="api.html#Models.Template"><code>Template</code></a> should define all the listed traits. If left undefined, the <a href="api.html#Models.PredictInputTrait"><code>PredictInputTrait</code></a> will have the default value of <a href="api.html#Models.PointPredictInput"><code>PointPredictInput</code></a>.</p><p>This package uses traits implemented such that the trait function returns an <code>abstract type</code> (rather than an instance). That means to check a trait one uses:</p><pre><code class="language-julia hljs">if estimate_type(model) isa DistributionEstimate</code></pre><p>and to dispatch on a trait one uses:</p><pre><code class="nohighlight hljs">foo(::Type{&lt;:DistributionEstimate}, ...)</code></pre></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="index.html">« Index</a><a class="docs-footer-nextpage" href="api.html">API »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 0.27.25 on <span class="colophon-date" title="Saturday 22 July 2023 02:36">Saturday 22 July 2023</span>. Using Julia version 1.9.2.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
)::AbstractVector{&lt;:Distribution} # length Observations</code></pre><p><a href="api.html#StatsAPI.fit"><code>fit</code></a> takes in a <a href="api.html#Models.Template"><code>Template</code></a> and some <em>data</em> and returns a <a href="api.html#Models.Model"><code>Model</code></a> that has been fit to the data. <a href="api.html#StatsAPI.predict"><code>predict</code></a> takes a <a href="api.html#Models.Model"><code>Model</code></a> (that has been <a href="api.html#StatsAPI.fit"><code>fit</code></a> from a <a href="api.html#Models.Template"><code>Template</code></a>) and produces a predicted output.</p><p>Important facts about <a href="api.html#StatsAPI.fit"><code>fit</code></a> and <a href="api.html#StatsAPI.predict"><code>predict</code></a>:</p><ul><li><code>outputs</code> and <code>inputs</code> always have observations as the second dimension – even if it is <a href="api.html#Models.SingleOutput"><code>SingleOutput</code></a> (that just means that it will be a <code>1 x num_obs</code> output. (See <a href="https://docs.julialang.org/en/v1/manual/performance-tips/#Access-arrays-in-memory-order,-along-columns-1">Docs on Julia being column-major</a>)</li><li>The functions must accept any <code>AbstractMatrix</code> for the <code>inputs</code> and <code>outputs</code> (<a href="api.html#StatsAPI.fit"><code>fit</code></a> only). If the underlying implementation needs a plain dense <code>Matrix</code> then <a href="api.html#StatsAPI.fit"><code>fit</code></a>/<a href="api.html#StatsAPI.predict"><code>predict</code></a> should perform the conversion.</li><li><a href="api.html#StatsAPI.fit"><code>fit</code></a> always accepts a <code>weights</code> argument. If the underlying <a href="api.html#Models.Model"><code>Model</code></a> does not support weighted fitting, then <a href="api.html#StatsAPI.fit"><code>fit</code></a> should throw and error if the weights that passed in and are not all equal.</li><li><a href="api.html#StatsAPI.fit"><code>fit</code></a>/<a href="api.html#StatsAPI.predict"><code>predict</code></a> take no keyword arguments, or any other arguments except the ones shown.</li></ul><h2 id="Traits"><a class="docs-heading-anchor" href="#Traits">Traits</a><a id="Traits-1"></a><a class="docs-heading-anchor-permalink" href="#Traits" title="Permalink"></a></h2><p>This package largely avoids using complicated abstract types, or relying on a <a href="api.html#Models.Model"><code>Model</code></a> having a particular abstract type. Instead we use <a href="https://invenia.github.io/blog/2019/11/06/julialang-features-part-2/">traits</a> to determine <a href="api.html#Models.Model"><code>Model</code></a> behavior.</p><p>Here are the current <a href="api.html#Models.Model"><code>Model</code></a> traits in use and their possible values:</p><ul><li><a href="api.html#Models.estimate_type"><code>estimate_type</code></a> - determines what kinds of estimates the <a href="api.html#Models.Model"><code>Model</code></a> outputs.<ul><li><a href="api.html#Models.PointEstimate"><code>PointEstimate</code></a>: Predicts point-estimates of the most likely values.</li><li><a href="api.html#Models.DistributionEstimate"><code>DistributionEstimate</code></a>: Estimates distributions over possible values.</li></ul></li><li><a href="api.html#Models.output_type"><code>output_type</code></a> - determines how many output variates a <a href="api.html#Models.Model"><code>Model</code></a> can learn<ul><li><a href="api.html#Models.SingleOutput"><code>SingleOutput</code></a>: Fits and predicts on a single output only.</li><li><a href="api.html#Models.MultiOutput"><code>MultiOutput</code></a>: Fits and predicts on multiple outputs at a time.</li></ul></li><li><a href="api.html#Models.predict_input_type"><code>predict_input_type</code></a> - determines which datatypes a <a href="api.html#Models.Model"><code>Model</code></a> can accept at predict time.<ul><li><a href="api.html#Models.PointPredictInput"><code>PointPredictInput</code></a>: Real valued input variables accepted at predict time.</li><li><a href="api.html#Models.PointOrDistributionPredictInput"><code>PointOrDistributionPredictInput</code></a>: Either real valued or distributions of input variables accepted at predict time.</li></ul></li></ul><p>The traits always agree between the <a href="api.html#Models.Model"><code>Model</code></a> and the <a href="api.html#Models.Template"><code>Template</code></a>. Every <a href="api.html#Models.Model"><code>Model</code></a> and <a href="api.html#Models.Template"><code>Template</code></a> should define all the listed traits. If left undefined, the <a href="api.html#Models.PredictInputTrait"><code>PredictInputTrait</code></a> will have the default value of <a href="api.html#Models.PointPredictInput"><code>PointPredictInput</code></a>.</p><p>This package uses traits implemented such that the trait function returns an <code>abstract type</code> (rather than an instance). That means to check a trait one uses:</p><pre><code class="language-julia hljs">if estimate_type(model) isa DistributionEstimate</code></pre><p>and to dispatch on a trait one uses:</p><pre><code class="nohighlight hljs">foo(::Type{&lt;:DistributionEstimate}, ...)</code></pre></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="index.html">« Index</a><a class="docs-footer-nextpage" href="api.html">API »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 0.27.25 on <span class="colophon-date" title="Sunday 23 July 2023 02:25">Sunday 23 July 2023</span>. Using Julia version 1.9.2.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
Loading

0 comments on commit b52ec60

Please sign in to comment.