0

Given an example equation:

$$ z = Mx + Ny $$

where $M$, $N$ are unknown parameters and $x, y, z$ are features of a dataset.

My initial guess is to use gradient descent and the least squares error to obtain $M$ and $N$ from the dataset.

After that, we construct the inequality equations and apply these with the new equation (known $M$ and $N$) to a Lagrange multiplier to minimise $z$.

Is this a correct approach to the problem?

  • What are features of a dataset? Please do not use jargon from a specific field. Please state in what sets these variables and constants live. – Rodrigo de Azevedo Mar 01 '21 at 16:56
  • Basically, it's an example dataset with features x, y and z where x and y are directly proportional to z. –  Mar 01 '21 at 17:14
  • I'm basically wondering if M and N need to be found first or do we just use Lagrange multiplier to minimise z given a set of constraints. –  Mar 01 '21 at 17:15
  • I don't even know if they are scalars, vectors, matrices, etc. – Rodrigo de Azevedo Mar 01 '21 at 17:25

1 Answers1

0

As I understood, you have a data set $D=\{x_i,y_i,z_i\},\ \ i = 1,2\cdots,n$

so you can solve

$$ \min_{M,N}\sum_{i=1}^n\left(M x_i+N y_i-z_i\right)^2 $$

a typical least squares problem.

Cesareo
  • 33,252
  • I see, so if constraints are involved then we would just use the Lagrange multiplier instead? There isn't any need to obtain M and N first. –  Mar 01 '21 at 17:12
  • If the constraints are linear the problem can be easily solved using a quadratic programming solver. – Cesareo Mar 01 '21 at 17:28