---

title: Scalers 


keywords: fastai
sidebar: home_sidebar

summary: "Utils for scaling data"
description: "Utils for scaling data"
nb_path: "nbs/data__scalers.ipynb"
---
<!--

#################################################
### THIS FILE WAS AUTOGENERATED! DO NOT EDIT! ###
#################################################
# file to edit: nbs/data__scalers.ipynb
# command to build the docs after a change: nbdev_build_docs

-->

<div class="container" id="notebook-container">
        
    {% raw %}
    
<div class="cell border-box-sizing code_cell rendered">

</div>
    {% endraw %}

    {% raw %}
    
<div class="cell border-box-sizing code_cell rendered">

</div>
    {% endraw %}

    {% raw %}
    
<div class="cell border-box-sizing code_cell rendered">

<div class="output_wrapper">
<div class="output">

<div class="output_area">


<div class="output_markdown rendered_html output_subarea ">
<h2 id="Scaler" class="doc_header"><code>class</code> <code>Scaler</code><a href="https://github.com/Nixtla/nixtlats/tree/master/nixtlats/data/scalers.py#L24" class="source_link" style="float:right">[source]</a></h2><blockquote><p><code>Scaler</code>(<strong><code>normalizer</code></strong>)</p>
</blockquote>

</div>

</div>

</div>
</div>

</div>
    {% endraw %}

    {% raw %}
    
<div class="cell border-box-sizing code_cell rendered">

<div class="output_wrapper">
<div class="output">

<div class="output_area">


<div class="output_markdown rendered_html output_subarea ">
<h4 id="norm_scaler" class="doc_header"><code>norm_scaler</code><a href="https://github.com/Nixtla/nixtlats/tree/master/nixtlats/data/scalers.py#L70" class="source_link" style="float:right">[source]</a></h4><blockquote><p><code>norm_scaler</code>(<strong><code>x</code></strong>, <strong><code>mask</code></strong>)</p>
</blockquote>

</div>

</div>

</div>
</div>

</div>
    {% endraw %}

    {% raw %}
    
<div class="cell border-box-sizing code_cell rendered">

<div class="output_wrapper">
<div class="output">

<div class="output_area">


<div class="output_markdown rendered_html output_subarea ">
<h4 id="inv_norm_scaler" class="doc_header"><code>inv_norm_scaler</code><a href="https://github.com/Nixtla/nixtlats/tree/master/nixtlats/data/scalers.py#L77" class="source_link" style="float:right">[source]</a></h4><blockquote><p><code>inv_norm_scaler</code>(<strong><code>x</code></strong>, <strong><code>x_min</code></strong>, <strong><code>x_max</code></strong>)</p>
</blockquote>

</div>

</div>

</div>
</div>

</div>
    {% endraw %}

    {% raw %}
    
<div class="cell border-box-sizing code_cell rendered">

<div class="output_wrapper">
<div class="output">

<div class="output_area">


<div class="output_markdown rendered_html output_subarea ">
<h4 id="norm1_scaler" class="doc_header"><code>norm1_scaler</code><a href="https://github.com/Nixtla/nixtlats/tree/master/nixtlats/data/scalers.py#L81" class="source_link" style="float:right">[source]</a></h4><blockquote><p><code>norm1_scaler</code>(<strong><code>x</code></strong>, <strong><code>mask</code></strong>)</p>
</blockquote>

</div>

</div>

</div>
</div>

</div>
    {% endraw %}

    {% raw %}
    
<div class="cell border-box-sizing code_cell rendered">

<div class="output_wrapper">
<div class="output">

<div class="output_area">


<div class="output_markdown rendered_html output_subarea ">
<h4 id="inv_norm1_scaler" class="doc_header"><code>inv_norm1_scaler</code><a href="https://github.com/Nixtla/nixtlats/tree/master/nixtlats/data/scalers.py#L89" class="source_link" style="float:right">[source]</a></h4><blockquote><p><code>inv_norm1_scaler</code>(<strong><code>x</code></strong>, <strong><code>x_min</code></strong>, <strong><code>x_max</code></strong>)</p>
</blockquote>

</div>

</div>

</div>
</div>

</div>
    {% endraw %}

    {% raw %}
    
<div class="cell border-box-sizing code_cell rendered">

<div class="output_wrapper">
<div class="output">

<div class="output_area">


<div class="output_markdown rendered_html output_subarea ">
<h4 id="std_scaler" class="doc_header"><code>std_scaler</code><a href="https://github.com/Nixtla/nixtlats/tree/master/nixtlats/data/scalers.py#L94" class="source_link" style="float:right">[source]</a></h4><blockquote><p><code>std_scaler</code>(<strong><code>x</code></strong>, <strong><code>mask</code></strong>)</p>
</blockquote>

</div>

</div>

</div>
</div>

</div>
    {% endraw %}

    {% raw %}
    
<div class="cell border-box-sizing code_cell rendered">

<div class="output_wrapper">
<div class="output">

<div class="output_area">


<div class="output_markdown rendered_html output_subarea ">
<h4 id="inv_std_scaler" class="doc_header"><code>inv_std_scaler</code><a href="https://github.com/Nixtla/nixtlats/tree/master/nixtlats/data/scalers.py#L101" class="source_link" style="float:right">[source]</a></h4><blockquote><p><code>inv_std_scaler</code>(<strong><code>x</code></strong>, <strong><code>x_mean</code></strong>, <strong><code>x_std</code></strong>)</p>
</blockquote>

</div>

</div>

</div>
</div>

</div>
    {% endraw %}

    {% raw %}
    
<div class="cell border-box-sizing code_cell rendered">

<div class="output_wrapper">
<div class="output">

<div class="output_area">


<div class="output_markdown rendered_html output_subarea ">
<h4 id="median_scaler" class="doc_header"><code>median_scaler</code><a href="https://github.com/Nixtla/nixtlats/tree/master/nixtlats/data/scalers.py#L105" class="source_link" style="float:right">[source]</a></h4><blockquote><p><code>median_scaler</code>(<strong><code>x</code></strong>, <strong><code>mask</code></strong>)</p>
</blockquote>

</div>

</div>

</div>
</div>

</div>
    {% endraw %}

    {% raw %}
    
<div class="cell border-box-sizing code_cell rendered">

<div class="output_wrapper">
<div class="output">

<div class="output_area">


<div class="output_markdown rendered_html output_subarea ">
<h4 id="inv_median_scaler" class="doc_header"><code>inv_median_scaler</code><a href="https://github.com/Nixtla/nixtlats/tree/master/nixtlats/data/scalers.py#L113" class="source_link" style="float:right">[source]</a></h4><blockquote><p><code>inv_median_scaler</code>(<strong><code>x</code></strong>, <strong><code>x_median</code></strong>, <strong><code>x_mad</code></strong>)</p>
</blockquote>

</div>

</div>

</div>
</div>

</div>
    {% endraw %}

    {% raw %}
    
<div class="cell border-box-sizing code_cell rendered">

<div class="output_wrapper">
<div class="output">

<div class="output_area">


<div class="output_markdown rendered_html output_subarea ">
<h4 id="invariant_scaler" class="doc_header"><code>invariant_scaler</code><a href="https://github.com/Nixtla/nixtlats/tree/master/nixtlats/data/scalers.py#L117" class="source_link" style="float:right">[source]</a></h4><blockquote><p><code>invariant_scaler</code>(<strong><code>x</code></strong>, <strong><code>mask</code></strong>)</p>
</blockquote>

</div>

</div>

</div>
</div>

</div>
    {% endraw %}

    {% raw %}
    
<div class="cell border-box-sizing code_cell rendered">

<div class="output_wrapper">
<div class="output">

<div class="output_area">


<div class="output_markdown rendered_html output_subarea ">
<h4 id="inv_invariant_scaler" class="doc_header"><code>inv_invariant_scaler</code><a href="https://github.com/Nixtla/nixtlats/tree/master/nixtlats/data/scalers.py#L125" class="source_link" style="float:right">[source]</a></h4><blockquote><p><code>inv_invariant_scaler</code>(<strong><code>x</code></strong>, <strong><code>x_median</code></strong>, <strong><code>x_mad</code></strong>)</p>
</blockquote>

</div>

</div>

</div>
</div>

</div>
    {% endraw %}

    {% raw %}
    
<div class="cell border-box-sizing code_cell rendered">

</div>
    {% endraw %}

</div>
 

