Neuron model representation of a function f

25 Views Asked by At

Consider a function $$f:ℝ^{2} \rightarrow\ ℝ^{1}$$ given by

$$f(x_1,x_2) = \left\{\begin{array}{ll} 1, & x_1 - x_2 < 0 \\ 0, & x_1 - x_2 \ge 0\\ \end{array} \right.$$

(a) Suggest a single-neuron function that provides a good approximation of the function $f$ (including $a_1,a_2,b$ in the neuron function)?

(b) If $f$ can be represented by $$ \{(x_k,_1, x_k,_2,y_k)\}_{k=1} ^4 $$ where specific samples of $f$ are $\binom{x_1,_1}{x_1,_2} = \binom{1}{2}, y_1=0\\ \binom{x_2,_1}{x_2,_2} = \binom{1}{4}, y_2=0 \\ \binom{x_3,_1}{x_3,_2} = \binom{4}{1}, y_3=1 \\ \binom{x_4,_1}{x_4,_2} = \binom{6}{1}, y_4=1$

How does one go about getting a single neuron-function that minimizes the following function $$J(a_1,a_2,b) = \sum_{k=1}^3 |n(x_k,_1,x_k,_2;a_1,a_2,b)-y_k|^2$$?

1

There are 1 best solutions below

0
On

there are infinite approximations that can be used here. For instance, picking

$$ y = \phi(x_1,x_2) = a_1 + a_2 e^{b(x_1-x_2)} $$

and minimizing

$$ J(a_1,a_2,b) = \phi(1,2)^2+\phi(1,4)^2+(\phi(4,1)-1)^2+(\phi(6,1)-1)^2 $$

we obtain

$$ a_1 = 65.5013, a_2 = -63.1497,b=-0.002381 $$