Consider a two-class problem in \( \mathbb{R}^d \) with class labels red and green. Let \( \mu_{\text{red}} \) and \( \mu_{\text{green}} \) be the means of the two classes. Given test sample \( x \in \mathbb{R}^d \), a classifier calculates the squared Euclidean distance (denoted by \( \| \cdot \|^2 \)) between \( x \) and the means of the two classes and assigns the class label that the sample \( x \) is closest to. That is, the classifier computes
\[
f(x) = \| \mu_{\text{red}} - x \|^2 - \| \mu_{\text{green}} - x \|^2
\]
and assigns the label red to \( x \) if \( f(x)<0 \), and green otherwise. Which of the following statements is/are correct?
Show Hint
The function \( f(x) = \|\mu_{\text{red}} - x\|^2 - \|\mu_{\text{green}} - x\|^2 \) is linear in \( x \) because it involves the difference of linear terms with respect to \( x \).
The sample \( x = 0 \) is assigned the label green if \( \| \mu_{\text{red}} \| \| \mu_{\text{green}} \| \)
\( f \) is a linear function of \( x \)
\( f(x) = w^T x + b \), where \( w \) and \( b \) are functions of \( \mu_{\text{red}} \) and \( \mu_{\text{green}} \)
\( f \) is quadratic polynomial in \( x \)
Show Solution
Verified By Collegedunia
The Correct Option isB, C
Solution and Explanation
We are given that the classifier computes the squared Euclidean distance between \( x \) and the means of two classes, and we can expand the function \( f(x) \) as:
\[
f(x) = \|\mu_{\text{red}} - x\|^2 - \|\mu_{\text{green}} - x\|^2
\]
Expanding both terms:
\[
f(x) = (\mu_{\text{red}}^T \mu_{\text{red}} - 2 \mu_{\text{red}}^T x + x^T x) - (\mu_{\text{green}}^T \mu_{\text{green}} - 2 \mu_{\text{green}}^T x + x^T x)
\]
Simplifying:
\[
f(x) = (\mu_{\text{red}}^T \mu_{\text{red}} - \mu_{\text{green}}^T \mu_{\text{green}}) + 2 (\mu_{\text{green}}^T - \mu_{\text{red}}^T) x
\]
This shows that \( f(x) \) is a linear function of \( x \), so Option (B) is correct.
Also, \( f(x) \) can be written as \( f(x) = w^T x + b \), where \( w = 2(\mu_{\text{green}} - \mu_{\text{red}}) \) and \( b = \mu_{\text{red}}^T \mu_{\text{red}} - \mu_{\text{green}}^T \mu_{\text{green}} \), so Option (C) is also correct.
Was this answer helpful?
0
0
Top GATE DA Data Science and Artificial Intelligence Questions