# Tagged Questions

68 views

### Rewriting the matrix equation $AX = YB$ as $Y = CX$?

Is it possible in general, if $A,B,C,X,Y$ are square and of the same dimensions? If so, does it generalize to non-square matrices (using a pseudoinverse)? I'm doing some curve fitting in which I have ...
34 views

### Derivative of logistic loss function

I am using logistic in classification task. The task equivalents with find $\omega, b$ to minimize loss function: That means we will take derivative of L with respect to $\omega$ and $b$ (assume y ...
33 views

### Bayesian linear regression cost function

I am studying classification using linear regression . Now, I want to map it in Bayesian regression. Let talk about binary classification using linear regression again. Assume that I have a set ...
15 views

### Derivation of SSE gradient for Linear Regression

In my text book it gives the derviation of the gradient for the likelihood of a linear regression model (to minimize the negative log likelihood by minimizing the Sum Squared Error). The first line ...
44 views

### Help larry water his tomato plants with math

I have a bit of a real world problem that I believe Math can help me solve. I think it might be easiest to phrase in a manor similar to that of high school textbook. Larry has a device that can ...
32 views

### Calculating R-squared with duplicate data

I have the following question regarding the proper usage of R-squared value. Say I have an equation, that predicts energy consumption for the month of a building. One of the input variables accounts ...
32 views

### Multiple Linear Regression sample problem:

I am currently studying linear regression, but I am not sure I understand everything correctly. I was trying to solve some of the exercises at the end of my book, and I picked a random one below. I am ...
24 views

### Simple linear regression prove variables are uncorrelated:

I am working on the following problem: In a problem of simple linear regression, $$Y = \hat\beta_0 + \hat\beta_1 x(bar),$$ show that the random variables $\hat\beta_1$ and $Y$ are un-correlated (All ...
31 views

### Smallest set of Liner equations, which exactly fit a set of points

I have a set of 2-d points,(it can be of any arbitrary dimension n). I want to find the minimum set of straight lines(linear equations) which exactly passes through the given 2-d points (unlike ...
39 views

### How do I go from $(X\beta)'Y$ to $Y'(X\beta)$ when solving OLS in matrix form?

When I first learned how to derive the OLS $\beta$ in matrix form, I learned to take the derivative of the summation first, then convert into matrix form. In other words Using calculus, we derive ...
16 views

### Regression factors and covariance matrix

I am trying to follow some notes. They have two matrices. One is called comfact (company factors). This is a $580 \times 5$ matrix. The $580$ rows represent $580$ different companies. The $5$ ...
20 views

### linear regression optimization

If I have this equation to be minimized (it is from linear regression) and the example is: or in its complete form: so it says that one needs to minimize the function J(theta). The parts of ...
36 views

### Linear Regression Question (Linear Algebra) Help!!

Hey guys, I have a quick question. I am trying to prove that the squared sample correlation between fitted and observed values is equal to $R^2$ (coefficient of determination). I am having a lot of ...
84 views

### connection between PCA and linear regression

Is there a formal link between linear regression and PCA? The goal of PCA is to decompose a matrix into a linear combination of variables that contain most of the information in the matrix. Suppose ...
68 views

### Contrary interpretations of Least Squares for Regression

According to the original thought, our goal is to minimize the quadratic error $$\min\{\frac{1}{2}(Ax-b)^2 \}$$ Then, we search the extremum by the derivation of $x$ $$A^T(Ax-b)=0$$ $$A^TAx=A^Tb$$ ...
24 views

### MSE of weighted PCA estimator

I need to calculate the variance of this estimator which is a generalisation of the OLS estimator: OLS: $Y=X\beta+e$ where Y is n*1 vector of responses X is n*p pbserved matrix of regressor ...
55 views

### Bias in Principal Components Regression

Assume we have the well known OLS model $Y=X\beta+e$ where Y is n*1 vector of responses X is n*p pbserved matrix of regressor variables $\beta$ is a p*1 vector of unknown parameters e is a n*1 ...
82 views

### Solution to linear system of equations

Notation. Let $y$, $a$, and $b$ be $n\times 1$, $p\times 1$, and $q\times1$ real vectors. Let also $X$ and $Z$ be $n\times p$ and $n \times q$ real matrices. Suppose that there is no solution, $a$, ...
157 views

### Quadratic form as a ratio of determinants

I am looking for some hints to prove the following equality: $y^{\top}y - y^{\top}X(X^{\top}X)^{-1}X^{\top}y = \dfrac{\det(L^{\top}L)}{\det(X^{\top}X)},$ where $y$ is a $n\times 1$ vector, $X$ is a ...
30 views

### How to do regression for an exponential model?

I have data in the form of: (x1, y1, z1 || t1) (x2, y2, z2 || t2) ... (xN, yN, zN || tN) Where (x,y,z) pairs are inputs, are t's are outputs. Using this data I ...
494 views

### Least Squares “analytic expression” for fitting a 2D quadratic function to measurements

I have n scattered elevation measurements: $\{x_i,y_i,z_i\}_{i=1..n}$ that I want to fit a quadratic function to: $z = ax^2 + by^2 + cxy + dx + ey + f$. The problem can be written as a vector ...
333 views

684 views

### Best-fitting plane

I need to implement the algorithm described below. Everything is fine until the eigenvalues computation. I'm completely new to them and I found a lot of very complicated paper on the net. Is it ...
95 views

### Is this expression correct?

sorry I don't know how to post Latex here I have to implement in Matlab the following formula and I'd like to know if the expression given here really corresponds to the minimum indicated, and why: ...
I am writing a program that inputs a sequence of points $(x_i,y_i)$ based on the user clicking on certain pixels in an image shown. The program should then find the "best -fitting" line in the least ...