Skip to content

Commit 257ef07

Browse files
author
Documenter.jl
committed
build based on 9b63234
1 parent ac3523c commit 257ef07

File tree

11 files changed

+93
-93
lines changed

11 files changed

+93
-93
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"documenter":{"julia_version":"1.11.5","generation_timestamp":"2025-05-29T12:57:24","documenter_version":"1.11.4"}}
1+
{"documenter":{"julia_version":"1.11.5","generation_timestamp":"2025-05-29T12:57:43","documenter_version":"1.11.4"}}

previews/PR2608/reference/data/mlutils/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@
205205
1.7 1.7</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/JuliaML/MLUtils.jl/blob/v0.4.8/src/utils.jl#L588-L624">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="MLUtils.filterobs" href="#MLUtils.filterobs"><code>MLUtils.filterobs</code></a><span class="docstring-category">Function</span><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></span></header><section><div><pre><code class="language-julia hljs">filterobs(f, data)</code></pre><p>Return a subset of data container <code>data</code> including all indices <code>i</code> for which <code>f(getobs(data, i)) === true</code>.</p><pre><code class="language-julia hljs">data = 1:10
206206
numobs(data) == 10
207207
fdata = filterobs(&gt;(5), data)
208-
numobs(fdata) == 5</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/JuliaML/MLUtils.jl/blob/v0.4.8/src/obstransform.jl#L113-L125">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="Flux.flatten" href="#Flux.flatten"><code>Flux.flatten</code></a><span class="docstring-category">Function</span><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></span></header><section><div><p>flatten(x)</p><p>Same as <a href="#MLUtils.flatten"><code>MLUtils.flatten</code></a>, which should be preferred to this method existing only for backward compatibility.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/FluxML/Flux.jl/blob/d81a192f5d79cfd56bccfd8b03e4c3e09b0a649d/src/layers/stateless.jl#L98-L104">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="MLUtils.flatten" href="#MLUtils.flatten"><code>MLUtils.flatten</code></a><span class="docstring-category">Function</span><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></span></header><section><div><pre><code class="language-julia hljs">flatten(x::AbstractArray)</code></pre><p>Reshape arbitrarly-shaped input into a matrix-shaped output, preserving the size of the last dimension.</p><p>See also <a href="#MLUtils.unsqueeze"><code>unsqueeze</code></a>.</p><p><strong>Examples</strong></p><pre><code class="language-julia-repl hljs">julia&gt; rand(3,4,5) |&gt; flatten |&gt; size
208+
numobs(fdata) == 5</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/JuliaML/MLUtils.jl/blob/v0.4.8/src/obstransform.jl#L113-L125">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="Flux.flatten" href="#Flux.flatten"><code>Flux.flatten</code></a><span class="docstring-category">Function</span><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></span></header><section><div><p>flatten(x)</p><p>Same as <a href="#MLUtils.flatten"><code>MLUtils.flatten</code></a>, which should be preferred to this method existing only for backward compatibility.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/FluxML/Flux.jl/blob/9b632345bac2b4e01c59063eab6f50ffb07e44f8/src/layers/stateless.jl#L98-L104">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="MLUtils.flatten" href="#MLUtils.flatten"><code>MLUtils.flatten</code></a><span class="docstring-category">Function</span><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></span></header><section><div><pre><code class="language-julia hljs">flatten(x::AbstractArray)</code></pre><p>Reshape arbitrarly-shaped input into a matrix-shaped output, preserving the size of the last dimension.</p><p>See also <a href="#MLUtils.unsqueeze"><code>unsqueeze</code></a>.</p><p><strong>Examples</strong></p><pre><code class="language-julia-repl hljs">julia&gt; rand(3,4,5) |&gt; flatten |&gt; size
209209
(12, 5)</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/JuliaML/MLUtils.jl/blob/v0.4.8/src/utils.jl#L380-L394">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="MLCore.getobs" href="#MLCore.getobs"><code>MLCore.getobs</code></a><span class="docstring-category">Function</span><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></span></header><section><div><pre><code class="language-julia hljs">getobs(data, [idx])</code></pre><p>Return the observations corresponding to the observation index <code>idx</code>.</p><p>The index <code>idx</code> is an integer with values in the range <code>1:numobs(data)</code>. Types can optionally support <code>idx</code> being an array of integers.</p><p>If <code>data</code> does not have <code>getobs</code> defined, then in the case of <code>Tables.table(data) == true</code> returns the row(s) in position <code>idx</code>, otherwise returns <code>data[idx]</code>.</p><p>Authors of custom data containers should implement <code>Base.getindex</code> for their type instead of <code>getobs</code>. <code>getobs</code> should only be implemented for types where there is a difference between <code>getobs</code> and <code>Base.getindex</code> (such as multi-dimensional arrays).</p><p>The returned observation(s) should be in the form intended to be passed as-is to some learning algorithm. There is no strict interface requirement on how this &quot;actual data&quot; must look like. Every author behind some custom data container can make this decision themselves. The output should be consistent when <code>idx</code> is a scalar vs vector.</p><p><code>getobs</code> supports by default nested combinations of array, tuple, named tuples, and dictionaries. </p><p>The return from <code>getobs</code> should always be a materialized object, not a view, altough it can be a reference to the original data. </p><p>If the argument <code>idx</code> is not provided, <code>getobs(data)</code> should return a materialized version of the data.</p><p>See also <a href="#MLCore.getobs!"><code>getobs!</code></a> and <a href="#MLCore.numobs"><code>numobs</code></a>.</p><p><strong>Examples</strong></p><pre><code class="language-julia-repl hljs">julia&gt; x = (a = [1, 2, 3], b = rand(6, 3));
210210

211211
julia&gt; getobs(x, 2) == (a = 2, b = x.b[:, 2])

0 commit comments

Comments
 (0)