{"id":1793,"date":"2020-09-22T14:11:49","date_gmt":"2020-09-22T14:11:49","guid":{"rendered":"https:\/\/data-science.gotoauthority.com\/2020\/09\/22\/machine-learning-from-scratch-free-online-textbook\/"},"modified":"2020-09-22T14:11:49","modified_gmt":"2020-09-22T14:11:49","slug":"machine-learning-from-scratch-free-online-textbook","status":"publish","type":"post","link":"https:\/\/wealthrevelation.com\/data-science\/2020\/09\/22\/machine-learning-from-scratch-free-online-textbook\/","title":{"rendered":"Machine Learning from Scratch: Free Online Textbook"},"content":{"rendered":"<div id=\"post-\">\n<p><b>By <a href=\"https:\/\/github.com\/dafriedman97\" target=\"_blank\" rel=\"noopener noreferrer\">Daniel Friedman<\/a>, Senior studying stats at Harvard.<\/b><img class=\"aligncenter size-large\" src=\"https:\/\/dafriedman97.github.io\/mlbook\/_images\/logo_light.png\" width=\"90%\"><\/p>\n<p>\u00a0<\/p>\n<h3>What this Book Covers<\/h3>\n<p>\u00a0<\/p>\n<p>This book covers the building blocks of the most common methods in machine learning. This set of methods is like a toolbox for machine learning engineers. Those entering the field of machine learning should feel comfortable with this toolbox, so they have the right tool for a variety of tasks. Each chapter in this book corresponds to a single machine learning method or group of methods. In other words, each chapter focuses on a single tool within the ML toolbox.<\/p>\n<p>In my experience, the best way to become comfortable with these methods is to see them derived from scratch, both in theory and in code. The purpose of this book is to provide those derivations. Each chapter is broken into three sections. The\u00a0<em>concept<\/em>\u00a0sections introduce the methods conceptually and derive their results mathematically. The\u00a0<em>construction<\/em>\u00a0sections show how to construct the methods from scratch using Python. The\u00a0<em>implementation<\/em>\u00a0sections demonstrate how to apply the methods using packages in Python like\u00a0scikit-learn,\u00a0statsmodels, and\u00a0tensorflow.<\/p>\n<p>\u00a0<\/p>\n<h3>Why this Book<\/h3>\n<p>\u00a0<\/p>\n<p>There are many great books on machine learning written by more knowledgeable authors and covering a broader range of topics. In particular, I would suggest\u00a0<a href=\"http:\/\/faculty.marshall.usc.edu\/gareth-james\/ISL\/\" target=\"_blank\" rel=\"noopener noreferrer\">An Introduction to Statistical Learning<\/a>,\u00a0<a href=\"https:\/\/web.stanford.edu\/~hastie\/ElemStatLearn\/\" target=\"_blank\" rel=\"noopener noreferrer\">Elements of Statistical Learning<\/a>, and\u00a0<a href=\"https:\/\/www.microsoft.com\/en-us\/research\/publication\/pattern-recognition-machine-learning\/\" target=\"_blank\" rel=\"noopener noreferrer\">Pattern Recognition and Machine Learning<\/a>, all of which are available online for free.<\/p>\n<p>While those books provide a conceptual overview of machine learning and the theory behind its methods, this book focuses on the bare bones of machine learning algorithms. Its main purpose is to provide readers with the ability to construct these algorithms independently. Continuing the toolbox analogy, this book is intended as a user guide: it is not designed to teach users broad practices of the field but rather how each tool works at a micro-level.<\/p>\n<p>\u00a0<\/p>\n<h3>Who this Book is for<\/h3>\n<p>\u00a0<\/p>\n<p>This book is for readers looking to learn new machine learning algorithms or understand algorithms at a deeper level. Specifically, it is intended for readers interested in seeing machine learning algorithms derived from start to finish. Seeing these derivations might help a reader previously unfamiliar with common algorithms understand how they work intuitively. Or, seeing these derivations might help a reader experienced in modeling understand how different algorithms create the models they do and the advantages and disadvantages of each one.<\/p>\n<p>This book will be most helpful for those with practice in basic modeling. It does not review best practices\u2014such as feature engineering or balancing response variables\u2014or discuss in depth when certain models are more appropriate than others. Instead, it focuses on the elements of those models.<\/p>\n<p>\u00a0<\/p>\n<h3>What Readers Should Know<\/h3>\n<p>\u00a0<\/p>\n<p>The\u00a0<em>concept<\/em>\u00a0sections of this book primarily require knowledge of calculus. However, some require an understanding of probability (think maximum likelihood and Bayes\u2019 Rule) and basic linear algebra (think matrix operations and dot products). The appendix reviews the\u00a0<a href=\"https:\/\/dafriedman97.github.io\/mlbook\/content\/appendix\/methods.html\" target=\"_blank\" rel=\"noopener noreferrer\">math<\/a>\u00a0and\u00a0<a href=\"https:\/\/dafriedman97.github.io\/mlbook\/content\/appendix\/methods.html\" target=\"_blank\" rel=\"noopener noreferrer\">probability<\/a> needed to understand this book. The concept sections also reference a few common machine learning\u00a0<a href=\"https:\/\/dafriedman97.github.io\/mlbook\/content\/appendix\/methods.html\" target=\"_blank\" rel=\"noopener noreferrer\">methods<\/a>, which are introduced in the appendix as well. The concept sections do not require any knowledge of programming.<\/p>\n<p>The\u00a0<em>construction<\/em>\u00a0and\u00a0<em>code<\/em>\u00a0sections of this book use some basic Python. The construction sections require an understanding of the corresponding content sections and familiarity with creating functions and classes in Python. The code sections require neither.<\/p>\n<p>\u00a0<\/p>\n<h3>Where to Ask Questions or Give Feedback<\/h3>\n<p>\u00a0<\/p>\n<p>You can <a href=\"https:\/\/github.com\/dafriedman97\/mlbook\/issues\" target=\"_blank\" rel=\"noopener noreferrer\">raise an issue<\/a>\u00a0or email me at dafrdman@gmail.com. You can also connect with me on <a href=\"https:\/\/twitter.com\/dafrdman\" target=\"_blank\" rel=\"noopener noreferrer\">Twitter<\/a>\u00a0or on <a href=\"https:\/\/www.linkedin.com\/in\/daniel-friedman-36b1b2139\/\" target=\"_blank\" rel=\"noopener noreferrer\">LinkedIn<\/a>.<\/p>\n<p>\u00a0<\/p>\n<h3>Table of Contents<\/h3>\n<p>\u00a0<\/p>\n<p class=\"caption\"><span class=\"caption-text\"><b><span>1. ORDINARY LINEAR REGRESSION<\/span><\/b><\/span><b><\/b><\/p>\n<p class=\"caption\"><span><span class=\"caption-text\"><b><span>2. LINEAR REGRESSION EXTENSIONS<\/span><\/b><\/span><\/span><b><\/b><\/p>\n<p class=\"caption\"><span><span class=\"caption-text\"><b><span>3. DISCRIMINATIVE CLASSIFIERS (LOGISTIC REGRESSION)<\/span><\/b><\/span><\/span><b><\/b><\/p>\n<p class=\"caption\"><span><span class=\"caption-text\"><b><span>4. GENERATIVE CLASSIFIERS (NAIVE BAYES)<\/span><\/b><\/span><\/span><b><\/b><\/p>\n<p class=\"caption\"><span><span class=\"caption-text\"><b><span>5. DECISION TREES<\/span><\/b><\/span><\/span><b><\/b><\/p>\n<p class=\"caption\"><span><span class=\"caption-text\"><b><span>6. TREE ENSEMBLE METHODS<\/span><\/b><\/span><\/span><b><\/b><\/p>\n<p class=\"caption\"><span><span class=\"caption-text\"><b><span>7. NEURAL NETWORKS<\/span><\/b><\/span><\/span><b><\/b><\/p>\n<p class=\"caption\"><span><span class=\"caption-text\"><b><span>APPENDIX<\/span><\/b><\/span><\/span><b><\/b><\/p>\n<p>\u00a0<\/p>\n<p><strong><a href=\"https:\/\/dafriedman97.github.io\/mlbook\/content\/introduction.html\" target=\"_blank\" rel=\"noopener noreferrer\">Open Textbook<\/a><\/strong><\/p>\n<p>\u00a0<\/p>\n<p><b>Related:<\/b><\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>https:\/\/www.kdnuggets.com\/2020\/09\/machine-learning-from-scratch-free-online-textbook.html<\/p>\n","protected":false},"author":0,"featured_media":1794,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[2],"tags":[],"_links":{"self":[{"href":"https:\/\/wealthrevelation.com\/data-science\/wp-json\/wp\/v2\/posts\/1793"}],"collection":[{"href":"https:\/\/wealthrevelation.com\/data-science\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wealthrevelation.com\/data-science\/wp-json\/wp\/v2\/types\/post"}],"replies":[{"embeddable":true,"href":"https:\/\/wealthrevelation.com\/data-science\/wp-json\/wp\/v2\/comments?post=1793"}],"version-history":[{"count":0,"href":"https:\/\/wealthrevelation.com\/data-science\/wp-json\/wp\/v2\/posts\/1793\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/wealthrevelation.com\/data-science\/wp-json\/wp\/v2\/media\/1794"}],"wp:attachment":[{"href":"https:\/\/wealthrevelation.com\/data-science\/wp-json\/wp\/v2\/media?parent=1793"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wealthrevelation.com\/data-science\/wp-json\/wp\/v2\/categories?post=1793"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wealthrevelation.com\/data-science\/wp-json\/wp\/v2\/tags?post=1793"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}