Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Aprenda Examples of Real Problems | What is Principal Component Analysis
Principal Component Analysis

Deslize para mostrar o menu

book
Examples of Real Problems

Let's look at a real-life example of the application of the PCA method. Import the libraries with which we will work:

python

Next, we read the train.csv file (from web), which contains data on house sales with the characteristics of houses and their prices:

python

Let's process our data. This process includes dropping many characteristics from the dataset (we will leave only 10 variables - this way it will be easier for us to work with the results obtained so that there are not too many characteristics), as well as data scaling:

python

Let's create a PCA model:

python

Now, to explain the results obtained, we will create a heat map of the factor loading. In the next section, we will learn why we need it.

python

In just a couple of steps, we reduced the dimension of the dataset from 10 characteristics to 3! In the next chapter, we will try to interpret the results of PCA.

Tarefa

Swipe to start coding

Read the train.csv dataset (from web) and create a PCA model for it. There should be 4 main components.

Solução

Switch to desktopMude para o desktop para praticar no mundo realContinue de onde você está usando uma das opções abaixo
Tudo estava claro?

Como podemos melhorá-lo?

Obrigado pelo seu feedback!

Seção 1. Capítulo 4
Sentimos muito que algo saiu errado. O que aconteceu?

Pergunte à IA

expand
ChatGPT

Pergunte o que quiser ou experimente uma das perguntas sugeridas para iniciar nosso bate-papo

book
Examples of Real Problems

Let's look at a real-life example of the application of the PCA method. Import the libraries with which we will work:

python

Next, we read the train.csv file (from web), which contains data on house sales with the characteristics of houses and their prices:

python

Let's process our data. This process includes dropping many characteristics from the dataset (we will leave only 10 variables - this way it will be easier for us to work with the results obtained so that there are not too many characteristics), as well as data scaling:

python

Let's create a PCA model:

python

Now, to explain the results obtained, we will create a heat map of the factor loading. In the next section, we will learn why we need it.

python

In just a couple of steps, we reduced the dimension of the dataset from 10 characteristics to 3! In the next chapter, we will try to interpret the results of PCA.

Tarefa

Swipe to start coding

Read the train.csv dataset (from web) and create a PCA model for it. There should be 4 main components.

Solução

Switch to desktopMude para o desktop para praticar no mundo realContinue de onde você está usando uma das opções abaixo
Tudo estava claro?

Como podemos melhorá-lo?

Obrigado pelo seu feedback!

Seção 1. Capítulo 4
Switch to desktopMude para o desktop para praticar no mundo realContinue de onde você está usando uma das opções abaixo
Sentimos muito que algo saiu errado. O que aconteceu?
some-alt