Skip to content

Commit 0237406

Browse files
author
Documenter.jl
committed
build based on 705e126
1 parent 3e3690a commit 0237406

File tree

9 files changed

+98
-98
lines changed

9 files changed

+98
-98
lines changed

dev/.documenter-siteinfo.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"documenter":{"julia_version":"1.11.7","generation_timestamp":"2025-09-22T20:24:26","documenter_version":"1.14.1"}}
1+
{"documenter":{"julia_version":"1.11.7","generation_timestamp":"2025-09-22T20:25:38","documenter_version":"1.14.1"}}

dev/auto_generated_list_of_measures/index.html

Lines changed: 56 additions & 56 deletions
Large diffs are not rendered by default.

dev/confusion_matrices/index.html

Lines changed: 4 additions & 4 deletions
Large diffs are not rendered by default.

dev/examples_of_usage/index.html

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,10 @@
5050
y = rand("ABC", 1000) |> categorical
5151
ŷ = rand("ABC", 1000) |> categorical
5252
class_weights = Dict('A' => 1, 'B' =>2, 'C' => 10)
53-
MulticlassFScore(beta=0.5, average=MacroAvg())(ŷ, y, class_weights)</code></pre><pre class="documenter-example-output"><code class="nohighlight hljs ansi">1.3639036276059306</code></pre><pre><code class="language-julia hljs">MulticlassFScore(beta=0.5, average=NoAvg())(ŷ, y, class_weights)</code></pre><pre class="documenter-example-output"><code class="nohighlight hljs ansi">LittleDict{CategoricalArrays.CategoricalValue{Char, UInt32}, Float64, Tuple{CategoricalArrays.CategoricalValue{Char, UInt32}, CategoricalArrays.CategoricalValue{Char, UInt32}, CategoricalArrays.CategoricalValue{Char, UInt32}}, Tuple{Float64, Float64, Float64}} with 3 entries:
54-
&#39;A&#39; =&gt; 0.3125
55-
&#39;B&#39; =&gt; 0.697816
56-
&#39;C&#39; =&gt; 3.0814</code></pre><p>Unseen classes are tracked, when using <code>CategoricalArrays</code>, as here:</p><pre><code class="language-julia hljs"># find &#39;C&#39;-free indices
53+
MulticlassFScore(beta=0.5, average=MacroAvg())(ŷ, y, class_weights)</code></pre><pre class="documenter-example-output"><code class="nohighlight hljs ansi">1.403740884019081</code></pre><pre><code class="language-julia hljs">MulticlassFScore(beta=0.5, average=NoAvg())(ŷ, y, class_weights)</code></pre><pre class="documenter-example-output"><code class="nohighlight hljs ansi">LittleDict{CategoricalArrays.CategoricalValue{Char, UInt32}, Float64, Tuple{CategoricalArrays.CategoricalValue{Char, UInt32}, CategoricalArrays.CategoricalValue{Char, UInt32}, CategoricalArrays.CategoricalValue{Char, UInt32}}, Tuple{Float64, Float64, Float64}} with 3 entries:
54+
&#39;A&#39; =&gt; 0.302752
55+
&#39;B&#39; =&gt; 0.695027
56+
&#39;C&#39; =&gt; 3.21344</code></pre><p>Unseen classes are tracked, when using <code>CategoricalArrays</code>, as here:</p><pre><code class="language-julia hljs"># find &#39;C&#39;-free indices
5757
mask = y .!= &#39;C&#39; .&amp;&amp; ŷ .!= &#39;C&#39;;
5858
# remove observations with &#39;C&#39; class::
5959
y = y[mask]
@@ -63,9 +63,9 @@
6363
┌─────────┼────┬────┬────┤
6464
│Predicted│ A │ B │ C │
6565
├─────────┼────┼────┼────┤
66-
│ A │102 │105 │ 0 │
66+
│ A │ 99 │113 │ 0 │
6767
├─────────┼────┼────┼────┤
68-
│ B │ 99 │115 │ 0 │
68+
│ B │105 │116 │ 0 │
6969
├─────────┼────┼────┼────┤
7070
│ C │ 0 │ 0 │ 0 │
7171
└─────────┴────┴────┴────┘
@@ -131,31 +131,31 @@
131131

132132
y = rand(20)
133133
ŷ = [Normal(rand(), 0.5) for i in 1:20]
134-
ŷ[1]</code></pre><pre class="documenter-example-output"><code class="nohighlight hljs ansi">Distributions.Normal{Float64}(μ=0.9280574748936818, σ=0.5)</code></pre><pre><code class="language-julia hljs">log_loss(ŷ, y)</code></pre><pre class="documenter-example-output"><code class="nohighlight hljs ansi">0.536700345296312</code></pre><pre><code class="language-julia hljs">weights = rand(20)
135-
log_loss(ŷ, y, weights)</code></pre><pre class="documenter-example-output"><code class="nohighlight hljs ansi">0.2814320555740363</code></pre><pre><code class="language-julia hljs">weights = rand(20)
134+
ŷ[1]</code></pre><pre class="documenter-example-output"><code class="nohighlight hljs ansi">Distributions.Normal{Float64}(μ=0.6760416112174623, σ=0.5)</code></pre><pre><code class="language-julia hljs">log_loss(ŷ, y)</code></pre><pre class="documenter-example-output"><code class="nohighlight hljs ansi">0.5274106046708487</code></pre><pre><code class="language-julia hljs">weights = rand(20)
135+
log_loss(ŷ, y, weights)</code></pre><pre class="documenter-example-output"><code class="nohighlight hljs ansi">0.23035335007266244</code></pre><pre><code class="language-julia hljs">weights = rand(20)
136136
measurements(log_loss, ŷ, y, weights)</code></pre><pre class="documenter-example-output"><code class="nohighlight hljs ansi">20-element Vector{Float64}:
137-
0.4336656128668034
138-
0.9254657833360208
139-
0.23161215100090993
140-
0.23181750017939398
141-
0.4470879079316613
142-
0.2833375929658901
143-
0.1342352253961432
144-
0.11475304218077305
145-
0.026587200210007395
146-
0.1421213674335199
147-
0.07036908289735888
148-
0.1267305492494195
149-
0.092599430584589
150-
0.6893157407022286
151-
0.20522179328879941
152-
0.5150915621298241
153-
0.22934877408725005
154-
0.16700331252092585
155-
0.19866221048894883
156-
0.5717202090233656</code></pre><p>An example with <code>Count</code> (integer) data:</p><pre><code class="language-julia hljs">y = rand(1:10, 20)
137+
0.08598372983442924
138+
0.1459889230627991
139+
0.051802805417811806
140+
0.2217504144582199
141+
0.16589868333198188
142+
0.21225942278730364
143+
0.08857294080537546
144+
0.2184684183453816
145+
0.3456516041781843
146+
0.06446747907142204
147+
0.14507425242462074
148+
0.17083022589052202
149+
0.09509955486473907
150+
0.17000915541325654
151+
0.30797703937333987
152+
1.309584977239192
153+
0.3616317504620074
154+
1.52607837927812
155+
0.03684630137545178
156+
0.26453853985068504</code></pre><p>An example with <code>Count</code> (integer) data:</p><pre><code class="language-julia hljs">y = rand(1:10, 20)
157157
ŷ = [Poisson(10*rand()) for i in 1:20]
158-
ŷ[1]</code></pre><pre class="documenter-example-output"><code class="nohighlight hljs ansi">Distributions.Poisson{Float64}(λ=7.704581636547667)</code></pre><pre><code class="language-julia hljs">brier_loss(ŷ, y)</code></pre><pre class="documenter-example-output"><code class="nohighlight hljs ansi">0.033724332070787746</code></pre><h2 id="Custom-multi-target-measures"><a class="docs-heading-anchor" href="#Custom-multi-target-measures">Custom multi-target measures</a><a id="Custom-multi-target-measures-1"></a><a class="docs-heading-anchor-permalink" href="#Custom-multi-target-measures" title="Permalink"></a></h2><p>Here&#39;s an example of constructing a multi-target regression measure, for data with 3 observations of a 2-component target:</p><pre><code class="language-julia hljs">using StatisticalMeasures
158+
ŷ[1]</code></pre><pre class="documenter-example-output"><code class="nohighlight hljs ansi">Distributions.Poisson{Float64}(λ=7.708073055499032)</code></pre><pre><code class="language-julia hljs">brier_loss(ŷ, y)</code></pre><pre class="documenter-example-output"><code class="nohighlight hljs ansi">0.04393798725333948</code></pre><h2 id="Custom-multi-target-measures"><a class="docs-heading-anchor" href="#Custom-multi-target-measures">Custom multi-target measures</a><a id="Custom-multi-target-measures-1"></a><a class="docs-heading-anchor-permalink" href="#Custom-multi-target-measures" title="Permalink"></a></h2><p>Here&#39;s an example of constructing a multi-target regression measure, for data with 3 observations of a 2-component target:</p><pre><code class="language-julia hljs">using StatisticalMeasures
159159

160160
# last index is observation index:
161161
y = [&quot;X&quot; &quot;O&quot; &quot;O&quot;; &quot;O&quot; &quot;X&quot; &quot;X&quot;]
@@ -202,4 +202,4 @@
202202
RootMeanSquaredProportionalError =&gt; (aliases = (&quot;rmsp&quot;,), consumes_multipl…
203203
MeanAbsoluteProportionalError =&gt; (aliases = (&quot;mape&quot;,), consumes_multipl…
204204
LogCoshLoss =&gt; (aliases = (&quot;log_cosh&quot;, &quot;log_cosh_loss…</code></pre><pre><code class="language-julia hljs">options[LPLoss]</code></pre><pre class="documenter-example-output"><code class="nohighlight hljs ansi">(aliases = (&quot;l1&quot;, &quot;l2&quot;, &quot;mae&quot;, &quot;mav&quot;, &quot;mean_absolute_error&quot;, &quot;mean_absolute_value&quot;), consumes_multiple_observations = true, can_report_unaggregated = true, kind_of_proxy = Point(), observation_scitype = Union{Missing, Infinite}, can_consume_tables = false, supports_weights = true, supports_class_weights = true, orientation = Loss(), external_aggregation_mode = Mean(), human_name = &quot;``L^p`` loss&quot;)</code></pre><pre><code class="language-julia hljs">measures(&quot;Matthew&quot;)</code></pre><pre class="documenter-example-output"><code class="nohighlight hljs ansi">LittleDict{Any, Any, Vector{Any}, Vector{Any}} with 1 entry:
205-
MatthewsCorrelation =&gt; (aliases = (&quot;matthews_correlation&quot;, &quot;mcc&quot;), consumes_m…</code></pre></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../">« Overview</a><a class="docs-footer-nextpage" href="../auto_generated_list_of_measures/">The Measures »</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="auto">Automatic (OS)</option><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="catppuccin-latte">catppuccin-latte</option><option value="catppuccin-frappe">catppuccin-frappe</option><option value="catppuccin-macchiato">catppuccin-macchiato</option><option value="catppuccin-mocha">catppuccin-mocha</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.14.1 on <span class="colophon-date" title="Monday 22 September 2025 20:24">Monday 22 September 2025</span>. Using Julia version 1.11.7.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
205+
MatthewsCorrelation =&gt; (aliases = (&quot;matthews_correlation&quot;, &quot;mcc&quot;), consumes_m…</code></pre></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../">« Overview</a><a class="docs-footer-nextpage" href="../auto_generated_list_of_measures/">The Measures »</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="auto">Automatic (OS)</option><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="catppuccin-latte">catppuccin-latte</option><option value="catppuccin-frappe">catppuccin-frappe</option><option value="catppuccin-macchiato">catppuccin-macchiato</option><option value="catppuccin-mocha">catppuccin-mocha</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.14.1 on <span class="colophon-date" title="Monday 22 September 2025 20:25">Monday 22 September 2025</span>. Using Julia version 1.11.7.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>

dev/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
<br>
1414
<span style="color: #9558B2;font-size:1.6em;font-style:italic;">
1515
Measures (metrics) for statistics and machine learning</span>
16-
<br><br><h1 id="Overview"><a class="docs-heading-anchor" href="#Overview">Overview</a><a id="Overview-1"></a><a class="docs-heading-anchor-permalink" href="#Overview" title="Permalink"></a></h1><p>This package defines common measures (metrics) for classification and regression problems in statistics and machine learning. To see if your favorite measure is implemented, see <a href="auto_generated_list_of_measures/#aliases">this list</a>. Some multi-target measures are included, but see also <a href="examples_of_usage/#Custom-multi-target-measures">Custom multi-target measures</a>.</p><p>Measures with parameters (e.g., the <span>$L^p$</span> loss) are realized as callable instances of a struct; <a href="examples_of_usage/#calling">calling syntax</a> complies with the specification in <a href="https://juliaai.github.io/StatisticalMeasuresBase.jl/dev/">StatisticalMeasuresBase.jl</a>.</p><p>In addition to the measures themselves, this package provides:</p><ul><li><p>A tool <a href="roc/#StatisticalMeasures.roc_curve"><code>roc_curve</code></a> for plotting Receiver Operator Characteristics</p></li><li><p>An extension module allowing measures from <a href="https://github.com/JuliaML/LossFunctions.jl">LossFunctions.jl</a> to be used and extended using the same syntax as other measures. See <a href="examples_of_usage/#Using-losses-from-LossFunctions.jl">Using losses from LossFunctions.jl</a>.</p></li><li><p>A submodule <code>ConfusionMatrices</code> providing a confusion matrix type and basic functionality.</p></li><li><p>A submodule <code>Functions</code> where some core measure implementations are factored out as pure functions.</p></li></ul></article><nav class="docs-footer"><a class="docs-footer-nextpage" href="examples_of_usage/">Examples of usage »</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="auto">Automatic (OS)</option><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="catppuccin-latte">catppuccin-latte</option><option value="catppuccin-frappe">catppuccin-frappe</option><option value="catppuccin-macchiato">catppuccin-macchiato</option><option value="catppuccin-mocha">catppuccin-mocha</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.14.1 on <span class="colophon-date" title="Monday 22 September 2025 20:24">Monday 22 September 2025</span>. Using Julia version 1.11.7.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
16+
<br><br><h1 id="Overview"><a class="docs-heading-anchor" href="#Overview">Overview</a><a id="Overview-1"></a><a class="docs-heading-anchor-permalink" href="#Overview" title="Permalink"></a></h1><p>This package defines common measures (metrics) for classification and regression problems in statistics and machine learning. To see if your favorite measure is implemented, see <a href="auto_generated_list_of_measures/#aliases">this list</a>. Some multi-target measures are included, but see also <a href="examples_of_usage/#Custom-multi-target-measures">Custom multi-target measures</a>.</p><p>Measures with parameters (e.g., the <span>$L^p$</span> loss) are realized as callable instances of a struct; <a href="examples_of_usage/#calling">calling syntax</a> complies with the specification in <a href="https://juliaai.github.io/StatisticalMeasuresBase.jl/dev/">StatisticalMeasuresBase.jl</a>.</p><p>In addition to the measures themselves, this package provides:</p><ul><li><p>A tool <a href="roc/#StatisticalMeasures.roc_curve"><code>roc_curve</code></a> for plotting Receiver Operator Characteristics</p></li><li><p>An extension module allowing measures from <a href="https://github.com/JuliaML/LossFunctions.jl">LossFunctions.jl</a> to be used and extended using the same syntax as other measures. See <a href="examples_of_usage/#Using-losses-from-LossFunctions.jl">Using losses from LossFunctions.jl</a>.</p></li><li><p>A submodule <code>ConfusionMatrices</code> providing a confusion matrix type and basic functionality.</p></li><li><p>A submodule <code>Functions</code> where some core measure implementations are factored out as pure functions.</p></li></ul></article><nav class="docs-footer"><a class="docs-footer-nextpage" href="examples_of_usage/">Examples of usage »</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="auto">Automatic (OS)</option><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="catppuccin-latte">catppuccin-latte</option><option value="catppuccin-frappe">catppuccin-frappe</option><option value="catppuccin-macchiato">catppuccin-macchiato</option><option value="catppuccin-mocha">catppuccin-mocha</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.14.1 on <span class="colophon-date" title="Monday 22 September 2025 20:25">Monday 22 September 2025</span>. Using Julia version 1.11.7.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>

dev/objects.inv

0 Bytes
Binary file not shown.

dev/reference/index.html

Lines changed: 2 additions & 2 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)