Python: From Beginner to Hands-On Artificial Intelligence
Tags
Summary
The book has 20 chapters, covering Python installation and configuration, Python language basics, flow control statements, sequences, functions, objects, files and exception handling, key modules for data processing and analysis (NumPy, Pandas), machine learning fundamentals, common machine learning tuning methods, neural networks, convolutional neural networks, and multiple hands-on AI case studies implemented with PyTorch and Keras. All knowledge in the book is explained through concrete examples, and the program code involved is given detailed comments so that readers can grasp it with ease.
Editor's review
Who it's for
A good fit for
- Beginners with no programming background who want a systematic introduction to Python
- Learners with basic syntax knowledge who want to complete the chain from data processing to machine learning
- Practical readers who want to run their first AI case with PyTorch or Keras
- University students using it as course companion material or for self-study practice
Not a good fit for
- Developers with extensive Python and deep learning experience seeking advanced techniques
- Theoretical readers who want in-depth derivations of machine learning mathematics
- Reference-oriented users who only want to look up syntax quickly without doing exercises
Reading tips
- Proceed chapter by chapter, and be sure to run each chapter's examples hands-on before moving to the next chapter.
- Skim the fundamentals, but slow down and take notes on NumPy, Pandas, and the hands-on chapters.
- Prepare a small project of your own and apply the data processing and modeling methods you have learned.
- When reading the hands-on cases, first cover the code and try it yourself, then compare with the book's implementation to find gaps.
About the publisher
Peking University Press is a comprehensive university press whose publishing areas cover classical literature, popular science, social culture, world history, Western philosophy, and culture. Its catalogue contains 6,031 titles, with representative books including A Dream of Red Mansions, Relativity: The Special and General Theory (15th Edition) (with Einstein's classic papers on unified field theory and other topics), Elements, Conics, The Aristocratic Families of the Eastern Jin, The Philosophy of Mythology (Volume I), The Philosophy of Mythology (Volume II), and The Origin of Continents and Oceans. Representative authors include Cao Xueqin, Zhou Ruchang, Albert Einstein, Euclid, Apollonius, Tian Yuqing, Schelling, and Xian Gang. The press has developed distinctive strengths in classical Chinese literature and in the translation of Western philosophical classics, while also covering scientific classics and social and cultural studies. As public information is limited, this description is based only on the books in the catalogue and offers no further extrapolation.
Contents
- 版权信息
- 前言
- 第1章 Python安装配置
- 1.1 问题:Python能带来哪些优势?
- 1.2 安装Python
- 1.3 配置开发环境
- 1.4 试运行Python
- 1.5 后续思考
- 1.6 小结
- 第2章 变量和数据类型
- 2.1 问题:Python是如何定义变量的?
- 2.2 变量
- 2.3 字符串
- 2.4 数字与运算符
- 2.5 数据类型转换
- 2.6 注释
- 2.7 后续思考
- 2.8 小结
- 第3章 列表和元组
- 3.1 问题:如何存取更多数据?
- 3.2 列表概述
- 3.3 访问列表元素的方法
- 3.4 对列表进行增、删、改
- 3.5 统计分析列表
- 3.6 组织列表
- 3.7 生成列表
- 3.8 元组
- 3.9 后续思考
- 3.10 小结
- 第4章 if语句与循环语句
- 4.1 问题:Python中的控制语句有何特点?
- 4.2 if语句
- 4.3 循环语句
- 4.4 后续思考
- 4.5 小结
- 第5章 字典和集合
- 5.1 问题:当索引不好用时怎么办?
- 5.2 一个简单的字典实例
- 5.3 创建和维护字典
- 5.4 遍历字典
- 5.5 集合
- 5.6 列表、元组、字典和集合的异同
- 5.7 迭代器和生成器
- 5.8 后续思考
- 5.9 小结
- 第6章 函数
- 6.1 问题:如何实现代码共享?
- 6.2 创建和调用函数
- 6.3 传递参数
- 6.4 返回值
- 6.5 传递任意数量的参数
- 6.6 lambda函数
- 6.7 生成器函数
- 6.8 把函数放在模块中
- 6.9 后续思考
- 6.10 小结
- 第7章 面向对象编程
- 7.1 问题:如何实现不重复造轮子?
- 7.2 类与实例
- 7.3 继承
- 7.4 把类放在模块中
- 7.5 标准库
- 7.6 包
- 7.7 实例1:使用类和包
- 7.8 实例2:银行ATM机系统
- 7.9 后续思考
- 7.10 小结
- 第8章 文件与异常
- 8.1 问题:Python如何获取文件数据?
- 8.2 基本的文件操作
- 8.3 目录操作
- 8.4 异常处理
- 8.5 后续思考
- 8.6 小结
- 第9章 NumPy基础
- 9.1 问题:为什么说NumPy是打开人工智能的一把钥匙?
- 9.2 生成NumPy数组
- 9.3 获取元素
- 9.4 NumPy的算术运算
- 9.5 数组变形
- 9.6 通用函数
- 9.7 广播机制
- 9.8 后续思考
- 9.9 小结
- 第10章 Pandas基础
- 10.1 问题:Pandas有哪些优势?
- 10.2 Pandas数据结构
- 10.3 Series
- 10.4 DataFrame
- 10.5 后续思考
- 10.6 小结
- 第11章 数据可视化
- 11.1 问题:为何选择Matplotlib?
- 11.2 可视化工具Matplotlib
- 11.3 绘制多个子图
- 11.4 Seaborn简介
- 11.5 图像处理与显示
- 11.6 Pyecharts简介
- 11.7 实例:词云图
- 11.8 后续思考
- 11.9 小结
- 第12章 机器学习基础
- 12.1 问题:机器学习如何学习?
- 12.2 机器学习常用算法
- 12.3 机器学习的一般流程
- 12.4 机器学习常用技巧
- 12.5 实例1:机器学习是如何学习的?
- 12.6 实例2:用Scikit-Learn实现电信客户流失预测
- 12.7 后续思考
- 12.8 小结
- 第13章 神经网络
- 13.1 问题:神经网络能代替传统机器学习吗?
- 13.2 单层神经网络
- 13.3 多层神经网络
- 13.4 输出层
- 13.5 损失函数
- 13.6 正向传播
- 13.7 误差反向传播
- 13.8 实例:用Python实现手写数字的识别
- 13.9 后续思考
- 13.10 小结
- 第14章 用PyTorch实现神经网络
- 14.1 为何选择PyTorch?
- 14.2 安装配置
- 14.3 Tensor简介
- 14.4 autograd机制
- 14.5 构建神经网络的常用工具
- 14.6 数据处理工具
- 14.7 实例1:用PyTorch实现手写数字识别
- 14.8 实例2:用PyTorch解决回归问题
- 14.9 小结
- 第15章 卷积神经网络
- 15.1 问题:传统神经网络有哪些不足?
- 15.2 卷积神经网络
- 15.3 实例:用PyTorch完成图像识别任务
- 15.4 后续思考
- 15.5 小结
- 第16章 提升模型性能的几种技巧
- 16.1 问题:为什么有些模型尝试了很多方法仍然效果不佳?
- 16.2 找到合适的学习率
- 16.3 正则化
- 16.4 合理的初始化
- 16.5 选择合适的优化器
- 16.6 GPU加速
- 16.7 后续思考
- 16.8 小结
- 第17章 Keras入门
- 17.1 问题:为何选择Keras架构?
- 17.2 Keras简介
- 17.3 Keras常用概念
- 17.4 Keras常用层
- 17.5 神经网络核心组件
- 17.6 Keras的开发流程
- 17.7 实例:Keras程序的开发流程
- 17.8 后续思考
- 17.9 小结
- 第18章 用Keras实现图像识别
- 18.1 实例1:用自定义模型识别手写数字
- 18.2 实例2:用预训练模型识别图像
- 18.3 后续思考
- 18.4 小结
- 第19章 用Keras实现迁移学习
- 19.1 问题:如何发挥小数据的潜力?
- 19.2 迁移学习简介
- 19.3 迁移学习常用方法
- 19.4 实例:用Keras实现迁移学习
- 19.5 后续思考
- 19.6 小结
- 第20章 用Keras实现风格迁移
- 20.1 问题:如何捕捉图像风格?
- 20.2 通道与风格
- 20.3 内容损失与风格损失
- 20.4 格拉姆矩阵简介
- 20.5 实例:用Kreras实现风格迁移
- 20.6 后续思考
- 20.7 小结
- 下载链接
FAQ
Can I read this book if I have never programmed before?
What math background does the machine learning section require?
What level will I reach after finishing this book?
What software environment do I need to install in advance?
Comments
Find this book
This site is an index: you start “Search all sources” in your browser, and the entries it lists all point to third-party sites; please judge their availability yourself.
About the author
Wu Maogui — public information about this author is limited, and no authoritative account of their identity or background is available. Their writing direction can nonetheless be inferred from the two works held in the collection, both in computing and artificial intelligence: AIGC Principles and Practice: Learning Large Language Models, Diffusion Models, and Multimodal Models from Scratch, and From Python Basics to AI in Practice. The first introduces generative AI to beginners, explaining the principles of large language models, diffusion models, and multimodal models while guiding readers through hands-on practice; the second starts from Python and gradually moves toward applied artificial intelligence. Both emphasize a path from fundamentals to practical work, using accessible language suited to readers without prior background. Wu Maogui's writing thus tends to break complex technologies into actionable introductory material, combining conceptual explanation with exercises for newcomers to the field.
Public information about Wang Hongxing is limited, and what is available comes mainly from works published under this name. Four titles are held in the collection, spanning a notably wide range of subjects: practical medical reading for grassroots audiences such as Appropriate Community Rehabilitation Techniques; inspirational and personal-growth compilations such as The Carnegie Quartet and The Art of Carnegie Communication and the Wisdom of Conducting Oneself (new edition); and an introductory technology book, Python from Beginner to AI in Practice. These works suggest a style of writing oriented toward popularizing knowledge and offering practical guidance for general readers, with an emphasis on applicability across fields including health and rehabilitation, interpersonal communication, and introductory programming. As the author's dates of birth and death, nationality, and professional background are unknown, a full personal profile cannot be drawn; the works above are the only basis for understanding the direction of this author's writing.
Liu Weixin is a Chinese-language author of technical books active in the fields of programming design and artificial intelligence. Publicly available information about him is limited, and details such as his nationality, dates of birth and death, and English name remain unknown. Judging from the three works held in the collection, his writing focuses on turning technical knowledge into actionable practice: Build Your Own Big Data System (2nd Edition) guides readers in building a data system from scratch, Database Application in Practice centers on the practical use of databases, and From Python Basics to AI in Practice links language fundamentals with intelligent applications in one continuous path. Overall, these works are hands-on, step-by-step, and oriented toward real projects, making them suitable for beginners and intermediate readers who prefer learning by doing. They thus give him a fairly clear practice-oriented position among books on programming and artificial intelligence.
Hu Zhenxing is a Chinese author of computer books, about whom publicly available information is currently limited. Judging from the two works held in the collection, Practical Database Applications and From Python Basics to Hands-On Artificial Intelligence, his writing focuses on programming design and artificial intelligence. The content is generally aimed at beginners and practical application, covering database operations and Python programming while extending to the implementation of artificial intelligence. Wording such as “practical” and “from basics to” in the titles suggests an approach that progresses from simple to advanced material and combines explanation with concrete operations, making the books suitable for beginners and self-learners who wish to get started quickly and learn by doing. Since the author's nationality, dates of birth and death, education, and professional background are not clearly documented, no speculation is made here; based solely on the existing works, the topics meet the practical needs of technology learners and offer useful reference value among introductory programming and applied artificial intelligence books.