Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Document preview thumbnail
Preview 4 out of 31 pages
Exam (elaborations)

MACHINE LEARNING |COMPLETE STUDY GUIDE WITH 100% ACCURATE QUESTIONS & ANSWERS | ACE EVERY TEST | GUARANTEED EXCELLENCE.

Document preview thumbnail
Preview 4 out of 31 pages

MACHINE LEARNING |COMPLETE STUDY GUIDE WITH 100% ACCURATE QUESTIONS & ANSWERS | ACE EVERY TEST | GUARANTEED EXCELLENCE.

Content preview

MACHINE LEARNING |COMPLETE STUDY GUIDE WITH
100% ACCURATE QUESTIONS & ANSWERS | ACE EVERY
TEST | GUARANTEED EXCELLENCE.
What is the definition of learning from experience for a computer program? Answer: 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.
Which problems can be solved with unsupervised learning? #2 Answer: • approach problems
with little or no idea what our results should look like.
• derive structure from data where we don't necessarily know the effect of the variables.
What is the definition of a supervised learning problem? Answer: Given a training set, learn a
function h such that h of an input variable x is a "good" predictor for the corresponding output
variable y.
What is the definition of a hypothesis? Answer: The predicting function h.
Give the pictorial process for a supervised learning problem. Answer: Supervised Learning
Problem.
What do we call a learning problem, if the target variable is continuous? Answer: When the
target variable that we're trying to predict is continuous, the learning problem is also called a
regression problem.
What do we call a learning problem, if the target variable can take on only a small number of
values? Answer: When y can take on only a small number of discrete values, the learning
problem is also called a classification problem.
How do we measure the accuracy of a hypothesis function? Answer: By using a cost function,
usually denoted by J.
What is the definition of a cost function of a supervised learning problem? Answer: Takes an
average difference of all the results of the hypothesis with inputs from x's and the actual output
y's.


APPHIA – Crafted with Care and Precision for Academic Excellence.

1

,Give a pictorial representation of what the cost function of a supervised learning problem does.
Answer: Cost function of a supervised learning problem.
What are alternative terms of a Cost Function? #2 Answer: • Squared error function.
• Mean squared error.
What is a visual interpretation of the cost function? #2 Answer: • The training data set is
scattered on the X-Y plane.
• We are trying to make a straight line (defined by hθ(x)) which passes through these scattered
data points.
What is the contour line of a two variable function? Answer: A contour line of a two variable
function has a constant value at all points of the same line.
How do we implement an iteration step when calculating Gradient Descent in code? #2
Answer: • At each iteration j, one should simultaneously update the parameters.
• Updating a specific parameter prior to calculating another one on the j iteration would yield
to a wrong implementation.
State the algorithm for gradient descent. Answer: Repeat until convergence, where j=0,1
represents the feature index number.
Depict the graphical implementation of minimizing the cost function using gradient descent.
#2 Answer: • We put theta 0 on the x axis and theta 1 on the y axis, with the cost function on
the vertical z axis.
• The points on our graph will be the result of the cost function using our hypothesis with those
specific theta parameters.
Why does gradient descent, regardless of the slope's sign, eventually converge to its minimum
value? #2 Answer: The following graph shows that:
• when the slope is negative, the value of theta 1 increases.
• when the slope is positive, the value of theta 1 decreases.
Why should we adjust the parameter alpha when using gradient descent? #2 Answer: • To
ensure that the gradient descent algorithm converges in a reasonable time.



APPHIA – Crafted with Care and Precision for Academic Excellence.

2

,• Failure to converge or too much time to obtain the minimum value implies that our step size
is wrong.
How does gradient descent converge with a fixed step size alpha? #2 Answer: • As we
approach a local minimum, gradient descent will take smaller steps.
• Thus no need to decrease alpha over time.
What is the algorithm for implementing gradient descent for linear regression? #2 Answer: •
We can substitute our actual cost function and our actual hypothesis function.
• m is the size of the training set, theta 0 a constant that will be changing simultaneously with
theta 1 and x, y are values of the given training set (data).
Give a derivation of for a single example in batch gradient descent! (Gradient Descent For
Linear Regression) Answer: Derivation of a single variable in gradient descent.
What is batch gradient descent? #2 (Gradient Descent For Linear Regression) Answer: •
Gradient descent on the original cost function J.
•This method looks at every example in the entire training set on every step.
How does batch gradient descent differ from gradient descent? (Gradient Descent For Linear
Regression) Answer: While gradient descent can be susceptible to local minima in general,
batch gradient descent has only one global, and no other local, optima.
Depict an example of gradient descent as it is run to minimize a quadratic function. #2
Answer: • shown is the trajectory taken by gradient descent, which was initialized at 48,30.
• The x's in the figure (joined by straight lines) mark the successive values of theta that
gradient descent went through as it converged to its minimum.
What is multivariate linear regression? Answer: Linear regression with multiple variables.
What is the notation for equations where we can have any number of input variables?
(Multivariate Linear Regression) Answer: Notation.
What is the multivariate form of a hypothesis function? Answer: Multivariate form of the
hypothesis function.




APPHIA – Crafted with Care and Precision for Academic Excellence.

3

, What is the intuition of the multivariable form of a hypothesis function in the example of
estimating housing prices? #2 Answer: • We can think about theta 0 as the basic price of a
house, theta 1 as the price per square meter, theta 2 as the price per floor, etc.
• x1 will be the number of square meters in the house, x2 the number of floors, etc.
Give the vectorization of the multivariable form of a hypothesis function. Answer: Using the
definition of matrix multiplication, our multivariable hypothesis function can be concisely
represented as:
Why do we assume that x0=1 in multivariate linear regression? Answer: Convention.
What is the Gradient Descent for Multiple Variables? #2 Answer: • The gradient descent
equation itself is generally the same form.
• we just have to repeat it for our 'n' features.
How can we speed up gradient descent? Answer: We can speed up gradient descent by having
each of our input values in roughly the same range.
Why does feature scaling speed up gradient descent? #2 Answer: • This is because theta will
descend quickly on small ranges and slowly on large ranges.
• Thus it will oscillate inefficiently down to the optimum when the variables are very uneven.
What are the ideal ranges of our input variables in gradient descent? #2 Answer: • For
example a range between minus 1 and 1.
• These aren't exact requirements; we are only trying to speed things up.
What is feature scaling? #2 Answer: • Involves dividing the input values by the range (i.e. the
maximum value minus the minimum value) of the input variable.
• Results in a new range of just 1.
What is mean normalization? #2 Answer: • Involves subtracting the average value for an input
variable from the values for that input variable.
• Results in a new average value for the input variable of just zero.
How do you implement both feature scaling and mean normalization? #2 Answer: Feature
Scaling and Mean Normalization.



APPHIA – Crafted with Care and Precision for Academic Excellence.

4

Document information

Uploaded on
August 3, 2026
Number of pages
31
Written in
2026/2027
Type
Exam (elaborations)
Contains
Questions & answers
$14.99

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Seller avatar
Apphia
5.0
(1)
Sold
4
Followers
0
Items
3165
Last sold
2 months ago


Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions