Skip to content

Commit 855490b

Browse files
author
Documenter.jl
committed
build based on 5a4c6af
1 parent 78511e3 commit 855490b

File tree

11 files changed

+143
-145
lines changed

11 files changed

+143
-145
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:25:38","documenter_version":"1.14.1"}}
1+
{"documenter":{"julia_version":"1.12.1","generation_timestamp":"2025-10-19T07:49:14","documenter_version":"1.14.1"}}

dev/assets/documenter.js

Lines changed: 1 addition & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dev/auto_generated_list_of_measures/index.html

Lines changed: 93 additions & 93 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.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
53+
MulticlassFScore(beta=0.5, average=MacroAvg())(ŷ, y, class_weights)</code></pre><pre class="documenter-example-output"><code class="nohighlight hljs ansi">1.391308358413436</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.362595
55+
&#39;B&#39; =&gt; 0.612121
56+
&#39;C&#39; =&gt; 3.19921</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 │ 99 │113 │ 0 │
66+
│ A │133 │119 │ 0 │
6767
├─────────┼────┼────┼────┤
68-
│ B │105 │116 │ 0 │
68+
│ B │119 │101 │ 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.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)
134+
ŷ[1]</code></pre><pre class="documenter-example-output"><code class="nohighlight hljs ansi">Distributions.Normal{Float64}(μ=0.5046317056465599, σ=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.5099991053893037</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.27170298589290603</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.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)
137+
0.2128738071383313
138+
0.22957050441003543
139+
0.4722403962181681
140+
0.3756187486610114
141+
0.33047213993360436
142+
0.2830516388124885
143+
0.2972192805683936
144+
0.08462056829825945
145+
0.22584981898693662
146+
0.23202311294297379
147+
0.3000779772834867
148+
1.1628907364241037
149+
0.17309754135559513
150+
0.4935270619734014
151+
0.12237900102037948
152+
0.09231568057657659
153+
0.6111693143451427
154+
0.03129926850732532
155+
0.19075789284388409
156+
0.15812995264948143</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.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
158+
ŷ[1]</code></pre><pre class="documenter-example-output"><code class="nohighlight hljs ansi">Distributions.Poisson{Float64}(λ=3.3810443315127916)</code></pre><pre><code class="language-julia hljs">brier_loss(ŷ, y)</code></pre><pre class="documenter-example-output"><code class="nohighlight hljs ansi">0.007532735696796258</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: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>
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="Sunday 19 October 2025 07:49">Sunday 19 October 2025</span>. Using Julia version 1.12.1.</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: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>
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="Sunday 19 October 2025 07:49">Sunday 19 October 2025</span>. Using Julia version 1.12.1.</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: 3 additions & 3 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)