[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"similar-rasbt--python-machine-learning-book":3,"tool-rasbt--python-machine-learning-book":64},[4,17,27,35,43,56],{"id":5,"name":6,"github_repo":7,"description_zh":8,"stars":9,"difficulty_score":10,"last_commit_at":11,"category_tags":12,"status":16},3808,"stable-diffusion-webui","AUTOMATIC1111\u002Fstable-diffusion-webui","stable-diffusion-webui 是一个基于 Gradio 构建的网页版操作界面，旨在让用户能够轻松地在本地运行和使用强大的 Stable Diffusion 图像生成模型。它解决了原始模型依赖命令行、操作门槛高且功能分散的痛点，将复杂的 AI 绘图流程整合进一个直观易用的图形化平台。\n\n无论是希望快速上手的普通创作者、需要精细控制画面细节的设计师，还是想要深入探索模型潜力的开发者与研究人员，都能从中获益。其核心亮点在于极高的功能丰富度：不仅支持文生图、图生图、局部重绘（Inpainting）和外绘（Outpainting）等基础模式，还独创了注意力机制调整、提示词矩阵、负向提示词以及“高清修复”等高级功能。此外，它内置了 GFPGAN 和 CodeFormer 等人脸修复工具，支持多种神经网络放大算法，并允许用户通过插件系统无限扩展能力。即使是显存有限的设备，stable-diffusion-webui 也提供了相应的优化选项，让高质量的 AI 艺术创作变得触手可及。",162132,3,"2026-04-05T11:01:52",[13,14,15],"开发框架","图像","Agent","ready",{"id":18,"name":19,"github_repo":20,"description_zh":21,"stars":22,"difficulty_score":23,"last_commit_at":24,"category_tags":25,"status":16},1381,"everything-claude-code","affaan-m\u002Feverything-claude-code","everything-claude-code 是一套专为 AI 编程助手（如 Claude Code、Codex、Cursor 等）打造的高性能优化系统。它不仅仅是一组配置文件，而是一个经过长期实战打磨的完整框架，旨在解决 AI 代理在实际开发中面临的效率低下、记忆丢失、安全隐患及缺乏持续学习能力等核心痛点。\n\n通过引入技能模块化、直觉增强、记忆持久化机制以及内置的安全扫描功能，everything-claude-code 能显著提升 AI 在复杂任务中的表现，帮助开发者构建更稳定、更智能的生产级 AI 代理。其独特的“研究优先”开发理念和针对 Token 消耗的优化策略，使得模型响应更快、成本更低，同时有效防御潜在的攻击向量。\n\n这套工具特别适合软件开发者、AI 研究人员以及希望深度定制 AI 工作流的技术团队使用。无论您是在构建大型代码库，还是需要 AI 协助进行安全审计与自动化测试，everything-claude-code 都能提供强大的底层支持。作为一个曾荣获 Anthropic 黑客大奖的开源项目，它融合了多语言支持与丰富的实战钩子（hooks），让 AI 真正成长为懂上",138956,2,"2026-04-05T11:33:21",[13,15,26],"语言模型",{"id":28,"name":29,"github_repo":30,"description_zh":31,"stars":32,"difficulty_score":23,"last_commit_at":33,"category_tags":34,"status":16},2271,"ComfyUI","Comfy-Org\u002FComfyUI","ComfyUI 是一款功能强大且高度模块化的视觉 AI 引擎，专为设计和执行复杂的 Stable Diffusion 图像生成流程而打造。它摒弃了传统的代码编写模式，采用直观的节点式流程图界面，让用户通过连接不同的功能模块即可构建个性化的生成管线。\n\n这一设计巧妙解决了高级 AI 绘图工作流配置复杂、灵活性不足的痛点。用户无需具备编程背景，也能自由组合模型、调整参数并实时预览效果，轻松实现从基础文生图到多步骤高清修复等各类复杂任务。ComfyUI 拥有极佳的兼容性，不仅支持 Windows、macOS 和 Linux 全平台，还广泛适配 NVIDIA、AMD、Intel 及苹果 Silicon 等多种硬件架构，并率先支持 SDXL、Flux、SD3 等前沿模型。\n\n无论是希望深入探索算法潜力的研究人员和开发者，还是追求极致创作自由度的设计师与资深 AI 绘画爱好者，ComfyUI 都能提供强大的支持。其独特的模块化架构允许社区不断扩展新功能，使其成为当前最灵活、生态最丰富的开源扩散模型工具之一，帮助用户将创意高效转化为现实。",107662,"2026-04-03T11:11:01",[13,14,15],{"id":36,"name":37,"github_repo":38,"description_zh":39,"stars":40,"difficulty_score":23,"last_commit_at":41,"category_tags":42,"status":16},3704,"NextChat","ChatGPTNextWeb\u002FNextChat","NextChat 是一款轻量且极速的 AI 助手，旨在为用户提供流畅、跨平台的大模型交互体验。它完美解决了用户在多设备间切换时难以保持对话连续性，以及面对众多 AI 模型不知如何统一管理的痛点。无论是日常办公、学习辅助还是创意激发，NextChat 都能让用户随时随地通过网页、iOS、Android、Windows、MacOS 或 Linux 端无缝接入智能服务。\n\n这款工具非常适合普通用户、学生、职场人士以及需要私有化部署的企业团队使用。对于开发者而言，它也提供了便捷的自托管方案，支持一键部署到 Vercel 或 Zeabur 等平台。\n\nNextChat 的核心亮点在于其广泛的模型兼容性，原生支持 Claude、DeepSeek、GPT-4 及 Gemini Pro 等主流大模型，让用户在一个界面即可自由切换不同 AI 能力。此外，它还率先支持 MCP（Model Context Protocol）协议，增强了上下文处理能力。针对企业用户，NextChat 提供专业版解决方案，具备品牌定制、细粒度权限控制、内部知识库整合及安全审计等功能，满足公司对数据隐私和个性化管理的高标准要求。",87618,"2026-04-05T07:20:52",[13,26],{"id":44,"name":45,"github_repo":46,"description_zh":47,"stars":48,"difficulty_score":23,"last_commit_at":49,"category_tags":50,"status":16},2268,"ML-For-Beginners","microsoft\u002FML-For-Beginners","ML-For-Beginners 是由微软推出的一套系统化机器学习入门课程，旨在帮助零基础用户轻松掌握经典机器学习知识。这套课程将学习路径规划为 12 周，包含 26 节精炼课程和 52 道配套测验，内容涵盖从基础概念到实际应用的完整流程，有效解决了初学者面对庞大知识体系时无从下手、缺乏结构化指导的痛点。\n\n无论是希望转型的开发者、需要补充算法背景的研究人员，还是对人工智能充满好奇的普通爱好者，都能从中受益。课程不仅提供了清晰的理论讲解，还强调动手实践，让用户在循序渐进中建立扎实的技能基础。其独特的亮点在于强大的多语言支持，通过自动化机制提供了包括简体中文在内的 50 多种语言版本，极大地降低了全球不同背景用户的学习门槛。此外，项目采用开源协作模式，社区活跃且内容持续更新，确保学习者能获取前沿且准确的技术资讯。如果你正寻找一条清晰、友好且专业的机器学习入门之路，ML-For-Beginners 将是理想的起点。",84991,"2026-04-05T10:45:23",[14,51,52,53,15,54,26,13,55],"数据工具","视频","插件","其他","音频",{"id":57,"name":58,"github_repo":59,"description_zh":60,"stars":61,"difficulty_score":10,"last_commit_at":62,"category_tags":63,"status":16},3128,"ragflow","infiniflow\u002Fragflow","RAGFlow 是一款领先的开源检索增强生成（RAG）引擎，旨在为大语言模型构建更精准、可靠的上下文层。它巧妙地将前沿的 RAG 技术与智能体（Agent）能力相结合，不仅支持从各类文档中高效提取知识，还能让模型基于这些知识进行逻辑推理和任务执行。\n\n在大模型应用中，幻觉问题和知识滞后是常见痛点。RAGFlow 通过深度解析复杂文档结构（如表格、图表及混合排版），显著提升了信息检索的准确度，从而有效减少模型“胡编乱造”的现象，确保回答既有据可依又具备时效性。其内置的智能体机制更进一步，使系统不仅能回答问题，还能自主规划步骤解决复杂问题。\n\n这款工具特别适合开发者、企业技术团队以及 AI 研究人员使用。无论是希望快速搭建私有知识库问答系统，还是致力于探索大模型在垂直领域落地的创新者，都能从中受益。RAGFlow 提供了可视化的工作流编排界面和灵活的 API 接口，既降低了非算法背景用户的上手门槛，也满足了专业开发者对系统深度定制的需求。作为基于 Apache 2.0 协议开源的项目，它正成为连接通用大模型与行业专有知识之间的重要桥梁。",77062,"2026-04-04T04:44:48",[15,14,13,26,54],{"id":65,"github_repo":66,"name":67,"description_en":68,"description_zh":69,"ai_summary_zh":70,"readme_en":71,"readme_zh":72,"quickstart_zh":73,"use_case_zh":74,"hero_image_url":75,"owner_login":76,"owner_name":77,"owner_avatar_url":78,"owner_bio":79,"owner_company":80,"owner_location":80,"owner_email":80,"owner_twitter":76,"owner_website":81,"owner_url":82,"languages":83,"stars":102,"forks":103,"last_commit_at":104,"license":105,"difficulty_score":91,"env_os":106,"env_gpu":107,"env_ram":107,"env_deps":108,"category_tags":114,"github_topics":115,"view_count":123,"oss_zip_url":80,"oss_zip_packed_at":80,"status":16,"created_at":124,"updated_at":125,"faqs":126,"releases":156},2617,"rasbt\u002Fpython-machine-learning-book","python-machine-learning-book","The \"Python Machine Learning (1st edition)\"  book code repository and info resource","python-machine-learning-book 是经典著作《Python 机器学习》（第一版）的官方配套代码仓库与学习资源。它不仅仅提供了书中 400 多页内容的可执行代码示例，更致力于填补理论公式与实际编程之间的鸿沟，帮助读者真正掌握机器学习的核心原理。\n\n该项目主要解决了初学者在面对复杂算法时“懂理论却难落地”的痛点。通过提供从基础概念到最佳实践的完整路径，它引导用户利用 NumPy、scikit-learn 和 Theano 等主流库，将抽象的数学推导转化为可直接运行的 Python 代码。内容涵盖数据预处理、分类算法、降维技术以及模型评估等关键环节，让学习者能直观地看到算法如何在真实场景中发挥作用。\n\n这套资源非常适合希望系统入门机器学习的开发者、数据科学家以及相关领域的研究人员。如果你不满足于仅仅调用现成的 API，而是想深入理解算法背后的逻辑并掌握工业级的编码规范，python-machine-learning-book 将是极佳的起点。其独特的亮点在于强调“知其然更知其所以然”，在提供便捷 Jupyter Notebook 代码的同时，紧密结合书中的理论讲解，确","python-machine-learning-book 是经典著作《Python 机器学习》（第一版）的官方配套代码仓库与学习资源。它不仅仅提供了书中 400 多页内容的可执行代码示例，更致力于填补理论公式与实际编程之间的鸿沟，帮助读者真正掌握机器学习的核心原理。\n\n该项目主要解决了初学者在面对复杂算法时“懂理论却难落地”的痛点。通过提供从基础概念到最佳实践的完整路径，它引导用户利用 NumPy、scikit-learn 和 Theano 等主流库，将抽象的数学推导转化为可直接运行的 Python 代码。内容涵盖数据预处理、分类算法、降维技术以及模型评估等关键环节，让学习者能直观地看到算法如何在真实场景中发挥作用。\n\n这套资源非常适合希望系统入门机器学习的开发者、数据科学家以及相关领域的研究人员。如果你不满足于仅仅调用现成的 API，而是想深入理解算法背后的逻辑并掌握工业级的编码规范，python-machine-learning-book 将是极佳的起点。其独特的亮点在于强调“知其然更知其所以然”，在提供便捷 Jupyter Notebook 代码的同时，紧密结合书中的理论讲解，确保用户在动手实践中建立起扎实的知识体系。需要注意的是，本仓库对应的是 2015 年出版的第一版内容，若需最新技术栈可参考其第二版项目。","# Python Machine Learning book code repository\n\n\n[![Google Group](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002F-Google%20Group-lightgrey.svg)](https:\u002F\u002Fgroups.google.com\u002Fforum\u002F#!forum\u002Fpython-machine-learning-reader-discussion-board)\n\n---\n\n#### IMPORTANT NOTE (09\u002F21\u002F2017):\n\nThis GitHub repository contains the code examples of the **1st Edition** of Python Machine Learning book. If you are looking for the code examples of the **2nd Edition**, please refer to [this](https:\u002F\u002Fgithub.com\u002Frasbt\u002Fpython-machine-learning-book-2nd-edition#whats-new-in-the-second-edition-from-the-first-edition) repository instead. \n\n---\n\nWhat you can expect are 400 pages rich in useful material just about everything you need to know to get started with machine learning ... from theory to the actual code that you can directly put into action! This is not yet just another \"this is how scikit-learn works\" book. I aim to explain all the underlying concepts, tell you everything you need to know in terms of best practices and caveats, and\nwe will put those concepts into action mainly using NumPy, scikit-learn, and Theano.\n\nYou are not sure if this book is for you? Please checkout the excerpts from the [Foreword](.\u002Fdocs\u002Fforeword_ro.pdf) and [Preface](.\u002Fdocs\u002Fpreface_sr.pdf), or take a look at the [FAQ](#faq) section for further information.\n\n\n\n---\n\n[![](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Frasbt_python-machine-learning-book_readme_b8783021f2f7.jpg)](https:\u002F\u002Fwww.amazon.com\u002FPython-Machine-Learning-Sebastian-Raschka\u002Fdp\u002F1783555130\u002Fref=sr_1_1?ie=UTF8&qid=1470882464&sr=8-1&keywords=python+machine+learning)\n\n1st edition, published September 23rd 2015\u003Cbr>\nPaperback: 454 pages\u003Cbr>\nPublisher: Packt Publishing\u003Cbr>  \nLanguage: English\u003Cbr>\nISBN-10: 1783555130\u003Cbr>  \nISBN-13: 978-1783555130\u003Cbr>\nKindle ASIN: B00YSILNL0\u003Cbr>\n\n\u003Cbr>\n\n[![](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Frasbt_python-machine-learning-book_readme_d6695344e338.jpg)](http:\u002F\u002Fwww.computingreviews.com\u002Frecommend\u002Fbestof\u002Fnotableitems.cfm?bestYear=2016)\n\n\u003Cbr>\n\nGerman ISBN-13: 978-3958454224\u003Cbr>\nJapanese ISBN-13: 978-4844380603\u003Cbr>\nItalian ISBN-13: 978-8850333974\u003Cbr>\nChinese (traditional) ISBN-13: 978-9864341405\u003Cbr>\nChinese (mainland) ISBN-13: 978-7111558804\u003Cbr>\nKorean ISBN-13: 979-1187497035\u003Cbr>\nRussian ISBN-13: 978-5970604090\u003Cbr>\n\n\n\n## Table of Contents and Code Notebooks\n\n\nSimply click on the `ipynb`\u002F`nbviewer` links next to the chapter headlines to view the code examples (currently, the internal document links are only supported by the NbViewer version).\n**Please note that these are just the code examples accompanying the book, which I uploaded for your convenience; be aware that these notebooks may not be useful without the formulae and descriptive text.**   \n\n\n- Excerpts from the [Foreword](.\u002Fdocs\u002Fforeword_ro.pdf) and [Preface](.\u002Fdocs\u002Fpreface_sr.pdf)\n- [Instructions for setting up Python and the Jupiter Notebook](.\u002Fcode\u002Fch01\u002FREADME.md)  \n\n\u003Cbr>\n\n1. Machine Learning - Giving Computers the Ability to Learn from Data [[dir](.\u002Fcode\u002Fch01)] [[ipynb](.\u002Fcode\u002Fch01\u002Fch01.ipynb)] [[nbviewer](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Frasbt\u002Fpython-machine-learning-book\u002Fblob\u002Fmaster\u002Fcode\u002Fch01\u002Fch01.ipynb)]\n2. Training Machine Learning Algorithms for Classification [[dir](.\u002Fcode\u002Fch02)] [[ipynb](.\u002Fcode\u002Fch02\u002Fch02.ipynb)] [[nbviewer](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Frasbt\u002Fpython-machine-learning-book\u002Fblob\u002Fmaster\u002Fcode\u002Fch02\u002Fch02.ipynb)]\n3. A Tour of Machine Learning Classifiers Using Scikit-Learn [[dir](.\u002Fcode\u002Fch03)] [[ipynb](.\u002Fcode\u002Fch03\u002Fch03.ipynb)] [[nbviewer](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Frasbt\u002Fpython-machine-learning-book\u002Fblob\u002Fmaster\u002Fcode\u002Fch03\u002Fch03.ipynb)]\n4. Building Good Training Sets – Data Pre-Processing [[dir](.\u002Fcode\u002Fch04)] [[ipynb](.\u002Fcode\u002Fch04\u002Fch04.ipynb)] [[nbviewer](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Frasbt\u002Fpython-machine-learning-book\u002Fblob\u002Fmaster\u002Fcode\u002Fch04\u002Fch04.ipynb)]\n5. Compressing Data via Dimensionality Reduction [[dir](.\u002Fcode\u002Fch05)] [[ipynb](.\u002Fcode\u002Fch05\u002Fch05.ipynb)] [[nbviewer](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Frasbt\u002Fpython-machine-learning-book\u002Fblob\u002Fmaster\u002Fcode\u002Fch05\u002Fch05.ipynb)]\n6. Learning Best Practices for Model Evaluation and Hyperparameter Optimization [[dir](.\u002Fcode\u002Fch06)] [[ipynb](.\u002Fcode\u002Fch06\u002Fch06.ipynb)] [[nbviewer](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Frasbt\u002Fpython-machine-learning-book\u002Fblob\u002Fmaster\u002Fcode\u002Fch06\u002Fch06.ipynb)]\n7. Combining Different Models for Ensemble Learning [[dir](.\u002Fcode\u002Fch07)] [[ipynb](.\u002Fcode\u002Fch07\u002Fch07.ipynb)] [[nbviewer](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Frasbt\u002Fpython-machine-learning-book\u002Fblob\u002Fmaster\u002Fcode\u002Fch07\u002Fch07.ipynb)]\n8. Applying Machine Learning to Sentiment Analysis [[dir](.\u002Fcode\u002Fch08)] [[ipynb](.\u002Fcode\u002Fch08\u002Fch08.ipynb)] [[nbviewer](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Frasbt\u002Fpython-machine-learning-book\u002Fblob\u002Fmaster\u002Fcode\u002Fch08\u002Fch08.ipynb)]\n9. Embedding a Machine Learning Model into a Web Application [[dir](.\u002Fcode\u002Fch09)] [[ipynb](.\u002Fcode\u002Fch09\u002Fch09.ipynb)] [[nbviewer](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Frasbt\u002Fpython-machine-learning-book\u002Fblob\u002Fmaster\u002Fcode\u002Fch09\u002Fch09.ipynb)]\n10. Predicting Continuous Target Variables with Regression Analysis [[dir](.\u002Fcode\u002Fch10)] [[ipynb](.\u002Fcode\u002Fch10\u002Fch10.ipynb)] [[nbviewer](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Frasbt\u002Fpython-machine-learning-book\u002Fblob\u002Fmaster\u002Fcode\u002Fch10\u002Fch10.ipynb)]\n11. Working with Unlabeled Data – Clustering Analysis [[dir](.\u002Fcode\u002Fch11)] [[ipynb](.\u002Fcode\u002Fch11\u002Fch11.ipynb)] [[nbviewer](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Frasbt\u002Fpython-machine-learning-book\u002Fblob\u002Fmaster\u002Fcode\u002Fch11\u002Fch11.ipynb)]\n12. Training Artificial Neural Networks for Image Recognition [[dir](.\u002Fcode\u002Fch12)] [[ipynb](.\u002Fcode\u002Fch12\u002Fch12.ipynb)] [[nbviewer](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Frasbt\u002Fpython-machine-learning-book\u002Fblob\u002Fmaster\u002Fcode\u002Fch12\u002Fch12.ipynb)]\n13. Parallelizing Neural Network Training via Theano [[dir](.\u002Fcode\u002Fch13)] [[ipynb](.\u002Fcode\u002Fch13\u002Fch13.ipynb)] [[nbviewer](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Frasbt\u002Fpython-machine-learning-book\u002Fblob\u002Fmaster\u002Fcode\u002Fch13\u002Fch13.ipynb)]\n\n\u003Cbr>\n\n#### Equation Reference\n\n\u003Ca href=\"https:\u002F\u002Fgithub.com\u002Frasbt\u002Fpython-machine-learning-book\u002Ftree\u002Fmaster\u002Fdocs\u002Fequations\">\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Frasbt_python-machine-learning-book_readme_3bc0189ee2e0.png\" width=\"200\" height=\"200\" \u002F>\u003C\u002Fa>\n\n[[PDF](.\u002Fdocs\u002Fequations\u002Fpymle-equations.pdf)] [[TEX](.\u002Fdocs\u002Fequations\u002Fpymle-equations.tex)]\n\n#### Slides for Teaching\n\nA big thanks to [Dmitriy Dligach](dmitriydligach) for sharing his slides from his machine learning course that is currently offered at [Loyola University Chicago](http:\u002F\u002Fwww.luc.edu\u002Fcs\u002F). \n\n- [https:\u002F\u002Fgithub.com\u002Fdmitriydligach\u002FPyMLSlides](https:\u002F\u002Fgithub.com\u002Fdmitriydligach\u002FPyMLSlides)\n- \n\n\n\n#### Additional Math and NumPy Resources\n\nSome readers were asking about Math and NumPy primers, since they were not included due to length limitations. However, I recently put together such resources for another book, but I made these *chapters* freely available online in hope that they also serve as helpful background material for this book:\n\n\n- Algebra Basics [[PDF](https:\u002F\u002Fsebastianraschka.com\u002Fpdf\u002Fbooks\u002Fdlb\u002Fappendix_b_algebra.pdf)] [[EPUB](https:\u002F\u002Fsebastianraschka.com\u002Fpdf\u002Fbooks\u002Fdlb\u002Fappendix_b_algebra.epub)]\n\n- A Calculus and Differentiation Primer [[PDF](https:\u002F\u002Fsebastianraschka.com\u002Fpdf\u002Fbooks\u002Fdlb\u002Fappendix_d_calculus.pdf)] [[EPUB](https:\u002F\u002Fsebastianraschka.com\u002Fpdf\u002Fbooks\u002Fdlb\u002Fappendix_d_calculus.epub)]\n\n- Introduction to NumPy [[PDF](https:\u002F\u002Fsebastianraschka.com\u002Fpdf\u002Fbooks\u002Fdlb\u002Fappendix_f_numpy-intro.pdf)] [[EPUB](https:\u002F\u002Fsebastianraschka.com\u002Fpdf\u002Fbooks\u002Fdlb\u002Fappendix_f_numpy-intro.epub)] [[Code Notebook](https:\u002F\u002Fgithub.com\u002Frasbt\u002Fdeep-learning-book\u002Fblob\u002Fmaster\u002Fcode\u002Fappendix_f_numpy-intro\u002Fappendix_f_numpy-intro.ipynb)]\n\n\n\n---\n\n#### Citing this Book\n\nYou are very welcome to re-use the code snippets or other contents from this book\nin scientific publications and other works;\nin this case, I would appreciate citations to the original source:\n\n**BibTeX**:\n\n```\n@Book{raschka2015python,\n author = {Raschka, Sebastian},\n title = {Python Machine Learning},\n publisher = {Packt Publishing},\n year = {2015},\n address = {Birmingham, UK},\n isbn = {1783555130}\n }\n```\n\n\n**MLA**:\n\n\nRaschka, Sebastian. *Python machine learning*. Birmingham, UK: Packt Publishing, 2015. Print.\n\n---\n\n### [Feedback & Reviews](.\u002Fdocs\u002Ffeedback.md)\n\n#### [Short review snippets](.\u002Fdocs\u002Ffeedback.md)\n\n[![](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Frasbt_python-machine-learning-book_readme_f0e84a9e0501.png)](https:\u002F\u002Fwww.amazon.com\u002FPython-Machine-Learning-Sebastian-Raschka\u002Fdp\u002F1783555130\u002Fref=sr_1_1?ie=UTF8&qid=1472342570&sr=8-1&keywords=sebastian+raschka)\n\n---\n> *Sebastian Raschka’s new book, Python Machine Learning, has just been released. I got a chance to read a review copy and it’s just as I expected - really great! It’s well organized, super easy to follow, and it not only offers a good foundation for smart, non-experts, practitioners will get some ideas and learn new tricks here as well.*  \n– Lon Riesberg at [Data Elixir](http:\u002F\u002Fdataelixir.com\u002Fissues\u002F55#start)\n\n> *Superb job! Thus far, for me it seems to have hit the right balance of theory and practice…math and code!*   \n– [Brian Thomas](http:\u002F\u002Fsebastianraschka.com\u002Fblog\u002F2015\u002Fwriting-pymle.html#comment-2295668894)\n\n> *I've read (virtually) every Machine Learning title based around Scikit-learn and this is hands-down the best one out there.*    \n– [Jason Wolosonovich](https:\u002F\u002Fwww.linkedin.com\u002Fpulse\u002Fpython-machine-learning-sebastian-raschka-review-jason-wolosonovich?trk=prof-post)\n\n> *The best book I've seen to come out of PACKT Publishing. This is a very well written introduction to machine learning with Python. As others have noted, a perfect mixture of theory and application.*    \n– [Josh D.](https:\u002F\u002Fwww.amazon.com\u002Fgp\u002Fcustomer-reviews\u002FR27WB1GWTNGIR2\u002Fref=cm_cr_getr_d_rvw_ttl?ie=UTF8&ASIN=1783555130)\n\n> *A book with a blend of qualities that is hard to come by: combines the needed mathematics to control the theory with the applied coding in Python. Also great to see it doesn't waste paper in giving a primer on Python as many other books do just to appeal to the greater audience. You can tell it's been written by knowledgeable writers and not just DIY geeks.*    \n– [Amazon Customer](https:\u002F\u002Fwww.amazon.com\u002Fgp\u002Fcustomer-reviews\u002FRZWY4TF66Z6V0\u002Fref=cm_cr_getr_d_rvw_ttl?ie=UTF8&ASIN=1783555130)\n\n> *Sebastian Raschka created an amazing machine learning tutorial which combines theory with practice. The book explains machine learning from a theoretical perspective and has tons of coded examples to show how you would actually use the machine learning technique. It can be read by a beginner or advanced programmer.*\n- William P. Ross, [7 Must Read Python Books](http:\u002F\u002Fwilliampross.com\u002F7-must-read-python-books\u002F)\n\n#### Longer reviews\n\nIf you need help to decide whether this book is for you, check out some of the \"longer\" reviews linked below. (If you wrote a review, please let me know, and I'd be happy to add it to the list).\n\n- [Python Machine Learning Review](http:\u002F\u002Fwww.bcs.org\u002Fcontent\u002FconWebDoc\u002F55586) by Patrick Hill at the Chartered Institute for IT\n- [Book Review: Python Machine Learning by Sebastian Raschka](http:\u002F\u002Fwhatpixel.com\u002Fpython-machine-learning-book-review\u002F) by Alex Turner at WhatPixel\n\n---\n\n## Links\n\n- ebook and paperback at [Amazon.com](http:\u002F\u002Fwww.amazon.com\u002FPython-Machine-Learning-Sebastian-Raschka\u002Fdp\u002F1783555130\u002Fref=sr_1_2?ie=UTF8&qid=1437754343&sr=8-2&keywords=python+machine+learning+essentials), [Amazon.co.uk](http:\u002F\u002Fwww.amazon.co.uk\u002FPython-Machine-Learning-Sebastian-Raschka\u002Fdp\u002F1783555130), [Amazon.de](http:\u002F\u002Fwww.amazon.de\u002Fs\u002Fref=nb_sb_noss_2?__mk_de_DE=ÅMÅŽÕÑ&url=search-alias%3Daps&field-keywords=python+machine+learning)\n- [ebook and paperback](https:\u002F\u002Fwww.packtpub.com\u002Fbig-data-and-business-intelligence\u002Fpython-machine-learning) from Packt (the publisher)\n- at other book stores: [Google Books](https:\u002F\u002Fbooks.google.com\u002Fbooks?id=GOVOCwAAQBAJ&source=gbs_slider_cls_metadata_7_mylibrary), [O'Reilly](http:\u002F\u002Fshop.oreilly.com\u002Fproduct\u002F9781783555130.do), [Safari](https:\u002F\u002Fwww.safaribooksonline.com\u002Flibrary\u002Fview\u002Fpython-machine-learning\u002F9781783555130\u002F), [Barnes & Noble](http:\u002F\u002Fwww.barnesandnoble.com\u002Fw\u002Fpython-machine-learning-essentials-sebastian-raschka\u002F1121999969?ean=9781783555130), [Apple iBooks](https:\u002F\u002Fitunes.apple.com\u002Fus\u002Fbook\u002Fpython-machine-learning\u002Fid1028207310?mt=11), ...\n- social platforms: [Goodreads](https:\u002F\u002Fwww.goodreads.com\u002Fbook\u002Fshow\u002F25545994-python-machine-learning)\n\n#### Translations\n\n- [Italian translation](https:\u002F\u002Fwww.amazon.it\u002Flearning-Costruire-algoritmi-generare-conoscenza\u002Fdp\u002F8850333978\u002F) via \"Apogeo\"\n- [German translation](https:\u002F\u002Fwww.amazon.de\u002FMachine-Learning-Python-mitp-Professional\u002Fdp\u002F3958454224\u002F) via \"mitp Verlag\"\n- [Japanese translation](http:\u002F\u002Fwww.amazon.co.jp\u002Fgp\u002Fproduct\u002F4844380605\u002F) via \"Impress Top Gear\"\n- [Chinese translation (traditional Chinese)](https:\u002F\u002Ftaiwan.kinokuniya.com\u002Fbw\u002F9789864341405)\n- [Chinese translation (simple Chinese)](https:\u002F\u002Fbook.douban.com\u002Fsubject\u002F27000110\u002F)\n- [Korean translation](http:\u002F\u002Fwww.kyobobook.co.kr\u002Fproduct\u002FdetailViewKor.laf?mallGb=KOR&ejkGb=KOR&barcode=9791187497035) via \"Kyobo\"\n- [Polish translation](https:\u002F\u002Fwww.amazon.de\u002FPython-Uczenie-maszynowe-Sebastian-Raschka\u002Fdp\u002F8328336138\u002Fref=sr_1_11?ie=UTF8&qid=1513601461&sr=8-11&keywords=sebastian+raschka) via \"Helion\"\n\n---\n\n### [Literature References & Further Reading Resources](.\u002Fdocs\u002Freferences.md)\n\n### [Errata](.\u002Fdocs\u002Ferrata.md)\n\n\n---\n\n### Bonus Notebooks (not in the book)\n\n- Logistic Regression Implementation [[dir](.\u002Fcode\u002Fbonus)] [[ipynb](.\u002Fcode\u002Fbonus\u002Flogistic_regression.ipynb)] [[nbviewer](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Frasbt\u002Fpython-machine-learning-book\u002Fblob\u002Fmaster\u002Fcode\u002Fbonus\u002Flogistic_regression.ipynb)]\n- A Basic Pipeline and Grid Search Setup [[dir](.\u002Fcode\u002Fbonus)] [[ipynb](.\u002Fcode\u002Fbonus\u002Fsvm_iris_pipeline_and_gridsearch.ipynb)] [[nbviewer](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Frasbt\u002Fpython-machine-learning-book\u002Fblob\u002Fmaster\u002Fcode\u002Fbonus\u002Fsvm_iris_pipeline_and_gridsearch.ipynb)]\n- An Extended Nested Cross-Validation Example [[dir](.\u002Fcode\u002Fbonus)] [[ipynb](.\u002Fcode\u002Fbonus\u002Fnested_cross_validation.ipynb)] [[nbviewer](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Frasbt\u002Fpython-machine-learning-book\u002Fblob\u002Fmaster\u002Fcode\u002Fbonus\u002Fnested_cross_validation.ipynb)]\n- A Simple Barebones Flask Webapp Template [[view directory](.\u002Fcode\u002Fbonus\u002Fflask_webapp_ex01)][[download as zip-file](https:\u002F\u002Fgithub.com\u002Frasbt\u002Fpython-machine-learning-book\u002Fraw\u002Fmaster\u002Fcode\u002Fbonus\u002Fflask_webapp_ex01\u002Fflask_webapp_ex01.zip)]\n- Reading handwritten digits from MNIST into NumPy arrays [[GitHub ipynb](.\u002Fcode\u002Fbonus\u002Freading_mnist.ipynb)] [[nbviewer](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Frasbt\u002Fpython-machine-learning-book\u002Fblob\u002Fmaster\u002Fcode\u002Fbonus\u002Freading_mnist.ipynb)]\n- Scikit-learn Model Persistence using JSON [[GitHub ipynb](.\u002Fcode\u002Fbonus\u002Fscikit-model-to-json.ipynb)] [[nbviewer](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Frasbt\u002Fpython-machine-learning-book\u002Fblob\u002Fmaster\u002Fcode\u002Fbonus\u002Fscikit-model-to-json.ipynb)]\n- Multinomial logistic regression \u002F softmax regression [[GitHub ipynb](.\u002Fcode\u002Fbonus\u002Fsoftmax-regression.ipynb)] [[nbviewer](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Frasbt\u002Fpython-machine-learning-book\u002Fblob\u002Fmaster\u002Fcode\u002Fbonus\u002Fsoftmax-regression.ipynb)]\n\n\u003Chr>\n\n**\"Related Content\" (not in the book)**\n\n- [Model evaluation, model selection, and algorithm selection in machine learning - Part I](http:\u002F\u002Fsebastianraschka.com\u002Fblog\u002F2016\u002Fmodel-evaluation-selection-part1.html)\n- [Model evaluation, model selection, and algorithm selection in machine learning - Part II](http:\u002F\u002Fsebastianraschka.com\u002Fblog\u002F2016\u002Fmodel-evaluation-selection-part2.html)\n- [Model evaluation, model selection, and algorithm selection in machine learning - Part III](http:\u002F\u002Fsebastianraschka.com\u002Fblog\u002F2016\u002Fmodel-evaluation-selection-part3.html)\n\n---\n\n#### SciPy 2016\n\nWe had such a great time at [SciPy 2016](http:\u002F\u002Fscipy2016.scipy.org\u002Fehome\u002Findex.php?eventid=146062&tabid=332930&) in Austin! It was a real pleasure to meet and chat with so many readers of my book. Thanks so much for all the nice words and feedback! And in case you missed it, Andreas Mueller and I gave an **Introduction to Machine Learning with Scikit-learn**; if you are interested, the video recordings of [Part I](https:\u002F\u002Fwww.youtube.com\u002Fwatch?v=OB1reY6IX-o&index=91&list=PLYx7XA2nY5Gf37zYZMw6OqGFRPjB1jCy6) and [Part II](https:\u002F\u002Fwww.youtube.com\u002Fwatch?v=Cte8FYCpylk&list=PLYx7XA2nY5Gf37zYZMw6OqGFRPjB1jCy6&index=90) are now online!\n\n[![](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Frasbt_python-machine-learning-book_readme_cada073f5023.jpg)](https:\u002F\u002Fwww.youtube.com\u002Fwatch?v=OB1reY6IX-o&index=91&list=PLYx7XA2nY5Gf37zYZMw6OqGFRPjB1jCy6)\n\n#### PyData Chicago 2016\n\nI attempted the rather challenging task of introducing scikit-learn & machine learning in *just* 90 minutes at PyData Chicago 2016. The slides and tutorial material are available at \"[Learning scikit-learn -- An Introduction to Machine Learning in Python](https:\u002F\u002Fgithub.com\u002Frasbt\u002Fpydata-chicago2016-ml-tutorial).\"\n\n\n---\n\n**Note**\n\nI have set up a separate library, [`mlxtend`](http:\u002F\u002Frasbt.github.io\u002Fmlxtend\u002F), containing additional implementations of machine learning (and general \"data science\") algorithms. I also added implementations from this book (for example, the decision region plot, the artificial neural network, and sequential feature selection algorithms) with additional functionality.\n\n[![](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Frasbt_python-machine-learning-book_readme_a1d9094a832d.png)](http:\u002F\u002Frasbt.github.io\u002Fmlxtend\u002F)\n\n\n\u003Cbr>\n\n\u003Chr>\n\n### Translations\n\n[![](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Frasbt_python-machine-learning-book_readme_d4ffd9ecf0c1.jpg)](https:\u002F\u002Fwww.amazon.it\u002Flearning-Costruire-algoritmi-generare-conoscenza\u002Fdp\u002F8850333978\u002F)\n[![](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Frasbt_python-machine-learning-book_readme_a3c446a39c81.jpg)](https:\u002F\u002Fwww.amazon.de\u002FMachine-Learning-Python-mitp-Professional\u002Fdp\u002F3958454224\u002F)\n[![](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Frasbt_python-machine-learning-book_readme_2bb0137aa603.jpg)](http:\u002F\u002Fwww.amazon.co.jp\u002Fgp\u002Fproduct\u002F4844380605\u002F)\n[![](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Frasbt_python-machine-learning-book_readme_bff6ecf257f3.jpg)](https:\u002F\u002Ftaiwan.kinokuniya.com\u002Fbw\u002F9789864341405)\n[![](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Frasbt_python-machine-learning-book_readme_386c632895e0.jpg)](https:\u002F\u002Fbook.douban.com\u002Fsubject\u002F27000110\u002F)\n[![](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Frasbt_python-machine-learning-book_readme_7f0a56ac9b43.jpg)](http:\u002F\u002Fwww.kyobobook.co.kr\u002Fproduct\u002FdetailViewKor.laf?ejkGb=KOR&mallGb=KOR&barcode=9791187497035&orderClick=LEA&Kc=)\n[![](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Frasbt_python-machine-learning-book_readme_cf483b1494d3.jpg)](http:\u002F\u002Fwww.ozon.ru\u002Fcontext\u002Fdetail\u002Fid\u002F140152222\u002F)\n[![](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Frasbt_python-machine-learning-book_readme_09815da64957.jpg)](https:\u002F\u002Fwww.amazon.de\u002FPython-Uczenie-maszynowe-Sebastian-Raschka\u002Fdp\u002F8328336138\u002Fref=sr_1_11?ie=UTF8&qid=1513601461&sr=8-11&keywords=sebastian+raschka)\n\n\u003Chr>\n\n---\n\n***Dear readers***,  \nfirst of all, I want to thank all of you for the great support! I am really happy about all the great feedback you sent me so far, and I am glad that the book has been so useful to a broad audience.\n\nOver the last couple of months, I received hundreds of emails, and I tried to answer as many as possible in the available time I have. To make them useful to other readers as well, I collected many of my answers in the FAQ section (below).\n\nIn addition, some of you asked me about a platform for readers to discuss the contents of the book. I hope that this would provide an opportunity for you to discuss and share your knowledge with other readers:\n\n#### [Google Groups Discussion Board](https:\u002F\u002Fgroups.google.com\u002Fforum\u002F#!forum\u002Fpython-machine-learning-reader-discussion-board)\n\n(And I will try my best to answer questions myself if time allows! :))\n\n> The only thing to do with good advice is to pass it on. It is never of any use to oneself.  \n— Oscar Wilde\n\n---\n\n## Examples and Applications by Readers\n\nOnce again, I have to say (big!) THANKS for all the nice feedback about the book. I've received many emails from readers, who\nput the concepts and examples from this book out into the real world and make good use of them in their projects. In this section, I am\nstarting to gather some of these great applications, and I'd be more than happy to add your project to this list -- just shoot me a quick mail!\n\n- [40 scripts on Optical Character Recognition](https:\u002F\u002Fgithub.com\u002Frrlyman\u002FPythonMachineLearingExamples) by [Richard Lyman](https:\u002F\u002Fgithub.com\u002Frrlyman)\n- [Code experiments](https:\u002F\u002Fgithub.com\u002Fjeremyn\u002Fpython-machine-learning-book) by [Jeremy Nation](https:\u002F\u002Fgithub.com\u002Fjeremyn)\n- [What I Learned Implementing a Classifier from Scratch in Python](http:\u002F\u002Fwww.jeannicholashould.com) by [Jean-Nicholas Hould](http:\u002F\u002Fwww.jeannicholashould.com)\n\n## FAQ\n\n### General Questions\n\n- [What are machine learning and data science?](.\u002Ffaq\u002Fdatascience-ml.md)\n- [Why do you and other people sometimes implement machine learning algorithms from scratch?](.\u002Ffaq\u002Fimplementing-from-scratch.md)\n- [What learning path\u002Fdiscipline in data science I should focus on?](.\u002Ffaq\u002Fdata-science-career.md)\n- [At what point should one start contributing to open source?](.\u002Ffaq\u002Fopen-source.md)\n- [How important do you think having a mentor is to the learning process?](.\u002Ffaq\u002Fmentor.md)\n- [Where are the best online communities centered around data science\u002Fmachine learning or python?](.\u002Ffaq\u002Fml-python-communities.md)\n- [How would you explain machine learning to a software engineer?](.\u002Ffaq\u002Fml-to-a-programmer.md)\n- [How would your curriculum for a machine learning beginner look like?](.\u002Ffaq\u002Fml-curriculum.md)\n- [What is the Definition of Data Science?](.\u002Ffaq\u002Fdefinition_data-science.md)\n- [How do Data Scientists perform model selection? Is it different from Kaggle?](.\u002Ffaq\u002Fmodel-selection-in-datascience.md)\n\n### Questions about the Machine Learning Field\n\n- [How are Artificial Intelligence and Machine Learning related?](.\u002Ffaq\u002Fai-and-ml.md)\n- [What are some real-world examples of applications of machine learning in the field?](.\u002Ffaq\u002Fml-examples.md)\n- [What are the different fields of study in data mining?](.\u002Ffaq\u002Fdatamining-overview.md)\n- [What are differences in research nature between the two fields: machine learning & data mining?](.\u002Ffaq\u002Fdatamining-vs-ml.md)\n- [How do I know if the problem is solvable through machine learning?](.\u002Ffaq\u002Fml-solvable.md)\n- [What are the origins of machine learning?](.\u002Ffaq\u002Fml-origins.md)\n- [How was classification, as a learning machine, developed?](.\u002Ffaq\u002Fclassifier-history.md)\n- [Which machine learning algorithms can be considered as among the best?](.\u002Ffaq\u002Fbest-ml-algo.md)\n- [What are the broad categories of classifiers?](.\u002Ffaq\u002Fclassifier-categories.md)\n- [What is the difference between a classifier and a model?](.\u002Ffaq\u002Fdifference_classifier_model.md)\n- [What is the difference between a parametric learning algorithm and a nonparametric learning algorithm?](.\u002Ffaq\u002Fparametric_vs_nonparametric.md)\n- [What is the difference between a cost function and a loss function in machine learning?](.\u002Ffaq\u002Fcost-vs-loss.md)\n\n### Questions about ML Concepts and Statistics\n\n##### Cost Functions and Optimization\n\n- [Fitting a model via closed-form equations vs. Gradient Descent vs Stochastic Gradient Descent vs Mini-Batch Learning -- what is the difference?](.\u002Ffaq\u002Fclosed-form-vs-gd.md)\n- [How do you derive the Gradient Descent rule for Linear Regression and Adaline?](.\u002Ffaq\u002Flinear-gradient-derivative.md)\n\n##### Regression Analysis\n\n- [What is the difference between Pearson R and Simple Linear Regression?](.\u002Ffaq\u002Fpearson-r-vs-linear-regr.md)\n\n##### Tree models\n\n- [How does the random forest model work? How is it different from bagging and boosting in ensemble models?](.\u002Ffaq\u002Fbagging-boosting-rf.md)\n- [What are the disadvantages of using classic decision tree algorithm for a large dataset?](.\u002Ffaq\u002Fdecision-tree-disadvantages.md)\n- [Why are implementations of decision tree algorithms usually binary, and what are the advantages of the different impurity metrics?](.\u002Ffaq\u002Fdecision-tree-binary.md)\n- [Why are we growing decision trees via entropy instead of the classification error?](.\u002Ffaq\u002Fdecisiontree-error-vs-entropy.md)\n- [When can a random forest perform terribly?](.\u002Ffaq\u002Frandom-forest-perform-terribly.md)\n\n##### Model evaluation\n\n- [What is overfitting?](.\u002Ffaq\u002Foverfitting.md)\n- [How can I avoid overfitting?](.\u002Ffaq\u002Favoid-overfitting.md)\n- [Is it always better to have the largest possible number of folds when performing cross validation?](.\u002Ffaq\u002Fnumber-of-kfolds.md)\n- [When training an SVM classifier, is it better to have a large or small number of support vectors?](.\u002Ffaq\u002Fnum-support-vectors.md)\n- [How do I evaluate a model?](.\u002Ffaq\u002Fevaluate-a-model.md)\n- [What is the best validation metric for multi-class classification?](.\u002Ffaq\u002Fmulticlass-metric.md)\n- [What factors should I consider when choosing a predictive model technique?](.\u002Ffaq\u002Fchoosing-technique.md)\n- [What are the best toy datasets to help visualize and understand classifier behavior?](.\u002Ffaq\u002Fclf-behavior-data.md)\n- [How do I select SVM kernels?](.\u002Ffaq\u002Fselect_svm_kernels.md)\n- [Interlude: Comparing and Computing Performance Metrics in Cross-Validation -- Imbalanced Class Problems and 3 Different Ways to Compute the F1 Score](.\u002Ffaq\u002Fcomputing-the-f1-score.md)\n\n##### Logistic Regression\n\n- [What is Softmax regression and how is it related to Logistic regression?](.\u002Ffaq\u002Fsoftmax_regression.md)\n- [Why is logistic regression considered a linear model?](.\u002Ffaq\u002Flogistic_regression_linear.md)\n- [What is the probabilistic interpretation of regularized logistic regression?](.\u002Ffaq\u002Fprobablistic-logistic-regression.md)\n- [Does regularization in logistic regression always results in better fit and better generalization?](.\u002Ffaq\u002Fregularized-logistic-regression-performance.md)\n- [What is the major difference between naive Bayes and logistic regression?](.\u002Ffaq\u002Fnaive-bayes-vs-logistic-regression.md)\n- [What exactly is the \"softmax and the multinomial logistic loss\" in the context of machine learning?](.\u002Ffaq\u002Fsoftmax.md)\n- [What is the relation between Logistic Regression and Neural Networks and when to use which?](.\u002Ffaq\u002Flogisticregr-neuralnet.md)\n- [Logistic Regression: Why sigmoid function?](.\u002Ffaq\u002Flogistic-why-sigmoid.md)\n- [Is there an analytical solution to Logistic Regression similar to the Normal Equation for Linear Regression?](.\u002Ffaq\u002Flogistic-analytical.md)\n\n\n##### Neural Networks and Deep Learning\n\n- [What is the difference between deep learning and usual machine learning?](.\u002Ffaq\u002Fdifference-deep-and-normal-learning.md)\n- [Can you give a visual explanation for the back propagation algorithm for neural networks?](.\u002Ffaq\u002Fvisual-backpropagation.md)\n- [Why did it take so long for deep networks to be invented?](.\u002Ffaq\u002Finventing-deeplearning.md)\n- [What are some good books\u002Fpapers for learning deep learning?](.\u002Ffaq\u002Fdeep-learning-resources.md)\n- [Why are there so many deep learning libraries?](.\u002Ffaq\u002Fmany-deeplearning-libs.md)\n- [Why do some people hate neural networks\u002Fdeep learning?](.\u002Ffaq\u002Fdeeplearning-criticism.md)\n- [How can I know if Deep Learning works better for a specific problem than SVM or random forest?](.\u002Ffaq\u002Fdeeplearn-vs-svm-randomforest.md)\n- [What is wrong when my neural network's error increases?](.\u002Ffaq\u002Fneuralnet-error.md)\n- [How do I debug an artificial neural network algorithm?](.\u002Ffaq\u002Fnnet-debugging-checklist.md)\n- [What is the difference between a Perceptron, Adaline, and neural network model?](.\u002Ffaq\u002Fdiff-perceptron-adaline-neuralnet.md)\n- [What is the basic idea behind the dropout technique?](.\u002Ffaq\u002Fdropout.md)\n\n\n##### Other Algorithms for Supervised Learning\n\n- [Why is Nearest Neighbor a Lazy Algorithm?](.\u002Ffaq\u002Flazy-knn.md)\n\n##### Unsupervised Learning\n\n- [What are some of the issues with clustering?](.\u002Ffaq\u002Fissues-with-clustering.md)\n\n##### Semi-Supervised Learning\n\n- [What are the advantages of semi-supervised learning over supervised and unsupervised learning?](.\u002Ffaq\u002Fsemi-vs-supervised.md)\n\n##### Ensemble Methods\n\n- [Is Combining Classifiers with Stacking Better than Selecting the Best One?](.\u002Ffaq\u002Flogistic-boosting.md)\n\n##### Preprocessing, Feature Selection and Extraction\n\n- [Why do we need to re-use training parameters to transform test data?](.\u002Ffaq\u002Fscale-training-test.md)\n- [What are the different dimensionality reduction methods in machine learning?](.\u002Ffaq\u002Fdimensionality-reduction.md)\n- [What is the difference between LDA and PCA for dimensionality reduction?](.\u002Ffaq\u002Flda-vs-pca.md)\n- [When should I apply data normalization\u002Fstandardization?](.\u002Ffaq\u002Fwhen-to-standardize.md)\n- [Does mean centering or feature scaling affect a Principal Component Analysis?](.\u002Ffaq\u002Fpca-scaling.md)\n- [How do you attack a machine learning problem with a large number of features?](.\u002Ffaq\u002Flarge-num-features.md)\n- [What are some common approaches for dealing with missing data?](.\u002Ffaq\u002Fmissing-data.md)\n- [What is the difference between filter, wrapper, and embedded methods for feature selection?](.\u002Ffaq\u002Ffeature_sele_categories.md)\n- [Should data preparation\u002Fpre-processing step be considered one part of feature engineering? Why or why not?](.\u002Ffaq\u002Fdataprep-vs-dataengin.md)\n- [Is a bag of words feature representation for text classification considered as a sparse matrix?](.\u002Ffaq\u002Fbag-of-words-sparsity.md)\n\n##### Naive Bayes\n\n- [Why is the Naive Bayes Classifier naive?](.\u002Ffaq\u002Fnaive-naive-bayes.md)\n- [What is the decision boundary for Naive Bayes?](.\u002Ffaq\u002Fnaive-bayes-boundary.md)\n- [Can I use Naive Bayes classifiers for mixed variable types?](.\u002Ffaq\u002Fnaive-bayes-vartypes.md)\n- [Is it possible to mix different variable types in Naive Bayes, for example, binary and continues features?](.\u002Fnaive-bayes-vartypes.md)\n\n##### Other\n\n- [What is Euclidean distance in terms of machine learning?](.\u002Ffaq\u002Feuclidean-distance.md)\n- [When should one use median, as opposed to the mean or average?](.\u002Ffaq\u002Fmedian-vs-mean.md)\n\n##### Programming Languages and Libraries for Data Science and Machine Learning\n\n- [Is R used extensively today in data science?](.\u002Ffaq\u002Fr-in-datascience.md)\n- [What is the main difference between TensorFlow and scikit-learn?](.\u002Ffaq\u002Ftensorflow-vs-scikitlearn.md)\n\n\u003Cbr>\n\n\n\n\n\n### Questions about the Book\n\n- [Can I use paragraphs and images from the book in presentations or my blog?](.\u002Ffaq\u002Fcopyright.md)\n- [How is this different from other machine learning books?](.\u002Ffaq\u002Fdifferent.md)\n- [Which version of Python was used in the code examples?](.\u002Ffaq\u002Fpy2py3.md)\n- [Which technologies and libraries are being used?](.\u002Ffaq\u002Ftechnologies.md)\n- [Which book version\u002Fformat would you recommend?](.\u002Ffaq\u002Fversion.md)\n- [Why did you choose Python for machine learning?](.\u002Ffaq\u002Fwhy-python.md)\n- [Why do you use so many leading and trailing underscores in the code examples?](.\u002Ffaq\u002Funderscore-convention.md)\n- [What is the purpose of the `return self` idioms in your code examples?](.\u002Ffaq\u002Freturn_self_idiom.md)\n- [Are there any prerequisites and recommended pre-readings?](.\u002Ffaq\u002Fprerequisites.md)\n- [How can I apply SVM to categorical data?](.\u002Ffaq\u002Fsvm_for_categorical.md)\n\n\n## Contact\n\nI am happy to answer questions! Just write me an [email](mailto:mail@sebastianraschka.com)\nor consider asking the question on the [Google Groups Email List](https:\u002F\u002Fgroups.google.com\u002Fforum\u002F#!forum\u002Fpython-machine-learning-book).\n\nIf you are interested in keeping in touch, I have quite a lively twitter stream ([@rasbt](https:\u002F\u002Ftwitter.com\u002Frasbt)) all about data science and machine learning. I also maintain a [blog](http:\u002F\u002Fsebastianraschka.com\u002Farticles.html) where I post all of the things I am particularly excited about.\n","# Python机器学习书籍代码仓库\n\n\n[![Google Group](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002F-Google%20Group-lightgrey.svg)](https:\u002F\u002Fgroups.google.com\u002Fforum\u002F#!forum\u002Fpython-machine-learning-reader-discussion-board)\n\n---\n\n#### 重要提示（2017年9月21日）：\n\n本GitHub仓库包含的是《Python机器学习》**第一版**的代码示例。如果您正在寻找**第二版**的代码示例，请参阅[此仓库](https:\u002F\u002Fgithub.com\u002Frasbt\u002Fpython-machine-learning-book-2nd-edition#whats-new-in-the-second-edition-from-the-first-edition)。\n\n---\n\n您将在这里找到400页内容丰富、实用的材料，几乎涵盖了您入门机器学习所需的一切——从理论到可以直接上手的代码！这并非又一本“如何使用scikit-learn”的书。我的目标是深入浅出地讲解所有底层概念，告诉您在最佳实践和注意事项方面需要了解的一切，并且我们将主要使用NumPy、scikit-learn和Theano来把这些概念付诸实践。\n\n不确定这本书是否适合您？请查看来自[前言](.\u002Fdocs\u002Fforeword_ro.pdf)和[序言](.\u002Fdocs\u002Fpreface_sr.pdf)的节选，或参阅下方的[常见问题解答](#faq)部分以获取更多信息。\n\n\n\n---\n\n[![](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Frasbt_python-machine-learning-book_readme_b8783021f2f7.jpg)](https:\u002F\u002Fwww.amazon.com\u002FPython-Machine-Learning-Sebastian-Raschka\u002Fdp\u002F1783555130\u002Fref=sr_1_1?ie=UTF8&qid=1470882464&sr=8-1&keywords=python+machine+learning)\n\n第一版，出版于2015年9月23日\u003Cbr>\n平装本：454页\u003Cbr>\n出版社：Packt Publishing\u003Cbr>  \n语言：英语\u003Cbr>\nISBN-10：1783555130\u003Cbr>  \nISBN-13：978-1783555130\u003Cbr>\nKindle ASIN：B00YSILNL0\u003Cbr>\n\n\u003Cbr>\n\n[![](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Frasbt_python-machine-learning-book_readme_d6695344e338.jpg)](http:\u002F\u002Fwww.computingreviews.com\u002Frecommend\u002Fbestof\u002Fnotableitems.cfm?bestYear=2016)\n\n\u003Cbr>\n\n德语ISBN-13：978-3958454224\u003Cbr>\n日语ISBN-13：978-4844380603\u003Cbr>\n意大利语ISBN-13：978-8850333974\u003Cbr>\n繁体中文ISBN-13：978-9864341405\u003Cbr>\n简体中文ISBN-13：978-71111558804\u003Cbr>\n韩语ISBN-13：979-1187497035\u003Cbr>\n俄语ISBN-13：978-5970604090\u003Cbr>\n\n## 目录与代码笔记本\n\n\n只需点击章节标题旁边的 `ipynb`\u002F`nbviewer` 链接即可查看代码示例（目前，内部文档链接仅在 NbViewer 版本中受支持）。\n**请注意，这些只是随书附带的代码示例，我上传它们是为了方便大家；请务必注意，如果没有公式和说明文字，这些笔记本可能无法发挥作用。**   \n\n\n- 摘自[前言](.\u002Fdocs\u002Fforeword_ro.pdf)和[序言](.\u002Fdocs\u002Fpreface_sr.pdf)\n- [Python 和 Jupiter Notebook 的安装说明](.\u002Fcode\u002Fch01\u002FREADME.md)  \n\n\u003Cbr>\n\n1. 机器学习——赋予计算机从数据中学习的能力 [[目录](.\u002Fcode\u002Fch01)] [[ipynb](.\u002Fcode\u002Fch01\u002Fch01.ipynb)] [[nbviewer](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Frasbt\u002Fpython-machine-learning-book\u002Fblob\u002Fmaster\u002Fcode\u002Fch01\u002Fch01.ipynb)]\n2. 训练用于分类的机器学习算法 [[目录](.\u002Fcode\u002Fch02)] [[ipynb](.\u002Fcode\u002Fch02\u002Fch02.ipynb)] [[nbviewer](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Frasbt\u002Fpython-machine-learning-book\u002Fblob\u002Fmaster\u002Fcode\u002Fch02\u002Fch02.ipynb)]\n3. 使用 Scikit-Learn 探索机器学习分类器 [[目录](.\u002Fcode\u002Fch03)] [[ipynb](.\u002Fcode\u002Fch03\u002Fch03.ipynb)] [[nbviewer](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Frasbt\u002Fpython-machine-learning-book\u002Fblob\u002Fmaster\u002Fcode\u002Fch03\u002Fch03.ipynb)]\n4. 构建高质量训练集——数据预处理 [[目录](.\u002Fcode\u002Fch04)] [[ipynb](.\u002Fcode\u002Fch04\u002Fch04.ipynb)] [[nbviewer](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Frasbt\u002Fpython-machine-learning-book\u002Fblob\u002Fmaster\u002Fcode\u002Fch04\u002Fch04.ipynb)]\n5. 通过降维压缩数据 [[目录](.\u002Fcode\u002Fch05)] [[ipynb](.\u002Fcode\u002Fch05\u002Fch05.ipynb)] [[nbviewer](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Frasbt\u002Fpython-machine-learning-book\u002Fblob\u002Fmaster\u002Fcode\u002Fch05\u002Fch05.ipynb)]\n6. 学习模型评估与超参数优化的最佳实践 [[目录](.\u002Fcode\u002Fch06)] [[ipynb](.\u002Fcode\u002Fch06\u002Fch06.ipynb)] [[nbviewer](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Frasbt\u002Fpython-machine-learning-book\u002Fblob\u002Fmaster\u002Fcode\u002Fch06\u002Fch06.ipynb)]\n7. 结合不同模型进行集成学习 [[目录](.\u002Fcode\u002Fch07)] [[ipynb](.\u002Fcode\u002Fch07\u002Fch07.ipynb)] [[nbviewer](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Frasbt\u002Fpython-machine-learning-book\u002Fblob\u002Fmaster\u002Fcode\u002Fch07\u002Fch07.ipynb)]\n8. 将机器学习应用于情感分析 [[目录](.\u002Fcode\u002Fch08)] [[ipynb](.\u002Fcode\u002Fch08\u002Fch08.ipynb)] [[nbviewer](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Frasbt\u002Fpython-machine-learning-book\u002Fblob\u002Fmaster\u002Fcode\u002Fch08\u002Fch08.ipynb)]\n9. 将机器学习模型嵌入 Web 应用程序 [[目录](.\u002Fcode\u002Fch09)] [[ipynb](.\u002Fcode\u002Fch09\u002Fch09.ipynb)] [[nbviewer](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Frasbt\u002Fpython-machine-learning-book\u002Fblob\u002Fmaster\u002Fcode\u002Fch09\u002Fch09.ipynb)]\n10. 使用回归分析预测连续型目标变量 [[目录](.\u002Fcode\u002Fch10)] [[ipynb](.\u002Fcode\u002Fch10\u002Fch10.ipynb)] [[nbviewer](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Frasbt\u002Fpython-machine-learning-book\u002Fblob\u002Fmaster\u002Fcode\u002Fch10\u002Fch10.ipynb)]\n11. 处理无标签数据——聚类分析 [[目录](.\u002Fcode\u002Fch11)] [[ipynb](.\u002Fcode\u002Fch11\u002Fch11.ipynb)] [[nbviewer](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Frasbt\u002Fpython-machine-learning-book\u002Fblob\u002Fmaster\u002Fcode\u002Fch11\u002Fch11.ipynb)]\n12. 训练人工神经网络进行图像识别 [[目录](.\u002Fcode\u002Fch12)] [[ipynb](.\u002Fcode\u002Fch12\u002Fch12.ipynb)] [[nbviewer](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Frasbt\u002Fpython-machine-learning-book\u002Fblob\u002Fmaster\u002Fcode\u002Fch12\u002Fch12.ipynb)]\n13. 通过 Theano 并行化神经网络训练 [[目录](.\u002Fcode\u002Fch13)] [[ipynb](.\u002Fcode\u002Fch13\u002Fch13.ipynb)] [[nbviewer](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Frasbt\u002Fpython-machine-learning-book\u002Fblob\u002Fmaster\u002Fcode\u002Fch13\u002Fch13.ipynb)]\n\n\u003Cbr>\n\n#### 公式参考\n\n\u003Ca href=\"https:\u002F\u002Fgithub.com\u002Frasbt\u002Fpython-machine-learning-book\u002Ftree\u002Fmaster\u002Fdocs\u002Fequations\">\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Frasbt_python-machine-learning-book_readme_3bc0189ee2e0.png\" width=\"200\" height=\"200\" \u002F>\u003C\u002Fa>\n\n[[PDF](.\u002Fdocs\u002Fequations\u002Fpymle-equations.pdf)] [[TEX](.\u002Fdocs\u002Fequations\u002Fpymle-equations.tex)]\n\n#### 教学幻灯片\n\n非常感谢 [Dmitriy Dligach](dmitriydligach) 分享他在 [芝加哥洛约拉大学](http:\u002F\u002Fwww.luc.edu\u002Fcs\u002F) 开设的机器学习课程的幻灯片。\n\n- [https:\u002F\u002Fgithub.com\u002Fdmitriydligach\u002FPyMLSlides](https:\u002F\u002Fgithub.com\u002Fdmitriydligach\u002FPyMLSlides)\n- \n\n\n\n#### 数学与 NumPy 补充资源\n\n一些读者询问了数学和 NumPy 的入门资料，因为受限于篇幅并未收录。不过，我最近为另一本书整理了相关资源，并将这些*章节*免费在线提供，希望也能作为本书的有益背景材料：\n\n\n- 代数基础 [[PDF](https:\u002F\u002Fsebastianraschka.com\u002Fpdf\u002Fbooks\u002Fdlb\u002Fappendix_b_algebra.pdf)] [[EPUB](https:\u002F\u002Fsebastianraschka.com\u002Fpdf\u002Fbooks\u002Fdlb\u002Fappendix_b_algebra.epub)]\n\n- 微积分与微分入门 [[PDF](https:\u002F\u002Fsebastianraschka.com\u002Fpdf\u002Fbooks\u002Fdlb\u002Fappendix_d_calculus.pdf)] [[EPUB](https:\u002F\u002Fsebastianraschka.com\u002Fpdf\u002Fbooks\u002Fdlb\u002Fappendix_d_calculus.epub)]\n\n- NumPy 入门 [[PDF](https:\u002F\u002Fsebastianraschka.com\u002Fpdf\u002Fbooks\u002Fdlb\u002Fappendix_f_numpy-intro.pdf)] [[EPUB](https:\u002F\u002Fsebastianraschka.com\u002Fpdf\u002Fbooks\u002Fdlb\u002Fappendix_f_numpy-intro.epub)] [[代码笔记本](https:\u002F\u002Fgithub.com\u002Frasbt\u002Fdeep-learning-book\u002Fblob\u002Fmaster\u002Fcode\u002Fappendix_f_numpy-intro\u002Fappendix_f_numpy-intro.ipynb)]\n\n\n\n---\n\n#### 引用本书\n\n您完全可以将本书中的代码片段或其他内容用于科学出版物及其他作品；\n在这种情况下，恳请您引用原始出处：\n\n**BibTeX**:\n\n```\n@Book{raschka2015python,\n author = {Raschka, Sebastian},\n title = {Python Machine Learning},\n publisher = {Packt Publishing},\n year = {2015},\n address = {Birmingham, UK},\n isbn = {1783555130}\n }\n```\n\n\n**MLA**:\n\n\nRaschka, Sebastian. *Python machine learning*. Birmingham, UK: Packt Publishing, 2015. Print.\n\n---\n\n### [反馈与评论](.\u002Fdocs\u002Ffeedback.md)\n\n#### [简短评论摘录](.\u002Fdocs\u002Ffeedback.md)\n\n[![](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Frasbt_python-machine-learning-book_readme_f0e84a9e0501.png)](https:\u002F\u002Fwww.amazon.com\u002FPython-Machine-Learning-Sebastian-Raschka\u002Fdp\u002F1783555130\u002Fref=sr_1_1?ie=UTF8&qid=1472342570&sr=8-1&keywords=sebastian+raschka)\n\n---\n> *塞巴斯蒂安·拉施卡的新书《Python机器学习》刚刚出版。我有幸阅读了审阅稿，正如我所期待的那样——非常出色！全书条理清晰、易于理解，不仅为非专业人士提供了良好的基础，从业者也能从中获得启发并学到新技巧。*  \n– 朗·里斯伯格，发表于[Data Elixir](http:\u002F\u002Fdataelixir.com\u002Fissues\u002F55#start)\n\n> *太棒了！到目前为止，这本书在我看来很好地平衡了理论与实践、数学与代码！*   \n– [布莱恩·托马斯](http:\u002F\u002Fsebastianraschka.com\u002Fblog\u002F2015\u002Fwriting-pymle.html#comment-2295668894)\n\n> *我几乎读遍了所有基于Scikit-learn的机器学习书籍，而这本无疑是目前最好的。*    \n– [杰森·沃洛索诺维奇](https:\u002F\u002Fwww.linkedin.com\u002Fpulse\u002Fpython-machine-learning-sebastian-raschka-review-jason-wolosonovich?trk=prof-post)\n\n> *这是我见过PACKT出版社出版的最佳书籍。这是一本用Python编写的非常优秀的机器学习入门书。正如其他人所指出的那样，它完美地融合了理论与应用。*    \n– [乔什·D.](https:\u002F\u002Fwww.amazon.com\u002Fgp\u002Fcustomer-reviews\u002FR27WB1GWTNGIR2\u002Fref=cm_cr_getr_d_rvw_ttl?ie=UTF8&ASIN=1783555130)\n\n> *这是一本难得兼具多种优点的书：既包含了掌握理论所需的数学知识，又提供了大量的Python代码示例来展示如何实际应用这些机器学习技术。此外，书中没有像许多其他书籍那样为了迎合更广泛的读者而浪费篇幅去介绍Python基础知识，这一点也令人赞赏。可以看出，作者是真正懂行的人，而非仅仅出于兴趣的DIY爱好者。*    \n– [亚马逊用户](https:\u002F\u002Fwww.amazon.com\u002Fgp\u002Fcustomer-reviews\u002FRZWY4TF66Z6V0\u002Fref=cm_cr_getr_d_rvw_ttl?ie=UTF8&ASIN=1783555130)\n\n> *塞巴斯蒂安·拉施卡创作了一部将理论与实践相结合的精彩机器学习教程。本书从理论角度讲解机器学习，并配有大量代码示例，展示了如何实际运用各种机器学习技术。无论是初学者还是高级程序员，都可以轻松阅读此书。*\n- 威廉·P·罗斯，《7本必读的Python书籍》(http:\u002F\u002Fwilliampross.com\u002F7-must-read-python-books\u002F)\n\n#### 长篇评论\n\n如果您需要帮助决定这本书是否适合您，请查看下方链接的一些“长篇”评论。（如果您撰写了评论，请告知我，我很乐意将其添加到列表中）。\n\n- [Python机器学习书评](http:\u002F\u002Fwww.bcs.org\u002Fcontent\u002FconWebDoc\u002F55586) 由英国特许IT学会的帕特里克·希尔撰写\n- [书评：塞巴斯蒂安·拉施卡的《Python机器学习》](http:\u002F\u002Fwhatpixel.com\u002Fpython-machine-learning-book-review\u002F) 由WhatPixel的亚历克斯·特纳撰写\n\n---\n\n## 链接\n\n- 电子书和纸质书可在[Amazon.com](http:\u002F\u002Fwww.amazon.com\u002FPython-Machine-Learning-Sebastian-Raschka\u002Fdp\u002F1783555130\u002Fref=sr_1_2?ie=UTF8&qid=1437754343&sr=8-2&keywords=python+machine+learning+essentials)、[Amazon.co.uk](http:\u002F\u002Fwww.amazon.co.uk\u002FPython-Machine-Learning-Sebastian-Raschka\u002Fdp\u002F1783555130)、[Amazon.de](http:\u002F\u002Fwww.amazon.de\u002Fs\u002Fref=nb_sb_noss_2?__mk_de_DE=ÅMÅŽÕÑ&url=search-alias%3Daps&field-keywords=python+machine+learning) 购买\n- [电子书和纸质书](https:\u002F\u002Fwww.packtpub.com\u002Fbig-data-and-business-intelligence\u002Fpython-machine-learning) 可在Packt出版社官网购买\n- 其他书店：[Google Books](https:\u002F\u002Fbooks.google.com\u002Fbooks?id=GOVOCwAAQBAJ&source=gbs_slider_cls_metadata_7_mylibrary)、[O'Reilly](http:\u002F\u002Fshop.oreilly.com\u002Fproduct\u002F9781783555130.do)、[Safari](https:\u002F\u002Fwww.safaribooksonline.com\u002Flibrary\u002Fview\u002Fpython-machine-learning\u002F9781783555130\u002F)、[Barnes & Noble](http:\u002F\u002Fwww.barnesandnoble.com\u002Fw\u002Fpython-machine-learning-essentials-sebastian-raschka\u002F1121999969?ean=9781783555130)、[Apple iBooks](https:\u002F\u002Fitunes.apple.com\u002Fus\u002Fbook\u002Fpython-machine-learning\u002Fid1028207310?mt=11) 等\n- 社交平台：[Goodreads](https:\u002F\u002Fwww.goodreads.com\u002Fbook\u002Fshow\u002F25545994-python-machine-learning)\n\n#### 中文译本\n\n- [意大利语译本](https:\u002F\u002Fwww.amazon.it\u002Flearning-Costruire-algoritmi-generare-conoscenza\u002Fdp\u002F8850333978\u002F) 由“Apogeo”出版\n- [德语译本](https:\u002F\u002Fwww.amazon.de\u002FMachine-Learning-Python-mitp-Professional\u002Fdp\u002F3958454224\u002F) 由“mitp Verlag”出版\n- [日语译本](http:\u002F\u002Fwww.amazon.co.jp\u002Fgp\u002Fproduct\u002F4844380605\u002F) 由“Impress Top Gear”出版\n- [中文繁体版](https:\u002F\u002Ftaiwan.kinokuniya.com\u002Fbw\u002F9789864341405)\n- [中文简体版](https:\u002F\u002Fbook.douban.com\u002Fsubject\u002F27000110\u002F)\n- [韩语译本](http:\u002F\u002Fwww.kyobobook.co.kr\u002Fproduct\u002FdetailViewKor.laf?mallGb=KOR&ejkGb=KOR&barcode=9791187497035) 由“Kyobo”出版\n- [波兰语译本](https:\u002F\u002Fwww.amazon.de\u002FPython-Uczenie-maszynowe-Sebastian-Raschka\u002Fdp\u002F8328336138\u002Fref=sr_1_11?ie=UTF8&qid=1513601461&sr=8-11&keywords=sebastian+raschka) 由“Helion”出版\n\n---\n\n### [文献引用与拓展阅读资源](.\u002Fdocs\u002Freferences.md)\n\n### [勘误表](.\u002Fdocs\u002Ferrata.md)\n\n\n---\n\n### 附录笔记本（书中未包含）\n\n- 逻辑回归实现 [[目录](.\u002Fcode\u002Fbonus)] [[ipynb](.\u002Fcode\u002Fbonus\u002Flogistic_regression.ipynb)] [[nbviewer](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Frasbt\u002Fpython-machine-learning-book\u002Fblob\u002Fmaster\u002Fcode\u002Fbonus\u002Flogistic_regression.ipynb)]\n- 基本的流水线与网格搜索设置 [[目录](.\u002Fcode\u002Fbonus)] [[ipynb](.\u002Fcode\u002Fbonus\u002Fsvm_iris_pipeline_and_gridsearch.ipynb)] [[nbviewer](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Frasbt\u002Fpython-machine-learning-book\u002Fblob\u002Fmaster\u002Fcode\u002Fbonus\u002Fsvm_iris_pipeline_and_gridsearch.ipynb)]\n- 扩展的嵌套交叉验证示例 [[目录](.\u002Fcode\u002Fbonus)] [[ipynb](.\u002Fcode\u002Fbonus\u002Fnested_cross_validation.ipynb)] [[nbviewer](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Frasbt\u002Fpython-machine-learning-book\u002Fblob\u002Fmaster\u002Fcode\u002Fbonus\u002Fnested_cross_validation.ipynb)]\n- 简单的基础 Flask Web 应用模板 [[查看目录](.\u002Fcode\u002Fbonus\u002Fflask_webapp_ex01)][[下载为 zip 文件](https:\u002F\u002Fgithub.com\u002Frasbt\u002Fpython-machine-learning-book\u002Fraw\u002Fmaster\u002Fcode\u002Fbonus\u002Fflask_webapp_ex01\u002Fflask_webapp_ex01.zip)]\n- 将 MNIST 手写数字读取到 NumPy 数组中 [[GitHub ipynb](.\u002Fcode\u002Fbonus\u002Freading_mnist.ipynb)] [[nbviewer](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Frasbt\u002Fpython-machine-learning-book\u002Fblob\u002Fmaster\u002Fcode\u002Fbonus\u002Freading_mnist.ipynb)]\n- 使用 JSON 持久化 scikit-learn 模型 [[GitHub ipynb](.\u002Fcode\u002Fbonus\u002Fscikit-model-to-json.ipynb)] [[nbviewer](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Frasbt\u002Fpython-machine-learning-book\u002Fblob\u002Fmaster\u002Fcode\u002Fbonus\u002Fscikit-model-to-json.ipynb)]\n- 多项式逻辑回归 \u002F softmax 回归 [[GitHub ipynb](.\u002Fcode\u002Fbonus\u002Fsoftmax-regression.ipynb)] [[nbviewer](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Frasbt\u002Fpython-machine-learning-book\u002Fblob\u002Fmaster\u002Fcode\u002Fbonus\u002Fsoftmax-regression.ipynb)]\n\n\u003Chr>\n\n**“相关内容”（书中未包含）**\n\n- [机器学习中的模型评估、模型选择与算法选择 - 第一部分](http:\u002F\u002Fsebastianraschka.com\u002Fblog\u002F2016\u002Fmodel-evaluation-selection-part1.html)\n- [机器学习中的模型评估、模型选择与算法选择 - 第二部分](http:\u002F\u002Fsebastianraschka.com\u002Fblog\u002F2016\u002Fmodel-evaluation-selection-part2.html)\n- [机器学习中的模型评估、模型选择与算法选择 - 第三部分](http:\u002F\u002Fsebastianraschka.com\u002Fblog\u002F2016\u002Fmodel-evaluation-selection-part3.html)\n\n---\n\n#### SciPy 2016\n\n我们在奥斯汀举行的 [SciPy 2016](http:\u002F\u002Fscipy2016.scipy.org\u002Fehome\u002Findex.php?eventid=146062&tabid=332930&) 上度过了非常愉快的时光！能与这么多本书的读者见面并交流，真是令人高兴。非常感谢大家给予的赞美和反馈！另外，如果你错过了的话，我和 Andreas Mueller 共同做了题为 **“使用 scikit-learn 进行机器学习入门”** 的演讲；如果你感兴趣，[第一部分](https:\u002F\u002Fwww.youtube.com\u002Fwatch?v=OB1reY6IX-o&index=91&list=PLYx7XA2nY5Gf37zYZMw6OqGFRPjB1jCy6) 和 [第二部分](https:\u002F\u002Fwww.youtube.com\u002Fwatch?v=Cte8FYCpylk&list=PLYx7XA2nY5Gf37zYZMw6OqGFRPjB1jCy6&index=90) 的视频现在已上线！\n\n[![](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Frasbt_python-machine-learning-book_readme_cada073f5023.jpg)](https:\u002F\u002Fwww.youtube.com\u002Fwatch?v=OB1reY6IX-o&index=91&list=PLYx7XA2nY5Gf37zYZMw6OqGFRPjB1jCy6)\n\n#### PyData Chicago 2016\n\n在 PyData Chicago 2016 上，我尝试完成了一项颇具挑战性的任务——仅用 90 分钟介绍 scikit-learn 和机器学习。演示文稿及教程材料可在 “[学习 scikit-learn —— Python 中的机器学习入门](https:\u002F\u002Fgithub.com\u002Frasbt\u002Fpydata-chicago2016-ml-tutorial)” 中找到。\n\n\n---\n\n**注**\n\n我建立了一个独立的库 [`mlxtend`](http:\u002F\u002Frasbt.github.io\u002Fmlxtend\u002F)，其中包含了额外的机器学习（以及通用“数据科学”）算法实现。我还添加了本书中的实现（例如决策区域图、人工神经网络和顺序特征选择算法），并为其增加了更多功能。\n\n[![](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Frasbt_python-machine-learning-book_readme_a1d9094a832d.png)](http:\u002F\u002Frasbt.github.io\u002Fmlxtend\u002F)\n\n\n\u003Cbr>\n\n\u003Chr>\n\n### 各语言译本\n\n[![](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Frasbt_python-machine-learning-book_readme_d4ffd9ecf0c1.jpg)](https:\u002F\u002Fwww.amazon.it\u002Flearning-Costruire-algoritmi-generare-conoscenza\u002Fdp\u002F8850333978\u002F)\n[![](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Frasbt_python-machine-learning-book_readme_a3c446a39c81.jpg)](https:\u002F\u002Fwww.amazon.de\u002FMachine-Learning-Python-mitp-Professional\u002Fdp\u002F3958454224\u002F)\n[![](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Frasbt_python-machine-learning-book_readme_2bb0137aa603.jpg)](http:\u002F\u002Fwww.amazon.co.jp\u002Fgp\u002Fproduct\u002F4844380605\u002F)\n[![](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Frasbt_python-machine-learning-book_readme_bff6ecf257f3.jpg)](https:\u002F\u002Ftaiwan.kinokuniya.com\u002Fbw\u002F9789864341405)\n[![](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Frasbt_python-machine-learning-book_readme_386c632895e0.jpg)](https:\u002F\u002Fbook.douban.com\u002Fsubject\u002F27000110\u002F)\n[![](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Frasbt_python-machine-learning-book_readme_7f0a56ac9b43.jpg)](http:\u002F\u002Fwww.kyobobook.co.kr\u002Fproduct\u002FdetailViewKor.laf?ejkGb=KOR&mallGb=KOR&barcode=9791187497035&orderClick=LEA&Kc=)\n[![](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Frasbt_python-machine-learning-book_readme_cf483b1494d3.jpg)](http:\u002F\u002Fwww.ozon.ru\u002Fcontext\u002Fdetail\u002Fid\u002F140152222\u002F)\n[![](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Frasbt_python-machine-learning-book_readme_09815da64957.jpg)](https:\u002F\u002Fwww.amazon.de\u002FPython-Uczenie-maszynowe-Sebastian-Raschka\u002Fdp\u002F8328336138\u002Fref=sr_1_11?ie=UTF8&qid=1513601461&sr=8-11&keywords=sebastian+raschka)\n\n\u003Chr>\n\n---\n\n***亲爱的读者们***，  \n首先，我要感谢各位一直以来的支持！对于大家迄今为止发给我的所有积极反馈，我感到非常高兴，也很欣慰这本书对广大读者都十分有用。\n\n在过去几个月里，我收到了数百封邮件，并且在有限的时间内尽力回复了尽可能多的邮件。为了让这些回答也能帮助其他读者，我在下面的常见问题解答部分收集了许多我的回复。\n\n此外，还有一些读者询问我是否有一个平台可以让大家讨论书中的内容。我希望这能为大家提供一个与其他读者交流和分享知识的机会：\n\n#### [Google Groups 讨论板](https:\u002F\u002Fgroups.google.com\u002Fforum\u002F#!forum\u002Fpython-machine-learning-reader-discussion-board)\n\n（如果时间允许，我也会尽量亲自回答大家的问题！ :))\n\n> 对于好的建议，唯一要做的就是把它传递出去。它对自己从来没有任何用处。  \n— 奥斯卡·王尔德\n\n---\n\n## 读者提供的示例与应用\n\n再次感谢大家对这本书的宝贵反馈。我收到了许多来自读者的邮件，他们将书中的概念和示例应用到了实际生活中，在各自的项目中发挥了很好的作用。在这一部分，我开始收集一些优秀的应用案例，也非常欢迎你将自己的项目加入到这个列表中——只需给我发一封简短的邮件即可！\n\n- [光学字符识别相关的 40 个脚本](https:\u002F\u002Fgithub.com\u002Frrlyman\u002FPythonMachineLearingExamples) 由 [Richard Lyman](https:\u002F\u002Fgithub.com\u002Frrlyman) 提供\n- [代码实验](https:\u002F\u002Fgithub.com\u002Fjeremyn\u002Fpython-machine-learning-book) 由 [Jeremy Nation](https:\u002F\u002Fgithub.com\u002Fjeremyn) 提供\n- [从零开始用 Python 实现分类器的心得体会](http:\u002F\u002Fwww.jeannicholashould.com) 由 [Jean-Nicholas Hould](http:\u002F\u002Fwww.jeannicholashould.com) 提供\n\n## 常见问题解答\n\n### 一般问题\n\n- [什么是机器学习和数据科学？](.\u002Ffaq\u002Fdatascience-ml.md)\n- [为什么你和其他人有时会从头实现机器学习算法？](.\u002Ffaq\u002Fimplementing-from-scratch.md)\n- [在数据科学领域，我应该专注于哪条学习路径或学科？](.\u002Ffaq\u002Fdata-science-career.md)\n- [一个人应该在什么时候开始参与开源项目？](.\u002Ffaq\u002Fopen-source.md)\n- [你认为拥有导师对学习过程有多重要？](.\u002Ffaq\u002Fmentor.md)\n- [围绕数据科学、机器学习或Python的最佳在线社区有哪些？](.\u002Ffaq\u002Fml-python-communities.md)\n- [你会如何向软件工程师解释机器学习？](.\u002Ffaq\u002Fml-to-a-programmer.md)\n- [针对机器学习初学者的课程体系会是什么样的？](.\u002Ffaq\u002Fml-curriculum.md)\n- [数据科学的定义是什么？](.\u002Ffaq\u002Fdefinition_data-science.md)\n- [数据科学家是如何进行模型选择的？这与Kaggle上的做法有区别吗？](.\u002Ffaq\u002Fmodel-selection-in-datascience.md)\n\n### 关于机器学习领域的提问\n\n- [人工智能和机器学习之间有什么关系？](.\u002Ffaq\u002Fai-and-ml.md)\n- [机器学习在实际应用中的例子有哪些？](.\u002Ffaq\u002Fml-examples.md)\n- [数据挖掘有哪些不同的研究领域？](.\u002Ffaq\u002Fdatamining-overview.md)\n- [机器学习和数据挖掘这两个领域的研究性质有何不同？](.\u002Ffaq\u002Fdatamining-vs-ml.md)\n- [我如何判断一个问题是否可以通过机器学习来解决？](.\u002Ffaq\u002Fml-solvable.md)\n- [机器学习的起源是什么？](.\u002Ffaq\u002Fml-origins.md)\n- [作为学习机的分类器是如何发展起来的？](.\u002Ffaq\u002Fclassifier-history.md)\n- [哪些机器学习算法可以被认为是最佳算法之一？](.\u002Ffaq\u002Fbest-ml-algo.md)\n- [分类器有哪些主要类别？](.\u002Ffaq\u002Fclassifier-categories.md)\n- [分类器和模型有什么区别？](.\u002Ffaq\u002Fdifference_classifier_model.md)\n- [参数化学习算法和非参数化学习算法有什么区别？](.\u002Ffaq\u002Fparametric_vs_nonparametric.md)\n- [机器学习中的成本函数和损失函数有什么区别？](.\u002Ffaq\u002Fcost-vs-loss.md)\n\n### 关于机器学习概念和统计学的问题\n\n#### 成本函数与优化\n\n- [通过闭式方程拟合模型、梯度下降法、随机梯度下降法以及小批量学习——它们之间有什么区别？](.\u002Ffaq\u002Fclosed-form-vs-gd.md)\n- [如何推导出线性回归和Adaline的梯度下降规则？](.\u002Ffaq\u002Flinear-gradient-derivative.md)\n\n#### 回归分析\n\n- [皮尔逊相关系数和简单线性回归有什么区别？](.\u002Ffaq\u002Fpearson-r-vs-linear-regr.md)\n\n#### 树模型\n\n- [随机森林模型是如何工作的？它与集成学习中的bagging和boosting方法有何不同？](.\u002Ffaq\u002Fbagging-boosting-rf.md)\n- [对于大型数据集，使用经典决策树算法有哪些缺点？](.\u002Ffaq\u002Fdecision-tree-disadvantages.md)\n- [为什么决策树算法的实现通常是二叉树结构？不同的不纯度度量指标有哪些优势？](.\u002Ffaq\u002Fdecision-tree-binary.md)\n- [为什么我们在构建决策树时倾向于使用熵而不是分类误差？](.\u002Ffaq\u002Fdecisiontree-error-vs-entropy.md)\n- [在什么情况下随机森林的表现会非常糟糕？](.\u002Ffaq\u002Frandom-forest-perform-terribly.md)\n\n#### 模型评估\n\n- [什么是过拟合？](.\u002Ffaq\u002Foverfitting.md)\n- [如何避免过拟合？](.\u002Ffaq\u002Favoid-overfitting.md)\n- [在进行交叉验证时，是否总是折数越多越好？](.\u002Ffaq\u002Fnumber-of-kfolds.md)\n- [训练SVM分类器时，支持向量的数量是多一些好还是少一些好？](.\u002Ffaq\u002Fnum-support-vectors.md)\n- [如何评估一个模型？](.\u002Ffaq\u002Fevaluate-a-model.md)\n- [多分类问题的最佳验证指标是什么？](.\u002Ffaq\u002Fmulticlass-metric.md)\n- [在选择预测模型技术时，我应该考虑哪些因素？](.\u002Ffaq\u002Fchoosing-technique.md)\n- [有哪些适合用来可视化和理解分类器行为的玩具数据集？](.\u002Ffaq\u002Fclf-behavior-data.md)\n- [如何选择SVM的核函数？](.\u002Ffaq\u002Fselect_svm_kernels.md)\n- [插曲：在交叉验证中比较和计算性能指标——不平衡分类问题及三种不同的F1分数计算方法](.\u002Ffaq\u002Fcomputing-the-f1-score.md)\n\n#### 逻辑回归\n\n- [什么是Softmax回归？它与逻辑回归有什么关系？](.\u002Ffaq\u002Fsoftmax_regression.md)\n- [为什么逻辑回归被视为线性模型？](.\u002Ffaq\u002Flogistic_regression_linear.md)\n- [正则化逻辑回归的概率解释是什么？](.\u002Ffaq\u002Fprobablistic-logistic-regression.md)\n- [逻辑回归中的正则化是否总是能带来更好的拟合效果和更强的泛化能力？](.\u002Ffaq\u002Fregularized-logistic-regression-performance.md)\n- [朴素贝叶斯和逻辑回归之间最大的区别是什么？](.\u002Ffaq\u002Fnaive-bayes-vs-logistic-regression.md)\n- [在机器学习的上下文中，“softmax和多项式逻辑损失”到底是什么意思？](.\u002Ffaq\u002Fsoftmax.md)\n- [逻辑回归与神经网络之间有什么联系？在什么情况下应该使用哪一种？](.\u002Ffaq\u002Flogisticregr-neuralnet.md)\n- [逻辑回归：为什么使用sigmoid函数？](.\u002Ffaq\u002Flogistic-why-sigmoid.md)\n- [是否存在类似于线性回归中正规方程那样的逻辑回归解析解？](.\u002Ffaq\u002Flogistic-analytical.md)\n\n\n#### 神经网络与深度学习\n\n- [深度学习和普通机器学习有什么区别？](.\u002Ffaq\u002Fdifference-deep-and-normal-learning.md)\n- [能否用可视化的方式来解释神经网络中的反向传播算法？](.\u002Ffaq\u002Fvisual-backpropagation.md)\n- [为什么深度网络的发明花了这么长时间？](.\u002Ffaq\u002Finventing-deeplearning.md)\n- [有哪些好的书籍或论文可以帮助学习深度学习？](.\u002Ffaq\u002Fdeep-learning-resources.md)\n- [为什么会有这么多深度学习库？](.\u002Ffaq\u002Fmany-deeplearning-libs.md)\n- [为什么有些人讨厌神经网络\u002F深度学习？](.\u002Ffaq\u002Fdeeplearning-criticism.md)\n- [我如何判断深度学习是否比SVM或随机森林更适合解决某个特定问题？](.\u002Ffaq\u002Fdeeplearn-vs-svm-randomforest.md)\n- [当我的神经网络误差不断增加时，可能出了什么问题？](.\u002Ffaq\u002Fneuralnet-error.md)\n- [如何调试人工神经网络算法？](.\u002Ffaq\u002Fnnet-debugging-checklist.md)\n- [感知器、Adaline和神经网络模型之间有什么区别？](.\u002Ffaq\u002Fdiff-perceptron-adaline-neuralnet.md)\n- [Dropout技术的基本思想是什么？](.\u002Ffaq\u002Fdropout.md)\n\n\n#### 其他监督学习算法\n\n- [为什么最近邻算法被称为懒惰算法？](.\u002Ffaq\u002Flazy-knn.md)\n\n#### 非监督学习\n\n- [聚类方法存在哪些问题？](.\u002Ffaq\u002Fissues-with-clustering.md)\n\n##### 半监督学习\n\n- [与监督学习和无监督学习相比，半监督学习有哪些优势？](.\u002Ffaq\u002Fsemi-vs-supervised.md)\n\n##### 集成方法\n\n- [使用堆叠集成分类器是否比选择最佳分类器更好？](.\u002Ffaq\u002Flogistic-boosting.md)\n\n##### 预处理、特征选择与特征提取\n\n- [为什么需要使用训练数据的参数来转换测试数据？](.\u002Ffaq\u002Fscale-training-test.md)\n- [机器学习中有哪些不同的降维方法？](.\u002Ffaq\u002Fdimensionality-reduction.md)\n- [LDA 和 PCA 在降维方面有什么区别？](.\u002Ffaq\u002Flda-vs-pca.md)\n- [我应该在什么情况下应用数据归一化或标准化？](.\u002Ffaq\u002Fwhen-to-standardize.md)\n- [对数据进行均值中心化或特征缩放是否会影响主成分分析的结果？](.\u002Ffaq\u002Fpca-scaling.md)\n- [当特征数量非常多时，应该如何解决机器学习问题？](.\u002Ffaq\u002Flarge-num-features.md)\n- [处理缺失数据有哪些常见方法？](.\u002Ffaq\u002Fmissing-data.md)\n- [过滤法、包裹法和嵌入法在特征选择上有何不同？](.\u002Ffaq\u002Ffeature_sele_categories.md)\n- [数据准备\u002F预处理步骤是否应被视为特征工程的一部分？为什么或为什么不？](.\u002Ffaq\u002Fdataprep-vs-dataengin.md)\n- [用于文本分类的词袋特征表示是否可以视为稀疏矩阵？](.\u002Ffaq\u002Fbag-of-words-sparsity.md)\n\n##### 朴素贝叶斯\n\n- [为什么朴素贝叶斯分类器被称为“朴素”？](.\u002Ffaq\u002Fnaive-naive-bayes.md)\n- [朴素贝叶斯的决策边界是什么？](.\u002Ffaq\u002Fnaive-bayes-boundary.md)\n- [我可以将朴素贝叶斯分类器用于混合变量类型的数据吗？](.\u002Ffaq\u002Fnaive-bayes-vartypes.md)\n- [在朴素贝叶斯中能否混合使用不同类型的变量，例如二元特征和连续特征？](.\u002Fnaive-bayes-vartypes.md)\n\n##### 其他\n\n- [从机器学习的角度来看，欧几里得距离是什么？](.\u002Ffaq\u002Feuclidean-distance.md)\n- [在什么情况下应该使用中位数而不是均值或平均值？](.\u002Ffaq\u002Fmedian-vs-mean.md)\n\n##### 数据科学与机器学习的编程语言和库\n\n- [R 语言如今在数据科学领域是否被广泛使用？](.\u002Ffaq\u002Fr-in-datascience.md)\n- [TensorFlow 和 scikit-learn 的主要区别是什么？](.\u002Ffaq\u002Ftensorflow-vs-scikitlearn.md)\n\n\u003Cbr>\n\n\n\n\n\n\n\n### 关于本书的问题\n\n- [我可以在演示文稿或博客中使用本书中的段落和图片吗？](.\u002Ffaq\u002Fcopyright.md)\n- [这本书与其他机器学习书籍有何不同？](.\u002Ffaq\u002Fdifferent.md)\n- [代码示例中使用的是哪个版本的 Python？](.\u002Ffaq\u002Fpy2py3.md)\n- [本书使用了哪些技术和库？](.\u002Ffaq\u002Ftechnologies.md)\n- [您推荐哪个版本或格式的书？](.\u002Ffaq\u002Fversion.md)\n- [您为什么选择 Python 进行机器学习教学？](.\u002Ffaq\u002Fwhy-python.md)\n- [为什么在代码示例中会使用如此多的前导和尾部下划线？](.\u002Ffaq\u002Funderscore-convention.md)\n- [您在代码示例中频繁使用 `return self` 惯用法的目的是什么？](.\u002Ffaq\u002Freturn_self_idiom.md)\n- [本书是否有先修要求或推荐的预读材料？](.\u002Ffaq\u002Fprerequisites.md)\n- [如何将支持向量机应用于分类数据？](.\u002Ffaq\u002Fsvm_for_categorical.md)\n\n\n## 联系方式\n\n我很乐意回答您的问题！请发送邮件至 [mail@sebastianraschka.com](mailto:mail@sebastianraschka.com)，或者在 [Google Groups 邮件列表](https:\u002F\u002Fgroups.google.com\u002Fforum\u002F#!forum\u002Fpython-machine-learning-book) 上提问。\n\n如果您希望保持联系，我的 Twitter 账号 [@rasbt](https:\u002F\u002Ftwitter.com\u002Frasbt) 经常分享关于数据科学和机器学习的内容。此外，我还维护着一个博客 [http:\u002F\u002Fsebastianraschka.com\u002Farticles.html](http:\u002F\u002Fsebastianraschka.com\u002Farticles.html)，会在上面发布我特别感兴趣的话题。","# Python Machine Learning (第一版) 快速上手指南\n\n本指南基于 Sebastian Raschka 所著《Python Machine Learning》第一版的开源代码仓库，帮助开发者快速搭建环境并运行书中的示例代码。\n\n## 环境准备\n\n在开始之前，请确保您的系统满足以下要求：\n\n*   **操作系统**: Windows, macOS 或 Linux\n*   **Python 版本**: 推荐 Python 3.5+ (注意：本项目为第一版代码，部分依赖库版本较旧，建议在虚拟环境中运行)\n*   **核心依赖库**:\n    *   NumPy\n    *   SciPy\n    *   scikit-learn\n    *   pandas\n    *   matplotlib\n    *   Jupyter Notebook\n    *   Theano (部分章节需要，安装较为复杂，可选)\n\n## 安装步骤\n\n### 1. 克隆代码仓库\n\n首先，将代码仓库克隆到本地：\n\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002Frasbt\u002Fpython-machine-learning-book.git\ncd python-machine-learning-book\n```\n\n### 2. 创建虚拟环境 (推荐)\n\n为了避免依赖冲突，建议使用 `conda` 或 `venv` 创建独立环境。\n\n**使用 Conda (推荐国内用户使用清华源加速):**\n\n```bash\n# 创建名为 pymle 的环境，指定 Python 版本\nconda create -n pymle python=3.6\n\n# 激活环境\nconda activate pymle\n\n# 配置清华镜像源 (可选，加速下载)\nconda config --add channels https:\u002F\u002Fmirrors.tuna.tsinghua.edu.cn\u002Fanaconda\u002Fpkgs\u002Fmain\u002F\nconda config --set show_channel_urls yes\n\n# 安装核心依赖\nconda install numpy scipy pandas matplotlib scikit-learn jupyter\n```\n\n**使用 Pip:**\n\n```bash\npython -m venv pymle_env\nsource pymle_env\u002Fbin\u002Factivate  # Windows 用户请使用: pymle_env\\Scripts\\activate\n\n# 安装依赖 (建议使用国内镜像源)\npip install -i https:\u002F\u002Fpypi.tuna.tsinghua.edu.cn\u002Fsimple numpy scipy pandas matplotlib scikit-learn jupyter\n```\n\n> **注意**: 第 13 章涉及 **Theano** 库，该库已停止维护且安装复杂。如果是初学者，建议先跳过第 13 章，专注于前 12 章基于 scikit-learn 的内容。如需尝试 Theano，请参考其历史文档进行单独安装。\n\n## 基本使用\n\n本书的核心内容是配合章节的 Jupyter Notebook 代码示例。\n\n### 1. 启动 Jupyter Notebook\n\n进入代码目录并启动服务：\n\n```bash\ncd code\njupyter notebook\n```\n\n浏览器会自动打开 Jupyter 界面。\n\n### 2. 运行示例代码\n\n在文件列表中，您会看到按章节命名的文件夹（如 `ch01`, `ch02` 等）。\n\n*   **入门示例**: 点击 `ch01` 文件夹，打开 `ch01.ipynb`。\n*   **执行代码**: 选中代码单元格，按下 `Shift + Enter` 运行。\n\n**最简单的测试代码 (以第一章为例):**\n\n在任意新的 Notebook 单元格中输入以下代码测试环境是否正常：\n\n```python\nimport numpy as np\nimport sklearn\nimport pandas as pd\n\nprint(\"NumPy version:\", np.__version__)\nprint(\"Scikit-learn version:\", sklearn.__version__)\nprint(\"Pandas version:\", pd.__version__)\n\n# 简单演示：加载鸢尾花数据集\nfrom sklearn.datasets import load_iris\niris = load_iris()\nprint(\"Dataset shape:\", iris.data.shape)\nprint(\"Target names:\", iris.target_names)\n```\n\n如果成功输出版本号和数据集信息，说明环境配置成功，您可以开始按照书籍目录顺序学习后续章节（如分类算法、数据预处理、降维等）。\n\n> **提示**: 这些 Notebook 仅包含代码示例。为了获得最佳学习效果，请结合原书的理论公式和文字描述一起阅读，因为代码中可能不包含完整的数学推导背景。","某金融科技公司数据分析师小李，正试图从零构建一个信用卡欺诈检测模型，但他发现理论公式与代码实现之间存在巨大鸿沟。\n\n### 没有 python-machine-learning-book 时\n- **理论落地难**：虽然懂梯度下降的数学推导，但面对 NumPy 和 scikit-learn 的具体 API 时，不知道如何将公式转化为可运行的代码。\n- **预处理踩坑**：在处理缺失值和特征缩放时，缺乏最佳实践指导，导致模型因数据分布不均而频繁过拟合。\n- **调参无头绪**：面对众多分类器（如 SVM、随机森林），不清楚如何系统地进行超参数优化和模型评估，只能盲目试错。\n- **资源碎片化**：需要在 StackOverflow、零散博客和官方文档间反复跳转，难以形成完整的知识体系，学习效率极低。\n\n### 使用 python-machine-learning-book 后\n- **代码即理论**：直接参考书中第 2 章和第 3 章的 Jupyter Notebook 示例，将分类算法的数学逻辑无缝映射为标准的 Python 实现。\n- **规范数据流**：依据第 4 章“构建优质训练集”的指导，建立了标准化的数据预处理管道，显著提升了模型的泛化能力。\n- **科学调优**：利用第 6 章提供的模型评估与超参数优化最佳实践，快速锁定了最优参数组合，缩短了开发周期。\n- **体系化学习**：通过 400 页连贯的代码与讲解，从底层原理到工程实战一气呵成，不再需要碎片化搜索，建立了扎实的方法论。\n\npython-machine-learning-book 通过将深奥的机器学习理论转化为可直接执行的代码案例，帮助开发者跨越了从“懂公式”到“能落地”的关键障碍。","https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Frasbt_python-machine-learning-book_a1d9094a.png","rasbt","Sebastian Raschka","https:\u002F\u002Foss.gittoolsai.com\u002Favatars\u002Frasbt_4eb76c31.jpg","AI Research Engineer working on LLMs.",null,"https:\u002F\u002Fsebastianraschka.com","https:\u002F\u002Fgithub.com\u002Frasbt",[84,88,92,96,99],{"name":85,"color":86,"percentage":87},"Jupyter Notebook","#DA5B0B",99,{"name":89,"color":90,"percentage":91},"Python","#3572A5",1,{"name":93,"color":94,"percentage":95},"TeX","#3D6117",0,{"name":97,"color":98,"percentage":95},"HTML","#e34c26",{"name":100,"color":101,"percentage":95},"CSS","#663399",12605,4396,"2026-04-03T02:28:32","MIT","","未说明",{"notes":109,"python":107,"dependencies":110},"该仓库对应《Python Machine Learning》第一版（2015 年出版），代码示例主要基于较旧的库版本。若需运行第二版代码，请参考作者提供的独立仓库。部分章节涉及神经网络并行训练，依赖 Theano 框架。建议查阅各章节目录下的具体 README 文件以获取详细的环境设置指南。",[111,112,113],"NumPy","scikit-learn","Theano",[51,54,13],[116,117,118,119,120,121,112,122],"machine-learning","machine-learning-algorithms","logistic-regression","data-science","data-mining","python","neural-network",7,"2026-03-27T02:49:30.150509","2026-04-06T05:19:22.721816",[127,132,137,142,147,152],{"id":128,"question_zh":129,"answer_zh":130,"source_url":131},12118,"为什么感知机代码中的 net_input 方法除了点积外还要加上 self.w_[0]？","self.w_[0] 代表偏置单元（bias unit）或阈值（threshold）。如果没有偏置单元，回归拟合线将始终穿过坐标原点 (0,0)。如果数据没有以 0 为中心，模型将无法很好地拟合数据。这个阈值决定了线性回归线在 x=0 时与 y 轴的交点位置。在训练过程中，w_0 会像其他权重一样在每次迭代中进行调整，而不仅仅是一个常数。","https:\u002F\u002Fgithub.com\u002Frasbt\u002Fpython-machine-learning-book\u002Fissues\u002F6",{"id":133,"question_zh":134,"answer_zh":135,"source_url":136},12119,"在 Windows 上运行书中代码遇到错误或 Python 崩溃怎么办？","书中部分代码（特别是涉及多进程 n_jobs=-1 或特定后端如 Theano 的代码）在 Windows 上可能存在兼容性问题。解决方案包括：1. 尝试将 n_jobs 参数设置为 1 以禁用多进程；2. 推荐在 Linux 环境下运行，可以通过安装 Ubuntu（例如使用 VirtualBox 虚拟机或双系统）来解决大部分兼容性问题。许多用户反馈切换到 Linux 后问题得以解决。","https:\u002F\u002Fgithub.com\u002Frasbt\u002Fpython-machine-learning-book\u002Fissues\u002F31",{"id":138,"question_zh":139,"answer_zh":140,"source_url":141},12120,"AdalineSGD 和 AdalineGD 在权重更新上的本质区别是什么？","虽然两者更新公式看似相似，但核心区别在于更新的频率和数据范围。AdalineGD（批量梯度下降）使用整个矩阵 X 计算误差并一次性更新权重；而 AdalineSGD（随机梯度下降）通过循环逐行（样本）处理数据，每看到一个样本就立即更新一次权重。从学习率角度看，可以将批量更新理解为学习率被样本数量缩放（eta\u002Fn_samples），而 SGD 则是直接使用原始学习率对单个样本进行更新，这有助于避免陷入局部最优并加快收敛。","https:\u002F\u002Fgithub.com\u002Frasbt\u002Fpython-machine-learning-book\u002Fissues\u002F60",{"id":143,"question_zh":144,"answer_zh":145,"source_url":146},12121,"O'Reilly 平台上的电子书版本未更新怎么办？","有时出版商平台（如 O'Reilly）的元数据更新会有延迟，即使产品页面显示旧日期，实际下载的文件可能已经是最新版本。建议直接下载电子书并检查版权页或特定章节（如强化学习图表）确认内容是否已更新。通常新购买的用户会自动获得最新版本，老用户也可尝试重新下载。如果长时间未更新，可关注作者在该 Issue 中的后续回复。","https:\u002F\u002Fgithub.com\u002Frasbt\u002Fpython-machine-learning-book\u002Fissues\u002F7",{"id":148,"question_zh":149,"answer_zh":150,"source_url":151},12122,"运行代码时报错 'operands could not be broadcast together' 是什么原因？","该错误通常表示数组形状不匹配，无法进行广播运算。首先请仔细核对您的代码是否与书中源代码完全一致，包括输入数据的形状和预处理步骤。很多时候是因为复制代码时遗漏了某些维度变换步骤，或者使用了不同版本的数据集导致形状不一致。建议逐行对比书中代码，确保矩阵乘法或加法操作两边的数组维度兼容（例如 (n_samples, n_features) 与 (n_features,) 或 (n_features, 1)）。","https:\u002F\u002Fgithub.com\u002Frasbt\u002Fpython-machine-learning-book\u002Fissues\u002F8",{"id":153,"question_zh":154,"answer_zh":155,"source_url":136},12123,"在使用 GridSearchCV 和自定义 tokenizer 时遇到 'can't get attribute' 错误如何解决？","当在 sklearn 的 Pipeline 中使用自定义函数（如 tokenizer_porter）作为参数并进行网格搜索时，如果在 Windows 上使用多进程（n_jobs > 1），可能会因为 pickle 序列化问题导致找不到函数属性。解决方法是：1. 将 n_jobs 设置为 1 以单进程运行；2. 确保自定义函数定义在主模块的全局作用域中，而不是在交互式会话或局部作用域内；3. 如条件允许，建议在 Linux 或 macOS 环境下运行此类多进程任务以避免序列化兼容性问题。",[157,162,167],{"id":158,"version":159,"summary_zh":160,"released_at":161},62508,"v1.3","本次发布新增了 scikit-learn 0.18 的替代语法（scikit-learn 于 2016 年 9月 28 日正式发布）。使用旧版 scikit-learn 编写的代码仍能兼容未来的 scikit-learn 版本（很可能一直兼容到 scikit-learn 0.20）。\n\n不过，为了避免弃用警告，并帮助用户熟悉这些变化（例如，`cross_validation` 和 `grid_search` 现已被整合到新的 `model_selection` 模块中），我们在本仓库的笔记本中添加了一个 scikit-learn 0.18 兼容层。**该代码完全向后兼容**。如需了解更多关于 scikit-learn 0.18 的信息，请参阅官方[发行说明](http:\u002F\u002Fscikit-learn.org\u002Fstable\u002Fwhats_new.html#version-0-18)。","2016-09-30T18:19:59",{"id":163,"version":164,"summary_zh":165,"released_at":166},62509,"v1.2","对 Jupyter\u002FIPython 笔记本所做的更改，用于修复勘误表第 2 版中出现的问题。\n","2016-03-27T02:17:46",{"id":168,"version":169,"summary_zh":170,"released_at":171},62510,"v1.0","本“发行版”包含书中第一版中出现的代码示例和图表。","2015-10-06T21:40:40"]