[PYTHON] DeepRunning ~ Level4.3.2 ~

Level4. Machine learning course (theory and practice)

alt What is a deep learning course that can be crushed in the field in 3 months

4-3. Logistic regression model

4-3-10. Hands-on

First, mount it with drive. ロジスティック回帰0001.png

The magic% matplotlib inline will display the graph on google colab. It's convenient to know.

Next, read the CSV file. I try to refer to drive. I was able to confirm the data set.

ロジスティック回帰0002.png

Delete unnecessary data / complement missing values ロジスティック回帰0003.png

Checking and completing lines containing null ロジスティック回帰0004.png ロジスティック回帰0005.png

We complement age with a median, but will it ultimately affect us?

Whether it is alive or dead is determined from the ticket price. ロジスティック回帰0006.png

As you can see in the video, I also confirmed that life and death change from 61 to 62. ロジスティック回帰0007.png ロジスティック回帰0008.png

The graph is also shown properly.

Then, life or death is determined from two variables. Create Gender from gender and then generate Pclass_Gender. ロジスティック回帰0009.png ロジスティック回帰0010.png

Here you can see how to formulate and plot boundaries. I will try it when the whole thing is over. ロジスティック回帰0011(重要だよ).png

Whether it is alive or dead is determined from two variables. The class is high and women can survive ... Is it a sense to think about that assumption? ロジスティック回帰0012.png ロジスティック回帰0013.png ロジスティック回帰0014.png ロジスティック回帰0015.png ロジスティック回帰0016.png

Yup. I was able to output properly.

So far, the video said that hands-on is good, I moved it all the way and checked it.

ロジスティック回帰0017.png ロジスティック回帰0018.png ロジスティック回帰0019.png ロジスティック回帰0020.png ロジスティック回帰0021.png ロジスティック回帰0022.png

I got a warning, so I checked it and set size⇒height! So, I am fixing it and re-flowing it. ロジスティック回帰0023.png ロジスティック回帰0024.png ロジスティック回帰0025.png ロジスティック回帰0026.png

I was able to confirm this as well.

4-3-11. Consideration

• Even with logistic regression, it is necessary to be able to imagine the operation on the back end. If you do not understand the operation (calculation method) until the parameter is updated when you actually operate it, It's not very good, but I don't think it can be handled. ・ I wrote it in the middle, but which item should be used for verification? It was said that the selection will be based on the opinions of the experts of the source. I thought it was necessary to cultivate a shining sensation. After that, you can actually verify it. ・ Even people who belong to the exact same Pclass_Gender have different lives and deaths depending on their age. I will add other variables and dig deeper, but I want to be aware of good salt plums as to how far I will do it.

Recommended Posts

DeepRunning ~ Level4.4.2 ~
DeepRunning ~ Level 4.6 ~
DeepRunning ~ Level4.3.1 ~
DeepRunning ~ Level3.3 ~
DeepRunning ~ Level4.3.2 ~
DeepRunning ~ Level7 ~
DeepRunning ~ Level4.5 ~
DeepRunning ~ Level2, Level3.1 ~
DeepRunning ~ Level4.4.1 ~
DeepRunning ~ Level 1 ~
DeepRunning ~ Level 4.7 ~
DeepRunning ~ Level5 ~