COURSERA- 吴恩达机器学习 Machine Learning by Andrew NG

COURSERA- Machine Learning by Andrew NG
Here are my on-going study notes for “Machine Learning by Andrew NG” on Coursera. I didn’t pay for the course yet, coz there is no study-free schedule for 吴恩达机器学习课程 in the Coursera student’s account.

Week 1 Introduction
Lesson 1 Welcome

machine learning
-Grew out of work in ai
-New capability for computers
Examples:
• Database mining
◦ Large datasets from growth of automation/web.
e.g., Web click data, medical records, biology, engineering
• Application can’t program by hand.
e.g., Autonomous helicopter, handwriting recognition, most of natural language processing (NLP), computer vision.
• Self-customizing programs
e.g., Amazon, Netflix product recommendations
• Understanding human learning(brain, real AI)

Lesson 2 What is machine learning
在这里插入图片描述
task T is the goal is the task – classifying emails as spam or not spam
experience E is the experience – you label emails as spam or not spam
measure P is the performance – the number or the fraction of emails correctly classified as spam or not spam.


What is Machine Learning?

Two definitions of Machine Learning are offered:
Arthur Samuel described it as: “the field of study that gives computers the ability to learn without being explicitly programmed.” This is an older, informal definition.
Tom Mitchell provides a more modern definition: “A computer program is said to learn from experience E with respect to some class of tasks T and performance measure P, if its performance at tasks in T, as measured by P, improves with experience E.”

Example: playing checkers.

E = the experience of playing many games of checkers

T = the task of playing checkers.

P = the probability that the program will win the next game.

In general, any machine learning problem can be assigned to one of two broad classifications:

Supervised learning and Unsupervised learning.

Lesson 3 supervised learning

supervised learning: a given data set && already known the right answers output

supervised learning:
1.regression回归 problem: continuous valued output
2.classification problem: discrete离散的 valued output (0,1)

regression =〉 size of house as x, predict its price as y, price is continuous output
classification =〉 given a patient with a tumor, we have to predict whether the tumor is malignant or benign


Supervised Learning

=>In supervised learning, we are given a data set and already know what our correct output should look like, having the idea that there is a relationship between the input and the output.

Supervised learning problems are categorized into “regression” and “classification” problems. In a regression problem, we are trying to predict results within a continuous output, meaning that we are trying to map input variables to some continuous function. In a classification problem, we are instead trying to predict results in a discrete (离散的) output. In other words, we are trying to map input variables into discrete categories.

Example 1:

Given data about the size of houses on the real estate market, try to predict their price. Price as a function of size is a continuous output, so this is a regression problem.

We could turn this example into a classification problem by instead making our output about whether the house “sells for more or less than the asking price.” Here we are classifying the houses based on price into two discrete categories.

Example 2:

(a) Regression - Given a picture of a person, we have to predict their age on the basis of the given picture

(b) Classification - Given a patient with a tumor, we have to predict whether the tumor is malignant or benign.

Lesson 4 Unsupervised Learning

Unsupervised Learning: with no idea what our results should look like, so there is no feedback based on that prediction results.

UL can derive the structure by clustering群聚 the data based on the relationships among variables in the data.

The complicated things can be done by just one line code, but it doesn’t mean easy for researchers to get there.
With Octave or Matlab, there are existed functions to be used.

Clustering: Take a collection of 1,000,000 different genes, and find a way to automatically group these genes into groups that are somehow similar or related by different variables, such as lifespan, location, roles, and so on.

Non-clustering: The “Cocktail Party Algorithm”, allows you to find structure in a chaotic environment. (i.e. identifying individual voices and music from a mesh of sounds at a cocktail party).


Unsupervised Learning

Unsupervised learning allows us to approach problems with little or no idea what our results should look like. We can derive structure from data where we don’t necessarily know the effect of the variables.

We can derive this structure by clustering the data based on relationships among the variables in the data.

With unsupervised learning there is no feedback based on the prediction results.

Example:

Clustering: Take a collection of 1,000,000 different genes, and find a way to automatically group these genes into groups that are somehow similar or related by different variables, such as lifespan, location, roles, and so on.

Non-clustering: The “Cocktail Party Algorithm”, allows you to find structure in a chaotic environment. (i.e. identifying individual voices and music from a mesh of sounds at a cocktail party).

Week1- Quiz 1
https://steemit.com/ai/@cuchicucha/machine-learning-stanford-university-coursera-week-1-quiz-1-introduction
Machine Learning Week 1, Quiz 1 - Introduction, Stanford University, Coursera
[x] Represents selected/correct answer
[ ] Not selected/incorrect answer

Question 1
A computer program is said to learn from experience E with
respect to some task T and some performance measure P if its
performance on T, as measured by P, improves with experience E.
Suppose we feed a learning algorithm a lot of historical weather
data, and have it learn to predict weather. What would be a
reasonable choice for P?

[ ] The weather prediction task.
[ ] The process of the algorithm examining a large amount of historical weather data.
[ ] None of these.
[x] The probability of it correctly predicting a future date’s weather.

A computer program is said to learn from experience E with
respect to some task T and some performance measure P if its
performance on T, as measured by P, improves with experience E.
Suppose we feed a learning algorithm a lot of historical weather
data, and have it learn to predict weather. In this setting, what is T?

[ ] The probability of it correctly predicting a future date’s weather.
[x] The weather prediction task.
[ ] The process of the algorithm examining a large amount of historical weather data.
[ ] None of these.

Question 2
The amount of rain that falls in a day is usually measured in
either millimeters (mm) or inches. Suppose you use a learning
algorithm to predict how much rain will fall tomorrow.
Would you treat this as a classification or a regression problem?
[It’s so confusing but trust yourself.]
[ ] Classification
[x] Regression

Suppose you are working on weather prediction, and your weather
station makes one of three predictions for each day’s weather:
Sunny, Cloudy or Rainy. You’d like to use a learning algorithm
to predict tomorrow’s weather.
Would you treat this as a classification or a regression problem?

[ ] Regression
[x] Classification

Question 3
Suppose you are working on stock market prediction. You would like to predict whether or not
a certain company will win a patent infringement lawsuit (by training on data of companies
that had to defend against similar lawsuits). Would you treat this as a classification or a
regression problem?

[x] Classification
[ ] Regression

Suppose you are working on stock market prediction. You would like to predict whether or not
a certain company will declare bankruptcy within the next 7 days (by training on data of
similar companies that had previously been at risk of bankruptcy). Would you treat this as a
classification or a regression problem?

[x] Classification
[ ] Regression

Suppose you are working on stock market prediction, Typically
tens of millions of shares of Microsoft stock are traded
(i.e., bought/sold) each day. You would like to predict the
number of Microsoft shares that will be traded tomorrow.
Would you treat this as a classification or a regression problem?

[x] Regression
[ ] Classification

Question 4!!!

Tips to Q4:
supervised learning- regression or classification unsupervised learning- clustering or non-clustering
It will be so confusing when you classify these two learning based on the definiton whether or not there is feedback based on the prediction work.

Some of the problems below are best addressed using a supervised
learning algorithm, and the others with an unsupervised
learning algorithm. Which of the following would you apply
supervised learning to? (Select all that apply.) In each case, assume some appropriate
dataset is available for your algorithm to learn form.

[ ] Examine a large collection of emails that are known to be spam email, to discover if
there are sub-types of spam mail. [clustering problem]
[ ] Take a collection of 1000 essays written on the US Economy, and find a way to
automatically group these essays into a small number of groups of essays that are
somehow “similar” or “related”. [clustering problem]
[x] Given 50 articles written by male authors, and 50 articles written by female authors,
learn to predict the gender of a new manuscript’s author (when the identity of this
author is unknown). [classification problem]
[x] Given historical data of children’s ages and heights, predict children’s height as a
function of their age.[regression problem]

Some of the problems below are best addressed using a supervised learning algorithm, and
the others with an unsupervised learning algorithm. Which of the following would you apply
supervised learning to? (Select all that apply.) In each case, assume some appropriate dataset
is available for your algorithm to learn from.

[x] Given genetic (DNA) data from a person, predict the odds of him/her developing
diabetes over the next 10 years. [classification problem]
[x] Examine the statistics of two football teams, and predict which team will win
tomorrow’s match (given historical data of teams’ wins/losses to learn from). [classification problem]
[ ] Examine a large collection of emails that are known to be spam email, to discover if
there are sub-types of spam mail. [clustering problem]
[ ] Take a collection of 1000 essays written on the US Economy, and find a way to
automatically group these essays into a small number of groups of essays that are
somehow “similar” or “related”. [clustering problem]

Question 5
Which of these is a reasonable definition of machine learning?

[ ] Machine learning learns from labeled data.
[ ] Machine learning is the science of programming computers.
[ ] Machine learning is the field of allowing robots to act intelligently.
[x] Machine learning is the field of study that gives computers the ability to learn
without being explicitly programmed. [xxx said]

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值