278 views
2 2 votes

Consider the following piece-wise function as shown in the image:

$$
y(x)= \begin{cases}x^2 & x \leq 0 \\ 2 x & 0 \leq x \leq 2 \\ 4 x-4 & 2 \leq x\end{cases}
$$


How many sub-gradients are possible at points $a_1, a_2, a_3$ and $a_4$ ?

  1. $a_1$ : Many, $a_2$ : One, $a_3$ : Many, $a_4$ : One
     
  2. $a_1$ : One, $a_2$ : Many, $a_3$ : Many, $a_4$ : One
     
  3. $a_1$ : One, $a_2$ : Many, $a_3$ : One, $a_4$ : Many
     
  4. $a_1$ : Many, $a_2$ : One, $a_3$ : One, $a_4$ : Many

1 Answer

1 1 vote
$a_1$ lies on the part of the function which is differentiable. For a differentiable function (subpart), only one sub-gradient is possible which is the gradient itself.

$a_2$ lies at the intersection of two $x^2$ and $2 x$. The function is not differentiable at this point (as left slope is different from right slope). Hence there are multiple sub-gradients possible at $a_2$.

$a_3$ lies on the part of the function which is differentiable. For a differentiable function (subpart), only one sub-gradient is possible which is the gradient itself.

$a_4$ lies at the intersection of two $2 x$ and $4 x-4$. The function is not differentiable at this point (as left slope is different from right slope). Hence there are multiple sub-gradients possible at $a_2$
Answer:
Position:
Show:

Related questions

0 0 votes
1 1 answer
282
282 views
GO Classes asked Sep 29, 2025
282 views
For a data set with $1000$ data points and $50$ features, assume that you keep $80\%$ of the data for training and the remaining $20\%$ of the data for validation during ...
0 0 votes
1 1 answer
265
265 views
GO Classes asked Sep 29, 2025
265 views
For a data set with $1000$ data points and $50$ features, $10$ -fold cross-validation will perform validation of how many models?$10$ $50$ $1000$ $500$
0 0 votes
1 1 answer
246
246 views
GO Classes asked Sep 29, 2025
246 views
Assuming that in the constrained version of ridge regression optimization problem, following are the weight vectors to be considered, along with the mean squared error (M...
0 0 votes
1 1 answer
342
342 views
GO Classes asked Sep 29, 2025
342 views
Assume that for a certain linear regression problem involving $4$ features, the following weight vectors produce an equal amount of mean square error:$$\begin{aligned}& w...