100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached
logo-home
Coursera: Machine Learning - All weeks solutions [Assignment + Quiz] - Andrew NG $2.99   Add to cart

Exam (elaborations)

Coursera: Machine Learning - All weeks solutions [Assignment + Quiz] - Andrew NG

 2716 views  6 purchases
  • Course
  • Institution

Coursera: Machine Learning - All weeks solutions [Assignment + Quiz] PDF - Andrew NG. Coursera: Machine Learning - All Weeks solutions [Assignment + Quiz] - Andrew NG === Week 1 === Assignments: • No Assignment for Week 1 Introduction 1. A computer program is said to learn from experien...

Preview 10 out of 169  pages

  • June 8, 2021
  • 169
  • 2020/2021
  • Exam (elaborations)
  • Questions & answers
avatar-seller
,Coursera: Machine Learning - All
Weeks solutions [Assignment +
Quiz] - Andrew NG



=== Week 1 ===
Assignments:
• No Assignment for Week 1



Introduction
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?

o The probability of it correctly predicting a future date’s weather.

o The weather prediction task.

o The process of the algorithm examining a large amount of historical weather data.

o None of these.

,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. In this setting, what is T?

o The weather prediction task.

o None of these.

o The probability of it correctly predicting a future date’s weather.

o The process of the algorithm examining a large amount of historical weather data.



2. Suppose you are working on weather prediction, and use a learning algorithm to predict
tomorrow’s temperature (in degrees Centigrade/Fahrenheit).
Would you treat this as a classification or a regression problem?

o Regression

o Classification



2. 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?

o Regression

o Classification




3. Suppose you are working on stock market prediction, and you would like to predict the price of
a particular stock tomorrow (measured in dollars). You want to use a learning algorithm for
this.
Would you treat this as a classification or a regression problem?

, o Regression

o Classification



3. 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?

o Regression

o Classification



3. 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?

o Regression

o Classification




4. 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.

o Given historical data of children’s ages and heights, predict children’s height as a
function of their age.

o 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).

, o 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”.

o Examine a large collection of emails that are known to be spam email, to discover if
there are sub-types of spam mail.



4. 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.

o Given data on how 1000 medical patients respond to an experimental drug (such as
effectiveness of the treatment, side effects, etc.), discover whether there are different
categories or “types” of patients in terms of how they respond to the drug, and if so
what these categories are.

o 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 treatments.

o Have a computer examine an audio clip of a piece of music, and classify whether or
not there are vocals (i.e., a human voice singing) in that audio clip, or if it is a clip of only
musical instruments (and no vocals).

o Given genetic (DNA) data from a person, predict the odds of him/her developing
diabetes over the next 10 years.



Linear Regression with One Variable :
1. Consider the problem of predicting how well a student does in her second year of
college/university, given how well she did in her first year. Specifically, let x be equal to the
number of “A” grades (including A-. A and A+ grades) that a student receives in their first year of
college (freshmen year). We would like to predict the value of y, which we define as the number
of “A” grades they get in their second year (sophomore year).
Here each row is one training example. Recall that in linear regression, our hypothesis
is to denote the number of training examples.

, For the training set given above (note that this training set may also be referenced in other
questions in this quiz), what is the value of ? In the box below, please enter your answer
(which should be a number between 0 and 10).


4




2. Many substances that can burn (such as gasoline and alcohol) have a chemical structure based
on carbon atoms; for this reason they are called hydrocarbons. A chemist wants to understand
how the number of carbon atoms in a molecule affects how much energy is released when that
molecule combusts (meaning that it is burned). The chemist obtains the dataset below. In the
column on the right, “kJ/mol” is the unit measuring the amount of energy released.

, You would like to use linear regression ( ) to estimate the amount of energy
released (y) as a function of the number of carbon atoms (x). Which of the following do you
think will be the values you obtain for and ? You should be able to select the right answer
without actually implementing linear regression.

o = −569.6, = 530.9

o = −1780.0, = −530.9

o = −569.6, = −530.9

o = −1780.0, = 530.9

, 2. For this question, assume that we are using the training set from Q1.
Recall our definition of the cost function was
What is ? In the box below,
please enter your answer (Simplify fractions to decimals when entering answer, and ‘.’ as the
decimal delimiter e.g., 1.5).



0.5




3. Suppose we set in the linear regression hypothesis from Q1. What is ?


3




3. Suppose we set = −2, = 0.5 in the linear regression hypothesis from Q1. What is ?


1




4. Let be some function so that outputs a number. For this problem, is some
arbitrary/unknown smooth function (not necessarily the cost function of linear regression,
so may have local optima).
Suppose we use gradient descent to try to minimize as a function of and .
Which of the following statements are true? (Check all that apply.)

o If and are initialized at the global minimum, then one iteration will not change
their values.


o Setting the learning rate to be very small is not harmful, and can only speed up
the convergence of gradient descent.


o No matter how and are initialized, so long as is sufficiently small, we can
safely expect gradient descent to converge to the same solution.

, o If the first few iterations of gradient descent cause to increase rather
than decrease, then the most likely cause is that we have set the learning rate to too
large a value.




4. In the given figure, the cost function has been plotted against and , as shown in
‘Plot 2’. The contour plot for the same cost function is given in ‘Plot 1’. Based on the figure,
choose the correct options (check all that apply).




o If we start from point B, gradient descent with a well-chosen learning rate will
eventually help us reach at or near point A, as the value of cost function is
maximum at point A.


o If we start from point B, gradient descent with a well-chosen learning rate will
eventually help us reach at or near point C, as the value of cost function is
minimum at point C.


o Point P (the global minimum of plot 2) corresponds to point A of Plot 1.

, o If we start from point B, gradient descent with a well-chosen learning rate will
eventually help us reach at or near point A, as the value of cost function is
minimum at A.


o Point P (The global minimum of plot 2) corresponds to point C of Plot 1.

Linear Algebra :
1. Let two matrices be

,
What is A - B ?

o



o



o



o




1. Let two matrices be

,
What is A + B ?

The benefits of buying summaries with Stuvia:

Guaranteed quality through customer reviews

Guaranteed quality through customer reviews

Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.

Quick and easy check-out

Quick and easy check-out

You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.

Focus on what matters

Focus on what matters

Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!

Frequently asked questions

What do I get when I buy this document?

You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.

Satisfaction guarantee: how does it work?

Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.

Who am I buying these notes from?

Stuvia is a marketplace, so you are not buying this document from us, but from seller shawonfnf. Stuvia facilitates payment to the seller.

Will I be stuck with a subscription?

No, you only buy these notes for $2.99. You're not tied to anything after your purchase.

Can Stuvia be trusted?

4.6 stars on Google & Trustpilot (+1000 reviews)

76462 documents were sold in the last 30 days

Founded in 2010, the go-to place to buy study notes for 14 years now

Start selling
$2.99  6x  sold
  • (0)
  Add to cart