机器学习实战:基于Scikit-Learn和TensorFlow---第二章笔记

本文基于加州住房价格数据集,详细介绍了机器学习项目从目标设定到模型微调的完整流程。涵盖数据获取、预处理、模型选择与训练,以及性能评估。重点讲解了回归任务的性能指标如RMSE和MAE,并讨论了数据准备过程中的特征缩放和转换流水线。最后,通过线性回归、决策树和随机森林模型的对比,展示了模型选择与优化的重要性。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

机器学习实战:基于Scikit-Learn和TensorFlow—第二章笔记

一、学习目标

以加州住房价格的数据集作为数据源,来进行构建一个完整的机器学习的项目。

二、完整的处理流程

2.1、目标问题

拿到数据集,搭建机器学习的项目,我们肯定是希望从这个数据中分析出什么结果。所以我们的目标就是:根据数据集,对一个区域的房价中位数进行预测。你肯定知道这是一个典型的监督式学习任务(因为已经给出了标记的训练示例),而且也是一个典型的回归任务(因
为你要对某个值进行预测)。更具体地说,这是一个多变量回归问题,因为系统要使用多个特征进行预测(使用到区域的人口、收入中位数等)。

2.2、性能指标

你辛苦构建完模型后,肯定要选择一个指标来测试下你的模型到底表现如何吧。回归问题的典型性能衡量指标是均方根误差(RMSE)。

公式1-1:均方根误差(RMSE)

(∑i=1m(h(xi)−yi)2)m\sqrt{\frac{(\sum_{i=1}^m(h(x^i) - y^i)^2)}{m}}m(i=1m(h(xi)yi)2)

解释下其中的符号:

  • m是你在测量RMSE时,所使用的数据集中实例的数量(例如,如果你在评估RMSE时使用的验证集里包含2000个区域,则m=2000)

  • xix^i

Hands-On Machine Learning with Scikit-Learn and TensorFlow: Concepts, Tools, and Techniques to Build Intelligent Systems by Aurélien Géron English | 13 Mar. 2017 | ASIN: B06XNKV5TS | 581 Pages | AZW3 | 21.66 MB Through a series of recent breakthroughs, deep learning has boosted the entire field of machine learning. Now, even programmers who know close to nothing about this technology can use simple, efficient tools to implement programs capable of learning from data. This practical book shows you how. By using concrete examples, minimal theory, and two production-ready Python frameworks—scikit-learn and TensorFlow—author Aurélien Géron helps you gain an intuitive understanding of the concepts and tools for building intelligent systems. You’ll learn a range of techniques, starting with simple linear regression and progressing to deep neural networks. With exercises in each chapter to help you apply what you’ve learned, all you need is programming experience to get started. Explore the machine learning landscape, particularly neural nets Use scikit-learn to track an example machine-learning project end-to-end Explore several training models, including support vector machines, decision trees, random forests, and ensemble methods Use the TensorFlow library to build and train neural nets Dive into neural net architectures, including convolutional nets, recurrent nets, and deep reinforcement learning Learn techniques for training and scaling deep neural nets Apply practical code examples without acquiring excessive machine learning theory or algorithm details
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值