• Wrong document? Swap it for free
  • Written by students who passed
  • Immediately available after payment
  • Read online or as PDF
Sell
Where do you study
Your language
Document preview thumbnail
Preview 3 out of 23 pages
Exam (elaborations)

UC Berkeley CS 189/289A Introduction to Machine Learning Fall 2025 Midterm Exam Solutions | Solved Questions, Correct Answers & Step-by-Step Explanations | Machine Learning Exam Study Guide 2026

Document preview thumbnail
Preview 3 out of 23 pages

UC Berkeley CS 189/289A Introduction to Machine Learning Fall 2025 Midterm Exam Solutions | Solved Questions, Correct Answers & Step-by-Step Explanations | Machine Learning Exam Study Guide 2026

Content preview

CS 189/289A, Midterm

Fall 2025


Name:

Email: @berkeley.edu

Student ID:

Room where you’re taking the exam:

Name and SID of the person on your right:

Name and SID of the person on your left:


Instructions:
This exam consists of 69 points spread out over 7 questions and the Honor Code certi-
fication. The exam must be completed in 110 minutes unless you have accommodations
supported by a DSP letter.
Note that you should select one choice for questions with circular bubbles. There is al-
ways at least one correct answer. Please fully shade in the circle to mark your answer.
For all math questions, please simplify your answer. Please also show your work if a
large box is provided. For all coding questions, you may use commas and/or one or more
function calls in each blank.
For all Python questions, you may assume Pandas has been imported as pd, NumPy has
been imported as np, and Plotly Express has been imported as px.
You MUST write your Student ID number at the top of each page.


Honor Code [1 Pt]:
As a member of the UC Berkeley community, I act with honesty, integrity, and respect
for others. I am the person whose name is on the exam, and I completed this exam in
accordance with the Honor Code.

Signature:


1

,CS 189/289A Midterm, Page 2 of 23 SID:

This page has been intentionally left blank.

, CS 189/289A Midterm, Page 3 of 23 SID:

1 Matching the Loss Surface

The following plots depict the error surfaces for several models on different datasets. The contour
plots show the contours of the error surface. Use these plots to answer the questions below.

60
35 50
50
30
40 40
25
30
Error




Error




Error
20 30

15 20 20

10 10 10
5
0 0
−6 −4 −2 0 2 4 6 −6 −4 −2 0 2 4 6 −6 −4 −2 0 2 4 6
w w w


(A) (B) (C)




(D) (E) (F)

(a) [1 Pt] Which of the following most accurately describes the loss surface in Figure (A)?
⃝ This is the loss for a least squares regression problem.
⃝ This is the loss of a linearly separable classification problem.
⃝ Significant L2 regularization is needed for this loss surface.
⃝ This is the loss of the classification problem.

(b) [2 Pts] Which of the above loss functions corresponds to the cross entropy loss for a logistic
regression model of the form y(x) = σ (x × w) where x, w ∈ R with the following data:

⃝ (A)
class 1
⃝ (B)
⃝ (C)
⃝ (D)
label




⃝ (E)
⃝ (F)
class 0

−3 −2 −1 0 1 2 3
x

Document information

Uploaded on
October 9, 2026
Number of pages
23
Written in
2026/2027
Type
Exam (elaborations)
Contains
Questions & answers
$18.49

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
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
wisenurse
5.0
(1)
Sold
48
Followers
2
Items
1272
Last sold
21 hours 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