Recent questions tagged linear-regression

0 0 votes
0 0 answers
126
126 views
Suppose you have $m=14$ training examples with $n=3$ features (excluding the additional allones feature for the intercept term, which you should add). The normal equation...
1 1 vote
1 1 answer
207
207 views
Kevin is trying to fit a simple linear regression model $\hat{y}=\theta_0+\theta_1 x$ on a dataset with 900 observations.After determining $\hat{\theta_0}$ and $\hat{\the...
0 0 votes
1 1 answer
186
186 views
Let's work out a two-way least-squares linear regression method. The $i$ th observation is the ordered pair $\left(x_i, y_i\right)$. We're going to view these data in two...
0 0 votes
1 1 answer
167
167 views
The original training loss used for standard least squares regression:$$\operatorname{Loss}(w)=\sum_{i=1}^n\left(y^{(i)}-w^{\top} x^{(i)}\right)^2$$The individual datapoi...
2 2 votes
1 1 answer
224
224 views
Let $w^*$ be the solution you obtain in standard least-squares linear regression. What solution do you obtain if you scale all the input features (but not the labels $y$ ...
0 0 votes
1 1 answer
185
185 views
Suppose we have a training dataset $D$ for linear regression that is the union of two (disjoint) datasets $A$ and $B$, where $|A| \gg|B|$. For example, $A$ and $B$ might ...
0 0 votes
1 1 answer
154
154 views
Using monthly stock averages, $x_1, x_2, \ldots x_n$, you run linear regression without regularization to estimate some future stock value $y$. However, your test error r...
0 0 votes
1 1 answer
156
156 views
Consider a modification of the standard linear regression setup where each datapoint is associated with an importance weight. Formally, we have a training dataset consist...
0 0 votes
1 1 answer
153
153 views
Consider a modification of the standard linear regression setup where each datapoint is associated with an importance weight. Formally, we have a training dataset consist...
0 0 votes
1 1 answer
259
259 views
Consider the following 1-D data set :Beatriz decides that for her application, small errors in the predicted $y$-values are irrelevant. She designs a new loss function $\...
0 0 votes
1 1 answer
163
163 views
Consider the following 1-D data set :What is the mean-squared error (MSE) on this data for the hypothesis $ \hat{y}=2x_i $ $?$
0 0 votes
1 1 answer
156
156 views
We would like to compare the regression model $\hat{y}=w^2 x+w x $ $(1)$ to the following regression model:$$\hat{y}=w x .... (2)$$Given limited training data, which mod...
1 1 vote
1 1 answer
146
146 views
We would like to compare the regression model $\hat{y}=w^2 x+w x $ $(1)$ to the following regression model:$$\hat{y}=w x .... (2)$$Given limited training data, which mod...
0 0 votes
1 1 answer
228
228 views
We would like to use the following regression function:$$\hat{y}=w^2 x+w x$$where $x$ is a single value variable. Given a set of training data points $\left\{\left(x_i, y...
1 1 vote
1 1 answer
190
190 views
You want to estimate a quantity $y$ as a function of $x$. Suppose you decide to model your estimate $\hat{y}$ as follows:$$\hat{y}=\theta \sqrt{x}$$Note that our model ha...
0 0 votes
1 1 answer
207
207 views
Consider a dataset with $N$ examples: $\left\{\left(x_i, y_i\right) \mid 1 \leq i \leq N\right\}$, where both $x_i$ and $y_i$ are real valued for all $i$. The data is mod...
0 0 votes
1 1 answer
223
223 views
Consider a dataset with $N$ examples: $\left\{\left(x_i, y_i\right) \mid 1 \leq i \leq N\right\}$, where both $x_i$ and $y_i$ are real valued for all $i$. The data is mod...
0 0 votes
1 1 answer
200
200 views
Consider the following data with one input and one output.What is the mean squared training set error of running linear regression on this data (using the model $y=w_0+w_...
1 1 vote
1 1 answer
214
214 views
Consider the following data with one input and one output :What is the mean squared leave-one-out cross-validation (LOOCV) error of running linear regression on this data...
2 2 votes
1 1 answer
212
212 views
Consider the following data with one input and one output :What is the mean squared test set error of running linear regression on this data, assuming the rightmost three...
0 0 votes
1 1 answer
173
173 views
Consider the following data with one input and one output :What is the mean squared training set error of running linear regression on this data (using the model $y=w_0+w...
0 0 votes
1 1 answer
151
151 views
Consider the two datasets shown below: D1 and D2. When fitting a linear regression model to predict the $y$-axis value as output, given the $x$ -axis value as input, whic...
0 0 votes
2 2 answers
165
165 views
Let's consider regression in one dimension, so our inputs $x^{(i)}$ and outputs $y^{(i)}$ are in $\mathbb{R}$.Linny uses regular linear regression. Given the following da...
1 1 vote
1 1 answer
163
163 views
What shape is the objective function when considering both parameters $w$ and $b$ of linear regression $\hat{y}=w x+b$ $?$$$J(w, b)=\frac{1}{2}\left[\left(y^{(1)}-\left(...
1 1 vote
1 1 answer
162
162 views
Which is a correct depiction of linear regression error lines for $x \in \mathbb{R}$, $\hat{y}=w x+b$ ABBoth A and BNone of the above
0 0 votes
2 2 answers
284
284 views
Consider a scenario where the output has $K$ possible levels ranging from $\{1, \ldots, K\}$. This is typically a classification problem.Can we treat these levels $\{1, \...
1 1 vote
1 1 answer
228
228 views
Let $A$ be an $m \times n$ matrix. Which of the following may ba false?  The equation $A^T A \mathbf{x}=A^T \mathbf{b}$ is always consistent for any $\mathbf{b}$ in $\mat...
0 0 votes
1 1 answer
180
180 views
Does there exists a $3 \times 2$ matrix $A$ and a vector $b$ such that $A x=b$ does not have a least-squares solution $?$(Please put 0 for False and 1 for True )
0 0 votes
2 2 answers
237
237 views
Which of the following is a least square solution $\hat{\mathrm{x}}$ to the equation $$ \left[\begin{array}{cc}1 & -2 \\2 & 1 \\1 & -2 \\2 & 1\end{array}\right] \mathbf{x...
0 0 votes
1 1 answer
180
180 views
Let $A=\left[\begin{array}{rr}1 & 3 \\ 1 & 2 \\ 1 & 1\\1 & 2\end{array}\right], \mathbf{b}=\left[\begin{array}{r}5 \\ 2 \\ -2 \\ 3\end{array}\right]$.(A) Write the normal...