Training Systems using Python Statistical Modeling by Curtis Miller

Training Systems using Python Statistical Modeling by Curtis Miller

Author:Curtis Miller
Language: eng
Format: mobi
Tags: COM062000 - COMPUTERS / Data Modeling and Design, COM051360 - COMPUTERS / Programming Languages / Python, COM018000 - COMPUTERS / Data Processing
Publisher: PAckt
Published: 2019-05-17T03:29:32+00:00


Notice that the boundary separating individuals on the right is no longer linear.

Other kernel functions are also supported by scikit-learn. Let's see the SVM in action:

Let's import all the required functions using the following lines of code:

Let's load in our Titanic dataset by using the following lines of code:

This results in the following output:

Here, I am bothered by the fact that the passenger class has values of 1, 2, and 3. This is not actually a good thing. You see, we don't want our classifier to think that there is something significant about the number 1, the number 2, and the number 3. We could call the classes A, B, and C, and it will be equally meaningful. The actual number 3 doesn't mean anything. The same thing goes for the number 1—the magnitude of that number means nothing.

So, what we actually want are dummy variables for each possible passenger class, which can be done using the following lines of code:



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.