Data Science from Scratch, 2nd Edition

Data Science from Scratch, 2nd Edition

Read it now on the O’Reilly learning platform with a 10-day free trial.

O’Reilly members get unlimited access to books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.

Book description

To really learn data science, you should not only master the tools—data science libraries, frameworks, modules, and toolkits—but also understand the ideas and principles underlying them. Updated for Python 3.6, this second edition of Data Science from Scratch shows you how these tools and algorithms work by implementing them from scratch.

If you have an aptitude for mathematics and some programming skills, author Joel Grus will help you get comfortable with the math and statistics at the core of data science, and with the hacking skills you need to get started as a data scientist. Packed with new material on deep learning, statistics, and natural language processing, this updated book shows you how to find the gems in today’s messy glut of data.

Show and hide more

Publisher resources

Table of contents Product information

Table of contents

  1. Preface to the Second Edition
    1. Conventions Used in This Book
    2. Using Code Examples
    3. O’Reilly Online Learning
    4. How to Contact Us
    5. Acknowledgments
    1. Data Science
    2. From Scratch
    1. The Ascendance of Data
    2. What Is Data Science?
    3. Motivating Hypothetical: DataSciencester
      1. Finding Key Connectors
      2. Data Scientists You May Know
      3. Salaries and Experience
      4. Paid Accounts
      5. Topics of Interest
      6. Onward
      1. The Zen of Python
      2. Getting Python
      3. Virtual Environments
      4. Whitespace Formatting
      5. Modules
      6. Functions
      7. Strings
      8. Exceptions
      9. Lists
      10. Tuples
      11. Dictionaries
        1. defaultdict
        1. How to Write Type Annotations
        1. matplotlib
        2. Bar Charts
        3. Line Charts
        4. Scatterplots
        5. For Further Exploration
        1. Vectors
        2. Matrices
        3. For Further Exploration
        1. Describing a Single Set of Data
          1. Central Tendencies
          2. Dispersion
          1. Dependence and Independence
          2. Conditional Probability
          3. Bayes’s Theorem
          4. Random Variables
          5. Continuous Distributions
          6. The Normal Distribution
          7. The Central Limit Theorem
          8. For Further Exploration
          1. Statistical Hypothesis Testing
          2. Example: Flipping a Coin
          3. p-Values
          4. Confidence Intervals
          5. p-Hacking
          6. Example: Running an A/B Test
          7. Bayesian Inference
          8. For Further Exploration
          1. The Idea Behind Gradient Descent
          2. Estimating the Gradient
          3. Using the Gradient
          4. Choosing the Right Step Size
          5. Using Gradient Descent to Fit Models
          6. Minibatch and Stochastic Gradient Descent
          7. For Further Exploration
          1. stdin and stdout
          2. Reading Files
            1. The Basics of Text Files
            2. Delimited Files
            1. HTML and the Parsing Thereof
            2. Example: Keeping Tabs on Congress
            1. JSON and XML
            2. Using an Unauthenticated API
            3. Finding APIs
            1. Getting Credentials
            1. Exploring Your Data
              1. Exploring One-Dimensional Data
              2. Two Dimensions
              3. Many Dimensions
              1. Modeling
              2. What Is Machine Learning?
              3. Overfitting and Underfitting
              4. Correctness
              5. The Bias-Variance Tradeoff
              6. Feature Extraction and Selection
              7. For Further Exploration
              1. The Model
              2. Example: The Iris Dataset
              3. The Curse of Dimensionality
              4. For Further Exploration
              1. A Really Dumb Spam Filter
              2. A More Sophisticated Spam Filter
              3. Implementation
              4. Testing Our Model
              5. Using Our Model
              6. For Further Exploration
              1. The Model
              2. Using Gradient Descent
              3. Maximum Likelihood Estimation
              4. For Further Exploration
              1. The Model
              2. Further Assumptions of the Least Squares Model
              3. Fitting the Model
              4. Interpreting the Model
              5. Goodness of Fit
              6. Digression: The Bootstrap
              7. Standard Errors of Regression Coefficients
              8. Regularization
              9. For Further Exploration
              1. The Problem
              2. The Logistic Function
              3. Applying the Model
              4. Goodness of Fit
              5. Support Vector Machines
              6. For Further Investigation
              1. What Is a Decision Tree?
              2. Entropy
              3. The Entropy of a Partition
              4. Creating a Decision Tree
              5. Putting It All Together
              6. Random Forests
              7. For Further Exploration
              1. Perceptrons
              2. Feed-Forward Neural Networks
              3. Backpropagation
              4. Example: Fizz Buzz
              5. For Further Exploration
              1. The Tensor
              2. The Layer Abstraction
              3. The Linear Layer
              4. Neural Networks as a Sequence of Layers
              5. Loss and Optimization
              6. Example: XOR Revisited
              7. Other Activation Functions
              8. Example: FizzBuzz Revisited
              9. Softmaxes and Cross-Entropy
              10. Dropout
              11. Example: MNIST
              12. Saving and Loading Models
              13. For Further Exploration
              1. The Idea
              2. The Model
              3. Example: Meetups
              4. Choosing k
              5. Example: Clustering Colors
              6. Bottom-Up Hierarchical Clustering
              7. For Further Exploration
              1. Word Clouds
              2. n-Gram Language Models
              3. Grammars
              4. An Aside: Gibbs Sampling
              5. Topic Modeling
              6. Word Vectors
              7. Recurrent Neural Networks
              8. Example: Using a Character-Level RNN
              9. For Further Exploration
              1. Betweenness Centrality
              2. Eigenvector Centrality
                1. Matrix Multiplication
                2. Centrality
                1. Manual Curation
                2. Recommending What’s Popular
                3. User-Based Collaborative Filtering
                4. Item-Based Collaborative Filtering
                5. Matrix Factorization
                6. For Further Exploration
                1. CREATE TABLE and INSERT
                2. UPDATE
                3. DELETE
                4. SELECT
                5. GROUP BY
                6. ORDER BY
                7. JOIN
                8. Subqueries
                9. Indexes
                10. Query Optimization
                11. NoSQL
                12. For Further Exploration
                1. Example: Word Count
                2. Why MapReduce?
                3. MapReduce More Generally
                4. Example: Analyzing Status Updates
                5. Example: Matrix Multiplication
                6. An Aside: Combiners
                7. For Further Exploration
                1. What Is Data Ethics?
                2. No, Really, What Is Data Ethics?
                3. Should I Care About Data Ethics?
                4. Building Bad Data Products
                5. Trading Off Accuracy and Fairness
                6. Collaboration
                7. Interpretability
                8. Recommendations
                9. Biased Data
                10. Data Protection
                11. In Summary
                12. For Further Exploration
                1. IPython
                2. Mathematics
                3. Not from Scratch
                  1. NumPy
                  2. pandas
                  3. scikit-learn
                  4. Visualization
                  5. R
                  6. Deep Learning
                  1. Hacker News
                  2. Fire Trucks
                  3. T-Shirts
                  4. Tweets on a Globe
                  5. And You?
                  Show and hide more

                  Product information

                  • Title: Data Science from Scratch, 2nd Edition
                  • Author(s): Joel Grus
                  • Release date: May 2019
                  • Publisher(s): O'Reilly Media, Inc.
                  • ISBN: 9781492041139

                  You might also like

                  Check it out now on O’Reilly

                  Dive in for free with a 10-day trial of the O’Reilly learning platform—then explore all the other resources our members count on to build skills and solve problems every day.