Convert Figma logo to code with AI

fengdu78 logoCoursera-ML-AndrewNg-Notes

吴恩达老师的机器学习课程个人笔记

31,482
10,562
31,482
65

Top Related Projects

VIP cheatsheets for Stanford's CS 229 Machine Learning

⛔️ DEPRECATED – See https://github.com/ageron/handson-ml3 instead.

The "Python Machine Learning (1st edition)" book code repository and info resource

Machine Learning From Scratch. Bare bones NumPy implementations of machine learning models and algorithms with a focus on accessibility. Aims to cover everything from linear regression to deep learning.

A curated list of awesome Machine Learning frameworks, libraries and software.

📺 Discover the latest machine learning / AI courses on YouTube.

Quick Overview

The "Coursera-ML-AndrewNg-Notes" repository is a comprehensive collection of notes and resources for Andrew Ng's Machine Learning course on Coursera. It provides Chinese translations of course materials, including lecture slides, programming assignments, and additional explanations to help learners better understand the concepts.

Pros

  • Offers detailed Chinese translations of course materials, making it accessible to Chinese-speaking learners
  • Includes additional explanations and insights to supplement the original course content
  • Provides organized and well-structured notes for easy reference and study
  • Contains programming assignments and solutions to help reinforce learning

Cons

  • Primarily focused on Chinese translations, which may limit its usefulness for non-Chinese speakers
  • May not always be up-to-date with the latest course revisions or updates
  • Potential copyright concerns as it contains translated course materials
  • Reliance on external resources (e.g., images) may lead to broken links over time

Code Examples

This repository is not a code library but rather a collection of notes and resources. Therefore, there are no specific code examples to showcase.

Getting Started

As this is not a code library, there are no specific getting started instructions. However, users can access the repository by visiting the GitHub page and navigating through the folders to find relevant notes and resources for each week of the course.

Competitor Comparisons

VIP cheatsheets for Stanford's CS 229 Machine Learning

Pros of stanford-cs-229-machine-learning

  • Offers concise, visually appealing cheat sheets for quick reference
  • Covers a broader range of advanced ML topics from Stanford's CS229 course
  • Available in multiple languages, making it accessible to a wider audience

Cons of stanford-cs-229-machine-learning

  • Lacks detailed explanations and in-depth code examples
  • Does not provide comprehensive lecture notes or video content
  • May be more challenging for beginners due to its condensed format

Code Comparison

stanford-cs-229-machine-learning:

# No specific code examples provided in the cheat sheets

Coursera-ML-AndrewNg-Notes:

function [J, grad] = costFunction(theta, X, y)
    m = length(y);
    J = (-1/m) * sum(y.*log(sigmoid(X*theta)) + (1-y).*log(1-sigmoid(X*theta)));
    grad = (1/m) * X' * (sigmoid(X*theta) - y);
end

The Coursera-ML-AndrewNg-Notes repository provides more detailed code examples, primarily in MATLAB/Octave, while stanford-cs-229-machine-learning focuses on concise theoretical concepts without extensive code samples.

⛔️ DEPRECATED – See https://github.com/ageron/handson-ml3 instead.

Pros of handson-ml

  • More comprehensive coverage of modern machine learning techniques and libraries (e.g., TensorFlow, Scikit-learn)
  • Practical, hands-on approach with numerous code examples and Jupyter notebooks
  • Regularly updated to reflect the latest developments in ML and deep learning

Cons of handson-ml

  • Less focus on mathematical foundations and theoretical concepts
  • May be more challenging for absolute beginners in machine learning
  • Requires familiarity with Python programming

Code Comparison

handson-ml (using Scikit-learn):

from sklearn.linear_model import LinearRegression
model = LinearRegression()
model.fit(X_train, y_train)
predictions = model.predict(X_test)

Coursera-ML-AndrewNg-Notes (using Octave/MATLAB):

theta = zeros(n, 1);
for iter = 1:num_iters
    theta = theta - alpha * (1/m) * X' * (X * theta - y);
end
predictions = X * theta;

The handson-ml repository uses modern Python libraries, while Coursera-ML-AndrewNg-Notes focuses on implementing algorithms from scratch in Octave/MATLAB. This difference reflects the practical vs. theoretical approaches of the two resources.

The "Python Machine Learning (1st edition)" book code repository and info resource

Pros of python-machine-learning-book

  • More comprehensive coverage of Python-specific machine learning implementations
  • Includes practical examples and code snippets for immediate application
  • Regularly updated with modern machine learning techniques and libraries

Cons of python-machine-learning-book

  • Less focus on theoretical foundations compared to Coursera-ML-AndrewNg-Notes
  • May be more challenging for absolute beginners in machine learning
  • Doesn't cover some classical algorithms in as much depth

Code Comparison

Coursera-ML-AndrewNg-Notes (MATLAB/Octave):

theta = zeros(n, 1);
for iter = 1:num_iters
    h = X * theta;
    theta = theta - alpha * (1/m) * X' * (h - y);
end

python-machine-learning-book (Python):

def gradient_descent(X, y, theta, alpha, num_iters):
    m = len(y)
    for _ in range(num_iters):
        h = X.dot(theta)
        theta -= alpha * (1/m) * X.T.dot(h - y)
    return theta

Both repositories provide valuable resources for learning machine learning, but they cater to different audiences and programming languages. Coursera-ML-AndrewNg-Notes focuses on theoretical foundations using MATLAB/Octave, while python-machine-learning-book emphasizes practical implementation in Python with modern libraries and techniques.

Machine Learning From Scratch. Bare bones NumPy implementations of machine learning models and algorithms with a focus on accessibility. Aims to cover everything from linear regression to deep learning.

Pros of ML-From-Scratch

  • Implements algorithms from scratch in Python, providing deeper understanding of ML concepts
  • Covers a wide range of ML algorithms, including deep learning and reinforcement learning
  • Includes practical examples and visualizations for each algorithm

Cons of ML-From-Scratch

  • Less structured learning path compared to Coursera-ML-AndrewNg-Notes
  • May lack detailed explanations and theoretical background provided in Andrew Ng's course
  • Not directly tied to a comprehensive course curriculum

Code Comparison

ML-From-Scratch (Neural Network implementation):

class NeuralNetwork():
    def __init__(self, n_hidden):
        self.n_hidden = n_hidden
        self.network = {}

    def _initialize_weights(self, X, y):
        n_samples, n_features = X.shape
        _, n_outputs = y.shape
        
        # Initialize weights between input layer and hidden layer
        self.network["W1"] = np.random.randn(n_features, self.n_hidden)
        self.network["b1"] = np.zeros((1, self.n_hidden))

Coursera-ML-AndrewNg-Notes (Neural Network implementation in MATLAB/Octave):

function [J grad] = nnCostFunction(nn_params, ...
                                   input_layer_size, ...
                                   hidden_layer_size, ...
                                   num_labels, ...
                                   X, y, lambda)

% Reshape nn_params back into the parameters Theta1 and Theta2, the weight matrices
% for our 2 layer neural network
Theta1 = reshape(nn_params(1:hidden_layer_size * (input_layer_size + 1)), ...
                 hidden_layer_size, (input_layer_size + 1));

A curated list of awesome Machine Learning frameworks, libraries and software.

Pros of awesome-machine-learning

  • Comprehensive resource covering a wide range of ML topics and tools
  • Regularly updated with contributions from the community
  • Includes links to libraries, frameworks, and resources across multiple programming languages

Cons of awesome-machine-learning

  • Less structured learning path compared to Coursera-ML-AndrewNg-Notes
  • May be overwhelming for beginners due to the vast amount of information
  • Lacks in-depth explanations and practical exercises found in a course format

Code comparison

While awesome-machine-learning doesn't provide direct code examples, it links to various libraries and frameworks. Coursera-ML-AndrewNg-Notes includes code snippets from the course. Here's a brief comparison:

awesome-machine-learning (linked resource example):

from sklearn.linear_model import LinearRegression
model = LinearRegression()
model.fit(X, y)

Coursera-ML-AndrewNg-Notes (course implementation):

function [theta] = gradientDescent(X, y, theta, alpha, num_iters)
    m = length(y);
    for iter = 1:num_iters
        theta = theta - alpha * (1/m) * X' * (X * theta - y);
    end
end

The awesome-machine-learning repository serves as a curated list of resources, while Coursera-ML-AndrewNg-Notes provides specific implementations and explanations from Andrew Ng's Machine Learning course.

📺 Discover the latest machine learning / AI courses on YouTube.

Pros of ML-YouTube-Courses

  • Covers a wider range of ML topics and courses from multiple sources
  • Regularly updated with new content and courses
  • Includes links to free YouTube videos, making it accessible to all learners

Cons of ML-YouTube-Courses

  • Less structured and cohesive compared to a single course format
  • May lack the depth and consistency of a curated course like Andrew Ng's
  • No direct association with a renowned institution or instructor

Code Comparison

ML-YouTube-Courses doesn't provide code samples directly, as it's a curated list of courses. Coursera-ML-AndrewNg-Notes includes code examples from the course, such as:

function J = computeCost(X, y, theta)
m = length(y);
J = 0;
J = (1/(2*m)) * sum(((X * theta) - y).^2);
end

Summary

ML-YouTube-Courses offers a diverse range of free ML resources from various sources, making it suitable for learners seeking a broad overview of ML topics. Coursera-ML-AndrewNg-Notes provides a more focused and structured approach, following a single course curriculum with associated code examples and notes. The choice between the two depends on the learner's preferences and learning style.

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

斯坦福大学2014(吴恩达)机器学习教程中文笔记

课程地址:https://www.coursera.org/course/ml

笔记在线阅读

Machine Learning(机器学习)是研究计算机怎样模拟或实现人类的学习行为,以获取新的知识或技能,重新组织已有的知识结构使之不断改善自身的性能。它是人工智能的核心,是使计算机具有智能的根本途径,其应用遍及人工智能的各个领域,它主要使用归纳、综合而不是演译。在过去的十年中,机器学习帮助我们自动驾驶汽车,有效的语音识别,有效的网络搜索,并极大地提高了人类基因组的认识。机器学习是当今非常普遍,你可能会使用这一天几十倍而不自知。很多研究者也认为这是最好的人工智能的取得方式。在本课中,您将学习最有效的机器学习技术,并获得实践,让它们为自己的工作。更重要的是,你会不仅得到理论基础的学习,而且获得那些需要快速和强大的应用技术解决问题的实用技术。最后,你会学到一些硅谷利用机器学习和人工智能的最佳实践创新。

本课程提供了一个广泛的介绍机器学习、数据挖掘、统计模式识别的课程。主题包括:

(一)监督学习(参数/非参数算法,支持向量机,核函数,神经网络)。

(二)无监督学习(聚类,降维,推荐系统,深入学习推荐)。

(三)在机器学习的最佳实践(偏差/方差理论;在机器学习和人工智能创新过程)。本课程还将使用大量的案例研究,您还将学习如何运用学习算法构建智能机器人(感知,控制),文本的理解(Web搜索,反垃圾邮件),计算机视觉,医疗信息,音频,数据挖掘,和其他领域。

本课程需要10周共18节课,相对以前的机器学习视频,这个视频更加清晰,而且每课都有ppt课件,推荐学习。

本人2014年下半年开始翻译本课程字幕,并写了课程的中文笔记。笔记被下载了几万次,应该帮助了不少人,也有很多人一直在帮助我,现在我把笔记的word原稿和markdown原稿分享给大家。

markdown的笔记和课程中英文字幕我将放在github,希望大家能继续完善。为方便数学公式的在线显示,在线观看的是html文件,公式已经被转为图片,公式源码在markdown文件。

最后想对各位朋友说: 赠人玫瑰,手有余香! 在人工智能的道路上,你不是一个人在战斗!

黄海广

2018-3-26 夜

微信公众号:机器学习初学者 gongzhong 我的知乎

参考:

  1. https://www.coursera.org/course/ml 机器学习公开课

  2. https://mooc.guokr.com/note/12/ 小小人_V 的个人笔记

  3. 《统计学习方法》李航

  4. 《机器学习课》邹博

备注:吴恩达老师的深度学习课(deepLearning.ai)的笔记地址:https://github.com/fengdu78/deeplearning_ai_books


文件夹说明:

docx:笔记的word版本

markdown:笔记的markdown版本

html:笔记的html版本

images:笔记的图片

ppt:课程的原版课件

srt:课程的中英文字幕(mp4文件需要在百度云下载,大家可以用记事本或者字幕编辑软件来编辑字幕,共同完善。

百度云链接:https://pan.baidu.com/s/1h8QjqBlOm0Exh7orm9teMQ 密码:d3we,下载后解压)

code:课程的python代码

机器学习课程视频:https://www.bilibili.com/video/BV1W34y1i7xK

笔记在线阅读

笔记pdf版本下载 :见Github根目录。

机器学习qq群:955171419(我们有13个群,加过一个就不需要加了)


机器学习教程中文笔记目录

一、 引言(Introduction)

1.1 欢迎

1.2 机器学习是什么?

1.3 监督学习

1.4 无监督学习

二、单变量线性回归(Linear Regression with One Variable)

2.1 模型表示

2.2 代价函数

2.3 代价函数的直观理解I

2.4 代价函数的直观理解II

2.5 梯度下降

2.6 梯度下降的直观理解

2.7 梯度下降的线性回归

2.8 接下来的内容

三、线性代数回顾(Linear Algebra Review)

3.1 矩阵和向量

3.2 加法和标量乘法

3.3 矩阵向量乘法

3.4 矩阵乘法

3.5 矩阵乘法的性质

3.6 逆、转置

四、多变量线性回归(Linear Regression with Multiple Variables)

4.1 多维特征

4.2 多变量梯度下降

4.3 梯度下降法实践1-特征缩放

4.4 梯度下降法实践2-学习率

4.5 特征和多项式回归

4.6 正规方程

4.7 正规方程及不可逆性(选修)

五、Octave教程(Octave Tutorial)

5.1 基本操作

5.2 移动数据

5.3 计算数据

5.4 绘图数据

5.5 控制语句:for,while,if语句

5.6 向量化 88

5.7 工作和提交的编程练习

六、逻辑回归(Logistic Regression)

6.1 分类问题

6.2 假说表示

6.3 判定边界

6.4 代价函数

6.5 简化的成本函数和梯度下降

6.6 高级优化

6.7 多类别分类:一对多

七、正则化(Regularization)

7.1 过拟合的问题

7.2 代价函数

7.3 正则化线性回归

7.4 正则化的逻辑回归模型

第八、神经网络:表述(Neural Networks: Representation)

8.1 非线性假设

8.2 神经元和大脑

8.3 模型表示1

8.4 模型表示2

8.5 样本和直观理解1

8.6 样本和直观理解II

8.7 多类分类

九、神经网络的学习(Neural Networks: Learning)

9.1 代价函数

9.2 反向传播算法

9.3 反向传播算法的直观理解

9.4 实现注意:展开参数

9.5 梯度检验

9.6 随机初始化

9.7 综合起来

9.8 自主驾驶

十、应用机器学习的建议(Advice for Applying Machine Learning)

10.1 决定下一步做什么

10.2 评估一个假设

10.3 模型选择和交叉验证集

10.4 诊断偏差和方差

10.5 正则化和偏差/方差

10.6 学习曲线

10.7 决定下一步做什么

十一、机器学习系统的设计(Machine Learning System Design)

11.1 首先要做什么

11.2 误差分析

11.3 类偏斜的误差度量

11.4 查准率和查全率之间的权衡

11.5 机器学习的数据

第7周

十二、支持向量机(Support Vector Machines)

12.1 优化目标

12.2 大边界的直观理解

12.3 数学背后的大边界分类(选修)

12.4 核函数1

12.5 核函数2

12.6 使用支持向量机

十三、聚类(Clustering)

13.1 无监督学习:简介

13.2 K-均值算法

13.3 优化目标

13.4 随机初始化

13.5 选择聚类数

十四、降维(Dimensionality Reduction)

14.1 动机一:数据压缩

14.2 动机二:数据可视化

14.3 主成分分析问题

14.4 主成分分析算法

14.5 选择主成分的数量

14.6 重建的压缩表示

14.7 主成分分析法的应用建议

十五、异常检测(Anomaly Detection)

15.1 问题的动机

15.2 高斯分布

15.3 算法

15.4 开发和评价一个异常检测系统

15.5 异常检测与监督学习对比

15.6 选择特征

15.7 多元高斯分布(选修)

15.8 使用多元高斯分布进行异常检测(选修)

十六、推荐系统(Recommender Systems)

16.1 问题形式化

16.2 基于内容的推荐系统

16.3 协同过滤

16.4 协同过滤算法

16.5 向量化:低秩矩阵分解

16.6 推行工作上的细节:均值归一化

十七、大规模机器学习(Large Scale Machine Learning)

17.1 大型数据集的学习

17.2 随机梯度下降法

17.3 小批量梯度下降

17.4 随机梯度下降收敛

17.5 在线学习

17.6 映射化简和数据并行

十八、应用实例:图片文字识别(Application Example: Photo OCR)

18.1 问题描述和流程图

18.2 滑动窗口

18.3 获取大量数据和人工数据

18.4 上限分析:哪部分管道的接下去做

十九、总结(Conclusion)

19.1 总结和致谢


机器学习qq群:955171419(我们有13个群,加过一个就不需要加了)