Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
StandardScaler | Scaling Numerical Data
Introduction to Scikit Learn
course content

Course Content

Introduction to Scikit Learn

Introduction to Scikit Learn

1. The Very First Steps
2. Scaling Numerical Data
3. Models in Scikit Learn

StandardScaler

If the dataset is standardized, it will have a good optimization effect for many machine learning algorithms. To get standardized data you have to use the next formula:

[object Object]

Here we have the following values:

  • x_scaled - standardized feature element,
  • x - unnormalized feature element,
  • mean - mean value,
  • std - standard deviation value.

There is a function in the sklearn library that normalizes data according to the formula given above: MaxAbsScaler(). In order to work with this function, it must first be imported in such a way:

The main property of standardized data is that this data: mean = 0 and standard deviation = 1.

1
from sklearn.preprocessing import StandarsScaler
copy

This function works like the previous two, namely MinMaxScaler, MaxAbsScaler, and it works in a similar way. So, in this chapter there is no example of using StandartScaler function. You will use it on your own in the below task.

Let's try! If you have some difficulties, please, use hints.

Task

You have wine dataset, we have worked with it recently. Please, standardize this data. To check, if StandardScaler function works correct, please dispay the mean and standard deviation. Pay attention: mean will be equal to 0 and std to 1.

Task

You have wine dataset, we have worked with it recently. Please, standardize this data. To check, if StandardScaler function works correct, please dispay the mean and standard deviation. Pay attention: mean will be equal to 0 and std to 1.

Switch to desktop for real-world practiceContinue from where you are using one of the options below

Everything was clear?

Section 2. Chapter 3
toggle bottom row

StandardScaler

If the dataset is standardized, it will have a good optimization effect for many machine learning algorithms. To get standardized data you have to use the next formula:

[object Object]

Here we have the following values:

  • x_scaled - standardized feature element,
  • x - unnormalized feature element,
  • mean - mean value,
  • std - standard deviation value.

There is a function in the sklearn library that normalizes data according to the formula given above: MaxAbsScaler(). In order to work with this function, it must first be imported in such a way:

The main property of standardized data is that this data: mean = 0 and standard deviation = 1.

1
from sklearn.preprocessing import StandarsScaler
copy

This function works like the previous two, namely MinMaxScaler, MaxAbsScaler, and it works in a similar way. So, in this chapter there is no example of using StandartScaler function. You will use it on your own in the below task.

Let's try! If you have some difficulties, please, use hints.

Task

You have wine dataset, we have worked with it recently. Please, standardize this data. To check, if StandardScaler function works correct, please dispay the mean and standard deviation. Pay attention: mean will be equal to 0 and std to 1.

Task

You have wine dataset, we have worked with it recently. Please, standardize this data. To check, if StandardScaler function works correct, please dispay the mean and standard deviation. Pay attention: mean will be equal to 0 and std to 1.

Switch to desktop for real-world practiceContinue from where you are using one of the options below

Everything was clear?

Section 2. Chapter 3
toggle bottom row

StandardScaler

If the dataset is standardized, it will have a good optimization effect for many machine learning algorithms. To get standardized data you have to use the next formula:

[object Object]

Here we have the following values:

  • x_scaled - standardized feature element,
  • x - unnormalized feature element,
  • mean - mean value,
  • std - standard deviation value.

There is a function in the sklearn library that normalizes data according to the formula given above: MaxAbsScaler(). In order to work with this function, it must first be imported in such a way:

The main property of standardized data is that this data: mean = 0 and standard deviation = 1.

1
from sklearn.preprocessing import StandarsScaler
copy

This function works like the previous two, namely MinMaxScaler, MaxAbsScaler, and it works in a similar way. So, in this chapter there is no example of using StandartScaler function. You will use it on your own in the below task.

Let's try! If you have some difficulties, please, use hints.

Task

You have wine dataset, we have worked with it recently. Please, standardize this data. To check, if StandardScaler function works correct, please dispay the mean and standard deviation. Pay attention: mean will be equal to 0 and std to 1.

Task

You have wine dataset, we have worked with it recently. Please, standardize this data. To check, if StandardScaler function works correct, please dispay the mean and standard deviation. Pay attention: mean will be equal to 0 and std to 1.

Switch to desktop for real-world practiceContinue from where you are using one of the options below

Everything was clear?

If the dataset is standardized, it will have a good optimization effect for many machine learning algorithms. To get standardized data you have to use the next formula:

[object Object]

Here we have the following values:

  • x_scaled - standardized feature element,
  • x - unnormalized feature element,
  • mean - mean value,
  • std - standard deviation value.

There is a function in the sklearn library that normalizes data according to the formula given above: MaxAbsScaler(). In order to work with this function, it must first be imported in such a way:

The main property of standardized data is that this data: mean = 0 and standard deviation = 1.

1
from sklearn.preprocessing import StandarsScaler
copy

This function works like the previous two, namely MinMaxScaler, MaxAbsScaler, and it works in a similar way. So, in this chapter there is no example of using StandartScaler function. You will use it on your own in the below task.

Let's try! If you have some difficulties, please, use hints.

Task

You have wine dataset, we have worked with it recently. Please, standardize this data. To check, if StandardScaler function works correct, please dispay the mean and standard deviation. Pay attention: mean will be equal to 0 and std to 1.

Switch to desktop for real-world practiceContinue from where you are using one of the options below
Section 2. Chapter 3
Switch to desktop for real-world practiceContinue from where you are using one of the options below
We're sorry to hear that something went wrong. What happened?
some-alt