Python Machine Learning
Home > Computing and Information Technology > Computer science > Artificial intelligence > Machine learning > Python Machine Learning
Python Machine Learning

Python Machine Learning

|
     0     
5
4
3
2
1




International Edition


About the Book

Python makes machine learning easy for beginners and experienced developers With computing power increasing exponentially and costs decreasing at the same time, there is no better time to learn machine learning using Python. Machine learning tasks that once required enormous processing power are now possible on desktop machines. However, machine learning is not for the faint of heart—it requires a good foundation in statistics, as well as programming knowledge. Python Machine Learning will help coders of all levels master one of the most in-demand programming skillsets in use today. Readers will get started by following fundamental topics such as an introduction to Machine Learning and Data Science. For each learning algorithm, readers will use a real-life scenario to show how Python is used to solve the problem at hand. Python data science—manipulating data and data visualization Data cleansing Understanding Machine learning algorithms Supervised learning algorithms Unsupervised learning algorithms Deploying machine learning models Python Machine Learning is essential reading for students, developers, or anyone with a keen interest in taking their coding skills to the next level.

Table of Contents:
Introduction xxiii Chapter 1 Introduction to Machine Learning 1 What Is Machine Learning? 2 What Problems Will Machine Learning Be Solving in This Book? 3 Classification 4 Regression 4 Clustering 5 Types of Machine Learning Algorithms 5 Supervised Learning 5 Unsupervised Learning 7 Getting the Tools 8 Obtaining Anaconda 8 Installing Anaconda 9 Running Jupyter Notebook for Mac 9 Running Jupyter Notebook for Windows 10 Creating a New Notebook 11 Naming the Notebook 12 Adding and Removing Cells 13 Running a Cell 14 Restarting the Kernel 16 Exporting Your Notebook 16 Getting Help 17 Chapter 2 Extending Python Using NumPy 19 What Is NumPy? 19 Creating NumPy Arrays 20 Array Indexing 22 Boolean Indexing 22 Slicing Arrays 23 NumPy Slice Is a Reference 25 Reshaping Arrays 26 Array Math 27 Dot Product 29 Matrix 30 Cumulative Sum 31 NumPy Sorting 32 Array Assignment 34 Copying by Reference 34 Copying by View (Shallow Copy) 36 Copying by Value (Deep Copy) 37 Chapter 3 Manipulating Tabular Data Using Pandas 39 What Is Pandas? 39 Pandas Series 40 Creating a Series Using a Specified Index 41 Accessing Elements in a Series 41 Specifying a Datetime Range as the Index of a Series 42 Date Ranges 43 Pandas DataFrame 45 Creating a DataFrame 45 Specifying the Index in a DataFrame 46 Generating Descriptive Statistics on the DataFrame 47 Extracting from DataFrames 49 Selecting the First and Last Five Rows 49 Selecting a Specific Column in a DataFrame 50 Slicing Based on Row Number 50 Slicing Based on Row and Column Numbers 51 Slicing Based on Labels 52 Selecting a Single Cell in a DataFrame 54 Selecting Based on Cell Value 54 Transforming DataFrames 54 Checking to See If a Result Is a DataFrame or Series 55 Sorting Data in a DataFrame 55 Sorting by Index 55 Sorting by Value 56 Applying Functions to a DataFrame 57 Adding and Removing Rows and Columns in a DataFrame 60 Adding a Column 61 Removing Rows 61 Removing Columns 62 Generating a Crosstab 63 Chapter 4 Data Visualization Using matplotlib 67 What Is matplotlib? 67 Plotting Line Charts 68 Adding Title and Labels 69 Styling 69 Plotting Multiple Lines in the Same Chart 71 Adding a Legend 72 Plotting Bar Charts 73 Adding Another Bar to the Chart 74 Changing the Tick Marks 75 Plotting Pie Charts 77 Exploding the Slices 78 Displaying Custom Colors 79 Rotating the Pie Chart 80 Displaying a Legend 81 Saving the Chart 82 Plotting Scatter Plots 83 Combining Plots 83 Subplots 84 Plotting Using Seaborn 85 Displaying Categorical Plots 86 Displaying Lmplots 88 Displaying Swarmplots 90 Chapter 5 Getting Started with Scikit-learn for Machine Learning 93 Introduction to Scikit-learn 93 Getting Datasets 94 Using the Scikit-learn Dataset 94 Using the Kaggle Dataset 97 Using the UCI (University of California, Irvine) Machine Learning Repository 97 Generating Your Own Dataset 98 Linearly Distributed Dataset 98 Clustered Dataset 98 Clustered Dataset Distributed in Circular Fashion 100 Getting Started with Scikit-learn 100 Using the LinearRegression Class for Fitting the Model 101 Making Predictions 102 Plotting the Linear Regression Line 102 Getting the Gradient and Intercept of the Linear Regression Line 103 Examining the Performance of the Model by Calculating the Residual Sum of Squares 104 Evaluating the Model Using a Test Dataset 105 Persisting the Model 106 Data Cleansing 107 Cleaning Rows with NaNs 108 Replacing NaN with the Mean of the Column 109 Removing Rows 109 Removing Duplicate Rows 110 Normalizing Columns 112 Removing Outliers 113 Tukey Fences 113 Z-Score 116 Chapter 6 Supervised Learning—Linear Regression 119 Types of Linear Regression 119 Linear Regression 120 Using the Boston Dataset 120 Data Cleansing 125 Feature Selection 126 Multiple Regression 128 Training the Model 131 Getting the Intercept and Coefficients 133 Plotting the 3D Hyperplane 133 Polynomial Regression 135 Formula for Polynomial Regression 138 Polynomial Regression in Scikit-learn 138 Understanding Bias and Variance 141 Using Polynomial Multiple Regression on the Boston Dataset 144 Plotting the 3D Hyperplane 146 Chapter 7 Supervised Learning—Classification Using Logistic Regression 151 What Is Logistic Regression? 151 Understanding Odds 153 Logit Function 153 Sigmoid Curve 154 Using the Breast Cancer Wisconsin (Diagnostic) Data Set 156 Examining the Relationship Between Features 156 Plotting the Features in 2D 157 Plotting in 3D 158 Training Using One Feature 161 Finding the Intercept and Coefficient 162 Plotting the Sigmoid Curve 162 Making Predictions 163 Training the Model Using All Features 164 Testing the Model 166 Getting the Confusion Matrix 166 Computing Accuracy, Recall, Precision, and Other Metrics 168 Receiver Operating Characteristic (ROC) Curve 171 Plotting the ROC and Finding the Area Under the Curve (AUC) 174 Chapter 8 Supervised Learning—Classification Using Support Vector Machines 177 What Is a Support Vector Machine? 177 Maximum Separability 178 Support Vectors 179 Formula for the Hyperplane 180 Using Scikit-learn for SVM 181 Plotting the Hyperplane and the Margins 184 Making Predictions 185 Kernel Trick 186 Adding a Third Dimension 187 Plotting the 3D Hyperplane 189 Types of Kernels 191 C 194 Radial Basis Function (RBF) Kernel 196 Gamma 197 Polynomial Kernel 199 Using SVM for Real-Life Problems 200 Chapter 9 Supervised Learning—Classification Using K-Nearest Neighbors (KNN) 205 What Is K-Nearest Neighbors? 205 Implementing KNN in Python 206 Plotting the Points 206 Calculating the Distance Between the Points 207 Implementing KNN 208 Making Predictions 209 Visualizing Different Values of K 209 Using Scikit-Learn’s KNeighborsClassifier Class for KNN 211 Exploring Different Values of K 213 Cross-Validation 216 Parameter-Tuning K 217 Finding the Optimal K 218 Chapter 10 Unsupervised Learning—Clustering Using K-Means 221 What Is Unsupervised Learning? 221 Unsupervised Learning Using K-Means 222 How Clustering in K-Means Works 222 Implementing K-Means in Python 225 Using K-Means in Scikit-learn 230 Evaluating Cluster Size Using the Silhouette Coefficient 232 Calculating the Silhouette Coefficient 233 Finding the Optimal K 234 Using K-Means to Solve Real-Life Problems 236 Importing the Data 237 Cleaning the Data 237 Plotting the Scatter Plot 238 Clustering Using K-Means 239 Finding the Optimal Size Classes 240 Chapter 11 Using Azure Machine Learning Studio 243 What Is Microsoft Azure Machine Learning Studio? 243 An Example Using the Titanic Experiment 244 Using Microsoft Azure Machine Learning Studio 246 Uploading Your Dataset 247 Creating an Experiment 248 Filtering the Data and Making Fields Categorical 252 Removing the Missing Data 254 Splitting the Data for Training and Testing 254 Training a Model 256 Comparing Against Other Algorithms 258 Evaluating Machine Learning Algorithms 260 Publishing the Learning Model as a Web Service 261 Publishing the Experiment 261 Testing the Web Service 263 Programmatically Accessing the Web Service 263 Chapter 12 Deploying Machine Learning Models 269 Deploying ML 269 Case Study 270 Loading the Data 271 Cleaning the Data 271 Examining the Correlation Between the Features 273 Plotting the Correlation Between Features 274 Evaluating the Algorithms 277 Logistic Regression 277 K-Nearest Neighbors 277 Support Vector Machines 278 Selecting the Best Performing Algorithm 279 Training and Saving the Model 279 Deploying the Model 280 Testing the Model 282 Creating the Client Application to Use the Model 283 Index 285


Best Sellers


Product Details
  • ISBN-13: 9781119545637
  • Publisher: John Wiley & Sons Inc
  • Publisher Imprint: John Wiley & Sons Inc
  • Height: 234 mm
  • No of Pages: 320
  • Returnable: N
  • Weight: 431 gr
  • ISBN-10: 1119545633
  • Publisher Date: 31 May 2019
  • Binding: Paperback
  • Language: English
  • Returnable: N
  • Spine Width: 20 mm
  • Width: 188 mm


Similar Products

Add Photo
Add Photo

Customer Reviews

REVIEWS      0     
Click Here To Be The First to Review this Product
Python Machine Learning
John Wiley & Sons Inc -
Python Machine Learning
Writing guidlines
We want to publish your review, so please:
  • keep your review on the product. Review's that defame author's character will be rejected.
  • Keep your review focused on the product.
  • Avoid writing about customer service. contact us instead if you have issue requiring immediate attention.
  • Refrain from mentioning competitors or the specific price you paid for the product.
  • Do not include any personally identifiable information, such as full names.

Python Machine Learning

Required fields are marked with *

Review Title*
Review
    Add Photo Add up to 6 photos
    Would you recommend this product to a friend?
    Tag this Book Read more
    Does your review contain spoilers?
    What type of reader best describes you?
    I agree to the terms & conditions
    You may receive emails regarding this submission. Any emails will include the ability to opt-out of future communications.

    CUSTOMER RATINGS AND REVIEWS AND QUESTIONS AND ANSWERS TERMS OF USE

    These Terms of Use govern your conduct associated with the Customer Ratings and Reviews and/or Questions and Answers service offered by Bookswagon (the "CRR Service").


    By submitting any content to Bookswagon, you guarantee that:
    • You are the sole author and owner of the intellectual property rights in the content;
    • All "moral rights" that you may have in such content have been voluntarily waived by you;
    • All content that you post is accurate;
    • You are at least 13 years old;
    • Use of the content you supply does not violate these Terms of Use and will not cause injury to any person or entity.
    You further agree that you may not submit any content:
    • That is known by you to be false, inaccurate or misleading;
    • That infringes any third party's copyright, patent, trademark, trade secret or other proprietary rights or rights of publicity or privacy;
    • That violates any law, statute, ordinance or regulation (including, but not limited to, those governing, consumer protection, unfair competition, anti-discrimination or false advertising);
    • That is, or may reasonably be considered to be, defamatory, libelous, hateful, racially or religiously biased or offensive, unlawfully threatening or unlawfully harassing to any individual, partnership or corporation;
    • For which you were compensated or granted any consideration by any unapproved third party;
    • That includes any information that references other websites, addresses, email addresses, contact information or phone numbers;
    • That contains any computer viruses, worms or other potentially damaging computer programs or files.
    You agree to indemnify and hold Bookswagon (and its officers, directors, agents, subsidiaries, joint ventures, employees and third-party service providers, including but not limited to Bazaarvoice, Inc.), harmless from all claims, demands, and damages (actual and consequential) of every kind and nature, known and unknown including reasonable attorneys' fees, arising out of a breach of your representations and warranties set forth above, or your violation of any law or the rights of a third party.


    For any content that you submit, you grant Bookswagon a perpetual, irrevocable, royalty-free, transferable right and license to use, copy, modify, delete in its entirety, adapt, publish, translate, create derivative works from and/or sell, transfer, and/or distribute such content and/or incorporate such content into any form, medium or technology throughout the world without compensation to you. Additionally,  Bookswagon may transfer or share any personal information that you submit with its third-party service providers, including but not limited to Bazaarvoice, Inc. in accordance with  Privacy Policy


    All content that you submit may be used at Bookswagon's sole discretion. Bookswagon reserves the right to change, condense, withhold publication, remove or delete any content on Bookswagon's website that Bookswagon deems, in its sole discretion, to violate the content guidelines or any other provision of these Terms of Use.  Bookswagon does not guarantee that you will have any recourse through Bookswagon to edit or delete any content you have submitted. Ratings and written comments are generally posted within two to four business days. However, Bookswagon reserves the right to remove or to refuse to post any submission to the extent authorized by law. You acknowledge that you, not Bookswagon, are responsible for the contents of your submission. None of the content that you submit shall be subject to any obligation of confidence on the part of Bookswagon, its agents, subsidiaries, affiliates, partners or third party service providers (including but not limited to Bazaarvoice, Inc.)and their respective directors, officers and employees.

    Accept

    New Arrivals

    Inspired by your browsing history


    Your review has been submitted!

    You've already reviewed this product!