Skip to content

Commit

Permalink
build based on 87495d5
Browse files Browse the repository at this point in the history
  • Loading branch information
Documenter.jl committed Oct 26, 2023
1 parent 1615369 commit f383625
Show file tree
Hide file tree
Showing 29 changed files with 46 additions and 46 deletions.
2 changes: 1 addition & 1 deletion dev/accessor_functions/index.html

Large diffs are not rendered by default.

20 changes: 10 additions & 10 deletions dev/algorithm_traits/index.html

Large diffs are not rendered by default.

14 changes: 7 additions & 7 deletions dev/anatomy_of_an_implementation/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,12 @@
X = (; a, b, c) |> Tables.rowtable
y = 2a - b + 3c + 0.05*rand(n)</code></pre><p>Instantiate an algorithm with relevant hyperparameters (which is all the object stores):</p><pre><code class="language-julia hljs">algorithm = MyRidge(lambda=0.5)</code></pre><pre class="documenter-example-output"><code class="nohighlight hljs ansi">Main.MyRidge(0.5)</code></pre><p>Train the algorithm (the <code>0</code> means do so silently):</p><pre><code class="language-julia hljs">import LearnAPI: fit, predict, feature_importances

fitted_params, state, fit_report = fit(algorithm, 0, X[train], y[train])</code></pre><pre class="documenter-example-output"><code class="nohighlight hljs ansi">((coefficients = [2.115542219876959, 0.18376643926262562, 2.13381070722609],), nothing, (feature_importances = [:c =&gt; 2.13381070722609, :a =&gt; 2.115542219876959, :b =&gt; 0.18376643926262562],))</code></pre><p>Inspect the learned parameters and report:</p><pre><code class="language-julia hljs">@info &quot;training outcomes&quot; fitted_params fit_report</code></pre><pre class="documenter-example-output"><code class="nohighlight hljs ansi">┌ Info: training outcomes
│ fitted_params = (coefficients = [2.115542219876959, 0.18376643926262562, 2.13381070722609],)
└ fit_report = (feature_importances = [:c =&gt; 2.13381070722609, :a =&gt; 2.115542219876959, :b =&gt; 0.18376643926262562],)</code></pre><p>Inspect feature importances:</p><pre><code class="language-julia hljs">feature_importances(algorithm, fitted_params, fit_report)</code></pre><pre class="documenter-example-output"><code class="nohighlight hljs ansi">3-element Vector{Pair{Symbol, Float64}}:
:c =&gt; 2.13381070722609
:a =&gt; 2.115542219876959
:b =&gt; 0.18376643926262562</code></pre><p>Make a prediction using new data:</p><pre><code class="language-julia hljs">yhat, predict_report = predict(algorithm, LearnAPI.LiteralTarget(), fitted_params, X[test])</code></pre><pre class="documenter-example-output"><code class="nohighlight hljs ansi">([2.5959308560640078, 1.425858419169964, 0.38941751351521436, 3.7513504197315113], nothing)</code></pre><p>Compare predictions with ground truth</p><pre><code class="language-julia hljs">deviations = yhat - y[test]
fitted_params, state, fit_report = fit(algorithm, 0, X[train], y[train])</code></pre><pre class="documenter-example-output"><code class="nohighlight hljs ansi">((coefficients = [1.5446141519448298, 0.5373430048970873, 1.604168534610231],), nothing, (feature_importances = [:c =&gt; 1.604168534610231, :a =&gt; 1.5446141519448298, :b =&gt; 0.5373430048970873],))</code></pre><p>Inspect the learned parameters and report:</p><pre><code class="language-julia hljs">@info &quot;training outcomes&quot; fitted_params fit_report</code></pre><pre class="documenter-example-output"><code class="nohighlight hljs ansi">┌ Info: training outcomes
│ fitted_params = (coefficients = [1.5446141519448298, 0.5373430048970873, 1.604168534610231],)
└ fit_report = (feature_importances = [:c =&gt; 1.604168534610231, :a =&gt; 1.5446141519448298, :b =&gt; 0.5373430048970873],)</code></pre><p>Inspect feature importances:</p><pre><code class="language-julia hljs">feature_importances(algorithm, fitted_params, fit_report)</code></pre><pre class="documenter-example-output"><code class="nohighlight hljs ansi">3-element Vector{Pair{Symbol, Float64}}:
:c =&gt; 1.604168534610231
:a =&gt; 1.5446141519448298
:b =&gt; 0.5373430048970873</code></pre><p>Make a prediction using new data:</p><pre><code class="language-julia hljs">yhat, predict_report = predict(algorithm, LearnAPI.LiteralTarget(), fitted_params, X[test])</code></pre><pre class="documenter-example-output"><code class="nohighlight hljs ansi">([1.8434681263969486, 1.9144320174595624, 0.8289219470454475, 1.8206269299634923], nothing)</code></pre><p>Compare predictions with ground truth</p><pre><code class="language-julia hljs">deviations = yhat - y[test]
loss = deviations .^2 |&gt; sum
@info &quot;Sum of squares loss&quot; loss</code></pre><pre class="documenter-example-output"><code class="nohighlight hljs ansi">┌ Info: Sum of squares loss
└ loss = 1.3038472022774477</code></pre></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../goals_and_approach/">« Goals and Approach</a><a class="docs-footer-nextpage" href="../reference/">Reference »</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="Wednesday 11 October 2023 03:52">Wednesday 11 October 2023</span>. Using Julia version 1.9.3.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
└ loss = 1.675661967867687</code></pre></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../goals_and_approach/">« Goals and Approach</a><a class="docs-footer-nextpage" href="../reference/">Reference »</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="Thursday 26 October 2023 20:59">Thursday 26 October 2023</span>. Using Julia version 1.9.3.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
2 changes: 1 addition & 1 deletion dev/common_implementation_patterns/index.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dev/fit_update_and_ingest/index.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dev/goals_and_approach/index.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dev/index.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dev/operations/index.html

Large diffs are not rendered by default.

Loading

0 comments on commit f383625

Please sign in to comment.