Anyone up for simplifying a complex math expression?

I will post it here when I have a volunteer.

Thanks.

Here it is anyway…

I have a complex math problem that needs solving in my research project that I don’t have the time to solve.

It will need calculus and differentiation skills.

Let me know if you are interested.

For:

{f(w, b) = \frac{1}{m}\Large\sum_{i = 1}^{m}\left[\frac{\lvert w^{2}x^{(i)}-w(y^{(i)}-b)\rvert}{cos(tan^{-1}(\frac{y_o^{(i)}}{x_o^{(i)}}))}\right]}

And:

\LARGE{\frac{y_o^{(i)}}{x_o^{(i)}} = \frac{2w^{2}b -wx^{(i)}+ y^{(i)} + b}{w^2x^{(i)} - w(y^{(i)} - b)}}

Solve the simultaneous equations:

\Large{\frac{\partial{f(w, b)}}{\partial w } = 0} \text{ and } \Large{\frac{\partial{f(w, b)}}{\partial b } = 0}

For the variables w and b.

x^{(i)} \text{ and } y^{(i)} are each values from one of two different sets of m real numbers from i = 1 \text{ to } i = m

Hi! I took a look at your problem and here’s how I solved it:

The objective function is:

f(w, b) = \frac{1}{m} \sum_{i=1}^{m} \left[ \frac{w^2 x^{(i)} - w(y^{(i)} - b)}{\cos\left(\tan^{-1}\left(\frac{y^{(i)}}{x_0^{(i)}}\right)\right)} \right]

Let:

C^{(i)} = \cos\left(\tan^{-1}\left(\frac{y^{(i)}}{x_0^{(i)}}\right)\right)

Because, C^{(i)} is constant with respect to w and b.

Partial derivative w.r.t. w is:

\frac{\partial f}{\partial w} = \frac{1}{m} \sum_{i=1}^{m} \frac{1}{C^{(i)}} \left(2w x^{(i)} - (y^{(i)} - b)\right)

Also, partial derivative w.r.t. b is:

\frac{\partial f}{\partial b} = \frac{1}{m} \sum_{i=1}^{m} \frac{w}{C^{(i)}} = \frac{w}{m} \sum_{i=1}^{m} \frac{1}{C^{(i)}}

Now I set the gradients to zero. From:

\frac{\partial f}{\partial b} = 0 \Rightarrow w = 0

Substitute w = 0 into \frac{\partial f}{\partial w}:

\sum_{i=1}^{m} \frac{(y^{(i)} - b)}{C^{(i)}} = 0
b = \frac{\sum_{i=1}^{m} \frac{y^{(i)}}{C^{(i)}}}{\sum_{i=1}^{m} \frac{1}{C^{(i)}}}

The final solution is:
w^* = 0

b^* = \dfrac{\sum \frac{y^{(i)}}{C^{(i)}}}{\sum \frac{1}{C^{(i)}}}

You have a mistake in your “objective function”.

Check it against my function.

C^{(i)} is not constant with respect to w and b.

I see. I should have substituted y0/x0 with to w and b terms. I will work on it and let you know if I find something.

I got this after doing the calculations:

  1. \sum_{i=1}^{m} \frac{(w^2x^{(i)} - w(y^{(i)} - b))(2wx^{(i)} - y^{(i)} + b) + (2w^2b - wx^{(i)} + y^{(i)} + b)(4wb - x^{(i)})}{\sqrt{(...)^2 + (...)^2}} = 0
  2. \sum_{i=1}^{m} \frac{(w^2x^{(i)} - w(y^{(i)} - b))(w) + (2w^2b - wx^{(i)} + y^{(i)} + b)(2w^2 + 1)}{\sqrt{(...)^2 + (...)^2}} = 0

It is not possible to solve for w and b by hand to get a general formula. To find the actual numerical values, you would need a dataset of (x^{(i)}, y^{(i)}) values and then use a numerical optimization (e.g. Gradient Descent).

Hope this helps!

I can’t view all of this on my iPhone - can you post an image instead.