# How do we modify all variables to be on the same scale?

**URL:** <https://community.drivendata.org/t/how-do-we-modify-all-variables-to-be-on-the-same-scale/1389>\
**Category:** DengAI Competition\
**Created:** [August 30, 2017, 5:18am UTC](https://community.drivendata.org/t/how-do-we-modify-all-variables-to-be-on-the-same-scale/1389 "2017-08-30T05:18:41Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![krutika04](https://avatars.discourse-cdn.com/v4/letter/k/7ab992/32.png) [@krutika04](https://community.drivendata.org/u/krutika04)\
**Post date:** [August 30, 2017, 5:18am UTC](https://community.drivendata.org/t/how-do-we-modify-all-variables-to-be-on-the-same-scale/1389/1 "2017-08-30T05:18:42Z")

</div>

Hi,

I am new to data science. From what i understand the variables have different scales like 0.25_0.25 or 0.5_0.5. How do i resolve them to the same scale?  
I am not sure if a simple scaling up/down is accurate.

Thanks

---

<div class="post-metadata">

**Author:** ![rahulbakshee](https://avatars.discourse-cdn.com/v4/letter/r/41988e/32.png) [@rahulbakshee](https://community.drivendata.org/u/rahulbakshee)\
**Post date:** [August 31, 2017, 9:41am UTC](https://community.drivendata.org/t/how-do-we-modify-all-variables-to-be-on-the-same-scale/1389/2 "2017-08-31T09:41:35Z")

</div>

Under sklearn.preprocessing you can find various module for scaling, centering, normalization, binarization and imputation.

In most cases `StandardScaler` or `MinMaxScaler` should work fine.

---

<div class="post-metadata">

**Author:** ![DavidVincent](https://avatars.discourse-cdn.com/v4/letter/d/4491bb/32.png) [@DavidVincent](https://community.drivendata.org/u/DavidVincent)\
**Post date:** [October 5, 2017, 8:18am UTC](https://community.drivendata.org/t/how-do-we-modify-all-variables-to-be-on-the-same-scale/1389/3 "2017-10-05T08:18:21Z")

</div>

With reference to “precipitation\_amt\_mm” with (0.25x0.25 degree scale) & “reanalysis\_sat\_precip\_amt\_mm” with (0.5x0.5 degree scale) the valus are the same.  
Do we still have to consider changing the scale?  
How does it impact?

---

<div class="post-metadata">

**Author:** ![mithragoesdark](https://avatars.discourse-cdn.com/v4/letter/m/838e76/32.png) [@mithragoesdark](https://community.drivendata.org/u/mithragoesdark)\
**Post date:** [November 12, 2017, 6:56am UTC](https://community.drivendata.org/t/how-do-we-modify-all-variables-to-be-on-the-same-scale/1389/4 "2017-11-12T06:56:13Z")

</div>

Hi David,  
the values are similar but not the same. I’m not sure why,though.  
adam

---

<div class="post-metadata">

**Author:** ![DavidVincent](https://avatars.discourse-cdn.com/v4/letter/d/4491bb/32.png) [@DavidVincent](https://community.drivendata.org/u/DavidVincent)\
**Post date:** [January 2, 2018, 6:20am UTC](https://community.drivendata.org/t/how-do-we-modify-all-variables-to-be-on-the-same-scale/1389/5 "2018-01-02T06:20:30Z")

</div>

Thanks Adam.  
I really appreciate your response.

- David
