-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Documenter.jl
committed
Aug 29, 2023
1 parent
0fec36b
commit 19723c8
Showing
24 changed files
with
24,076 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><title>Chaining · Impute.jl</title><link href="https://fonts.googleapis.com/css?family=Lato|Roboto+Mono" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/fontawesome.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/solid.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/brands.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.11.1/katex.min.css" rel="stylesheet" type="text/css"/><script>documenterBaseURL="../.."</script><script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.6/require.min.js" data-main="../../assets/documenter.js"></script><script src="../../siteinfo.js"></script><script src="../../../versions.js"></script><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../../assets/themes/documenter-dark.css" data-theme-name="documenter-dark" data-theme-primary-dark/><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../../assets/themes/documenter-light.css" data-theme-name="documenter-light" data-theme-primary/><script src="../../assets/themeswap.js"></script><link href="../../assets/invenia.css" rel="stylesheet" type="text/css"/></head><body><div id="documenter"><nav class="docs-sidebar"><div class="docs-package-name"><span class="docs-autofit">Impute.jl</span></div><form class="docs-search" action="../../search/"><input class="docs-search-query" id="documenter-search-query" name="q" type="text" placeholder="Search docs"/></form><ul class="docs-menu"><li><a class="tocitem" href="../../">Home</a></li><li><span class="tocitem">Walkthroughs</span><ul><li><a class="tocitem" href="../../walkthroughs/spatiotemporal/">Spatiotemporal</a></li><li><a class="tocitem" href="../../walkthroughs/svd/">SVD</a></li></ul></li><li><span class="tocitem">API</span><ul><li><a class="tocitem" href="../declaremissings/">Declare Missings</a></li><li><a class="tocitem" href="../validation/">Validation</a></li><li><a class="tocitem" href="../filtering/">Filtering</a></li><li><a class="tocitem" href="../imputation/">Imputation</a></li><li class="is-active"><a class="tocitem" href>Chaining</a></li></ul></li></ul><div class="docs-version-selector field has-addons"><div class="control"><span class="docs-label button is-static is-size-7">Version</span></div><div class="docs-selector control is-expanded"><div class="select is-fullwidth is-size-7"><select id="documenter-version-selector"></select></div></div></div></nav><div class="docs-main"><header class="docs-navbar"><nav class="breadcrumb"><ul class="is-hidden-mobile"><li><a class="is-disabled">API</a></li><li class="is-active"><a href>Chaining</a></li></ul><ul class="is-hidden-tablet"><li class="is-active"><a href>Chaining</a></li></ul></nav><div class="docs-right"><a class="docs-edit-link" href="https://github.com/invenia/Impute.jl/blob/master/docs/src/api/chaining.md#L" title="Edit on GitHub"><span class="docs-icon fab"></span><span class="docs-label is-hidden-touch">Edit on GitHub</span></a><a class="docs-settings-button fas fa-cog" id="documenter-settings-button" href="#" title="Settings"></a><a class="docs-sidebar-button fa fa-bars is-hidden-desktop" id="documenter-sidebar-button" href="#"></a></div></header><article class="content" id="documenter-page"><h1 id="Chaining"><a class="docs-heading-anchor" href="#Chaining">Chaining</a><a id="Chaining-1"></a><a class="docs-heading-anchor-permalink" href="#Chaining" title="Permalink"></a></h1><article class="docstring"><header><a class="docstring-binding" id="Impute.Chain" href="#Impute.Chain"><code>Impute.Chain</code></a> — <span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia">Chain{T<:Tuple{Vararg{Transform}}} <: Function</code></pre><p>Runs multiple <code>Validators</code>, <code>Filter</code> or <code>Imputor</code>s on the same data in the order they're provided.</p><p><strong>Fields</strong></p><ul><li><code>transforms::Vector{Union{Validator, Filter, Imputor}}</code></li></ul></div><a class="docs-sourcelink" target="_blank" href="https://github.com/invenia/Impute.jl/blob/3ca38ac5b693b005a9740e0e4efd8040315258e5/src/chain.jl#LL4-L12">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="Impute.Chain-Tuple{Any}" href="#Impute.Chain-Tuple{Any}"><code>Impute.Chain</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">(C::Chain)(data; kwargs...)</code></pre><p>Runnable the "callable" chain <code>C</code> on the supplied <code>data</code>.</p><p><strong>Arguments</strong></p><ul><li><code>data</code>: our data to impute</li></ul><p><strong>Keyword Arguments</strong></p><ul><li><code>kwargs</code>: Keyword arguments that should be applied to each transform (ex <code>dims=:cols</code>)</li></ul><p><strong>Returns</strong></p><ul><li>our imputed data</li></ul></div><a class="docs-sourcelink" target="_blank" href="https://github.com/invenia/Impute.jl/blob/3ca38ac5b693b005a9740e0e4efd8040315258e5/src/chain.jl#LL50-L63">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="Impute.Chain-Tuple{Vararg{Union{Impute.Imputor, Impute.Validator, Impute.DeclareMissings, Impute.Filter}, N} where N}" href="#Impute.Chain-Tuple{Vararg{Union{Impute.Imputor, Impute.Validator, Impute.DeclareMissings, Impute.Filter}, N} where N}"><code>Impute.Chain</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">Chain(transforms::Union{Validator, Filter, Imputor}...) -> Chain</code></pre><p>Creates a Chain using the transforms provided (ordering matters).</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/invenia/Impute.jl/blob/3ca38ac5b693b005a9740e0e4efd8040315258e5/src/chain.jl#LL19-L23">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="Base.:∘-Tuple{Union{Impute.Imputor, Impute.Validator, Impute.DeclareMissings, Impute.Filter}, Union{Impute.Imputor, Impute.Validator, Impute.DeclareMissings, Impute.Filter}}" href="#Base.:∘-Tuple{Union{Impute.Imputor, Impute.Validator, Impute.DeclareMissings, Impute.Filter}, Union{Impute.Imputor, Impute.Validator, Impute.DeclareMissings, Impute.Filter}}"><code>Base.:∘</code></a> — <span class="docstring-category">Method</span></header><section><div><p>Compose new chains with the composition operator</p><p><strong>Example</strong></p><pre><code class="language-julia-repl">julia> using Impute: Impute, Interpolate, NOCB, LOCF | ||
|
||
julia> M = [missing 2.0 missing missing 5.0; 1.1 2.2 missing 4.4 missing] | ||
2×5 Matrix{Union{Missing, Float64}}: | ||
missing 2.0 missing missing 5.0 | ||
1.1 2.2 missing 4.4 missing | ||
|
||
julia> C = Interpolate() ∘ NOCB() ∘ LOCF(); | ||
|
||
julia> C(M; dims=:rows) | ||
2×5 Matrix{Union{Missing, Float64}}: | ||
2.0 2.0 3.0 4.0 5.0 | ||
1.1 2.2 3.3 4.4 4.4</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/invenia/Impute.jl/blob/3ca38ac5b693b005a9740e0e4efd8040315258e5/src/chain.jl#LL26-L46">source</a></section></article></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../imputation/">« Imputation</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> on <span class="colophon-date" title="Tuesday 29 August 2023 20:26">Tuesday 29 August 2023</span>. Using Julia version 1.6.7.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><title>Declare Missings · Impute.jl</title><link href="https://fonts.googleapis.com/css?family=Lato|Roboto+Mono" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/fontawesome.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/solid.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/brands.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.11.1/katex.min.css" rel="stylesheet" type="text/css"/><script>documenterBaseURL="../.."</script><script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.6/require.min.js" data-main="../../assets/documenter.js"></script><script src="../../siteinfo.js"></script><script src="../../../versions.js"></script><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../../assets/themes/documenter-dark.css" data-theme-name="documenter-dark" data-theme-primary-dark/><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../../assets/themes/documenter-light.css" data-theme-name="documenter-light" data-theme-primary/><script src="../../assets/themeswap.js"></script><link href="../../assets/invenia.css" rel="stylesheet" type="text/css"/></head><body><div id="documenter"><nav class="docs-sidebar"><div class="docs-package-name"><span class="docs-autofit">Impute.jl</span></div><form class="docs-search" action="../../search/"><input class="docs-search-query" id="documenter-search-query" name="q" type="text" placeholder="Search docs"/></form><ul class="docs-menu"><li><a class="tocitem" href="../../">Home</a></li><li><span class="tocitem">Walkthroughs</span><ul><li><a class="tocitem" href="../../walkthroughs/spatiotemporal/">Spatiotemporal</a></li><li><a class="tocitem" href="../../walkthroughs/svd/">SVD</a></li></ul></li><li><span class="tocitem">API</span><ul><li class="is-active"><a class="tocitem" href>Declare Missings</a></li><li><a class="tocitem" href="../validation/">Validation</a></li><li><a class="tocitem" href="../filtering/">Filtering</a></li><li><a class="tocitem" href="../imputation/">Imputation</a></li><li><a class="tocitem" href="../chaining/">Chaining</a></li></ul></li></ul><div class="docs-version-selector field has-addons"><div class="control"><span class="docs-label button is-static is-size-7">Version</span></div><div class="docs-selector control is-expanded"><div class="select is-fullwidth is-size-7"><select id="documenter-version-selector"></select></div></div></div></nav><div class="docs-main"><header class="docs-navbar"><nav class="breadcrumb"><ul class="is-hidden-mobile"><li><a class="is-disabled">API</a></li><li class="is-active"><a href>Declare Missings</a></li></ul><ul class="is-hidden-tablet"><li class="is-active"><a href>Declare Missings</a></li></ul></nav><div class="docs-right"><a class="docs-edit-link" href="https://github.com/invenia/Impute.jl/blob/master/docs/src/api/declaremissings.md#L" title="Edit on GitHub"><span class="docs-icon fab"></span><span class="docs-label is-hidden-touch">Edit on GitHub</span></a><a class="docs-settings-button fas fa-cog" id="documenter-settings-button" href="#" title="Settings"></a><a class="docs-sidebar-button fa fa-bars is-hidden-desktop" id="documenter-sidebar-button" href="#"></a></div></header><article class="content" id="documenter-page"><h1 id="Declaring-Missings"><a class="docs-heading-anchor" href="#Declaring-Missings">Declaring Missings</a><a id="Declaring-Missings-1"></a><a class="docs-heading-anchor-permalink" href="#Declaring-Missings" title="Permalink"></a></h1><article class="docstring"><header><a class="docstring-binding" id="Impute.declaremissings" href="#Impute.declaremissings"><code>Impute.declaremissings</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia">Impute.declaremissings(data; values)</code></pre><p>DeclareMissings (or replace) various missing data representations with <code>missing</code>.</p><p><strong>Keyword Arguments</strong></p><ul><li><code>value::Tuple</code>: A tuple of values that should be considered <code>missing</code></li></ul><p><strong>Example</strong></p><pre><code class="language-julia-repl">julia> using DataFrames, Impute | ||
|
||
|
||
julia> df = DataFrame( | ||
:a => [1.1, 2.2, NaN, NaN, 5.5], | ||
:b => [1, 2, 3, -9999, 5], | ||
:c => ["v", "w", "x", "y", "NULL"], | ||
) | ||
5×3 DataFrame | ||
Row │ a b c | ||
│ Float64 Int64 String | ||
─────┼──────────────────────── | ||
1 │ 1.1 1 v | ||
2 │ 2.2 2 w | ||
3 │ NaN 3 x | ||
4 │ NaN -9999 y | ||
5 │ 5.5 5 NULL | ||
|
||
julia> Impute.declaremissings(df; values=(NaN, -9999, "NULL")) | ||
5×3 DataFrame | ||
Row │ a b c | ||
│ Float64? Int64? String? | ||
─────┼───────────────────────────── | ||
1 │ 1.1 1 v | ||
2 │ 2.2 2 w | ||
3 │ missing 3 x | ||
4 │ missing missing y | ||
5 │ 5.5 5 missing</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/invenia/Impute.jl/blob/3ca38ac5b693b005a9740e0e4efd8040315258e5/src/functional.jl#LL449-L488">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="Impute.DeclareMissings" href="#Impute.DeclareMissings"><code>Impute.DeclareMissings</code></a> — <span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia">DeclareMissings(; values)</code></pre><p>DeclareMissings (or replace) various missing data values with <code>missing</code>. This is useful for downstream imputation methods that assume missing data is represented by a <code>missing</code>.</p><p>!!! In-place methods are only applicable for datasets which already <code>allowmissing</code>.</p><p><strong>Keyword Arguments</strong></p><ul><li><code>value::Tuple</code>: A tuple of values that should be considered <code>missing</code></li></ul><p><strong>Example</strong></p><pre><code class="language-julia-repl">julia> using Impute: DeclareMissings, apply | ||
|
||
julia> M = [1.0 2.0 -9999.0 NaN 5.0; 1.1 2.2 3.3 0.0 5.5] | ||
2×5 Matrix{Float64}: | ||
1.0 2.0 -9999.0 NaN 5.0 | ||
1.1 2.2 3.3 0.0 5.5 | ||
|
||
julia> apply(M, DeclareMissings(; values=(NaN, -9999.0, 0.0))) | ||
2×5 Matrix{Union{Missing, Float64}}: | ||
1.0 2.0 missing missing 5.0 | ||
1.1 2.2 3.3 missing 5.5</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/invenia/Impute.jl/blob/3ca38ac5b693b005a9740e0e4efd8040315258e5/src/declaremissings.jl#LL1-L27">source</a></section></article></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../../walkthroughs/svd/">« SVD</a><a class="docs-footer-nextpage" href="../validation/">Validation »</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> on <span class="colophon-date" title="Tuesday 29 August 2023 20:26">Tuesday 29 August 2023</span>. Using Julia version 1.6.7.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html> |
Oops, something went wrong.