Machine Learning Notebook - Week 1 - Andrew Ng

Intro to ML

  • Def of ML by Tom Mitchell:
    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.

Supervised Learning

Give the algorithm a dataset which contains the right answers(labels), then:
  • Regression: teach the algorithm to predict a continuous value output

Predict the housing price in function of house size

  • Classification : teach the algorithm to predict a category value output
    Predict a linear function to classify the tumor

Supervised Learning

  • Clustering

Give the algorithm a dataset without knowing the labels, then teach the algorithm to cluster them and then given a new data, to predict which cluster it probably belongs to.

eg: Google news clusters new stories about the same topics together.

  • Cocktail Party Algorithm
    Separate mixed audio source recording into individual voice.

Programming with Octave in Matlab

[W,s,v]=svd((repmat(sum(x.*x,1),size(x,1),1).*x)*x');

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

Exercise

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.

1) 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”.
This is an unsupervised learning/clustering problem (similar to the Google News example in the lectures).

2) Given a large dataset of medical records from patients suffering from heart disease, try to learn whether there might be different clusters of such patients for which we might tailor separate treatements.
This can be addressed using an unsupervised learning, clustering, algorithm, in which we group patients into different clusters.

3) Given genetic (DNA) data from a person, predict the odds of him/her developing diabetes over the next 10 years.
This can be addressed as a supervised learning, classification, problem, where we can learn from a labeled dataset comprising different people’s genetic data, and labels telling us if they had developed diabetes.

4) 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).
This can be addressed as a supervised learning, classification, problem, where we learn from the labeled data to predict gender.

5) In farming, given data on crop yields over the last 50 years, learn to predict next year’s crop yields.
This can be addresses as a supervised learning problem, where we learn from historical data (labeled with historical crop yields) to predict future crop yields.

6) Examine a large collection of emails that are known to be spam email, to discover if there are sub-types of spam mail.
This can addressed using a clustering (unsupervised learning) algorithm, to cluster spam mail into sub-types.

7) Examine a web page, and classify whether the content on the web page should be considered “child friendly” (e.g., non-pornographic, etc.) or “adult.”
This can be addressed as a supervised learning, classification, problem, where we can learn from a dataset of web pages that have been labeled as “child friendly” or “adult.”

8) Examine the statistics of two football teams, and predicting which team will win tomorrow’s match (given historical data of teams’ wins/losses to learn from)
This can be addressed using supervised learning, in which we learn from historical records to make win/loss predictions.

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值