Perfilado de sección

  • Enseñar para que aprenda


    Para que el perceptrón pueda aprender es necesario enseñarle lo que debe recordar. Este tipo de aprendizaje se lo denomina aprendizaje asistido, ya que, es una técnica que permite entrenar la RNA a partir de un conjunto de datos para que logre una salida deseada. Es necesario remarcar que los datos de entradas deben ser linealmente separable, ya que, este método es para una clasificación del tipo binaria. Para actualizar los valores de los pesos sinápticos W, se puede definir la Ec. 5.


    $$ \color{orange} { \mathbf{{W}_{nuevo}} = \mathbf{{W}_{anterior}}+\mathbf{{Y}_{d}}.\mathbf{X} \quad (5)} $$
    \( \color{orange} {\ Donde: \\ \; \\ \mathbf{{W}_{new}} \text{ : Vector of synaptic weights updated} \\ \mathbf{{W}_{old}} \text{ : Vector of prior synaptic weights.}\\ \mathbf{{Y}_{d}} \text{ : Desired output vector.}\\ \mathbf{X} \text{ : Input vector.}} \)

    La regla de actualización presentada en la Ec. 5 es válida si las etiquetas son {-1, 1}. Por ejemplo, si tenemos el siguiente escenario:


    $$ \color{orange} { \begin{cases}{W}_{0}= 0 +(-1*-1) \\ {W}_{1}=0 +(-1*\;\; 1\;)\end{cases} \quad (6)} $$

    Cuando se aplica la Ec. (5) para las condiciones de entrada y salida, permitirá que los coeficientes w0 y w1 cambien la dirección de la actualización, Ec. 6. Pero, en el caso que la etiquetas sean {0, 1} y exista una clasificación incorrecta de la entrada X y su verdadero valor sea 0, entonces los coeficientes nunca serán actualizados, Ec. 7.


    $$ \color{orange} { \begin{cases}{W}_{0}= 0 +(0*1) \\ {W}_{1}=0 +(0*1)\end{cases} \quad (7)} $$

    Para solucionar este inconveniente, y poder generalizar tanto para {-1, 1} y {0, 1} y lograr que aprenda se puede proponer otra regla de actualización, Ec. 8.


    $$ \color{orange} { \mathbf{{W}_{nuevo}}=\mathbf{{W}_{anterior}}+(\mathbf{{Y}_{d}-{Y}_{e}}).\mathbf{X} \quad (8)} $$
    \( \color{orange} {\ Donde: \\ \; \\ \mathbf{{W}_{new}} \text{ : Vector of synaptic weights updated}\\ \mathbf{{W}_{old}} \text{ : Vector of prior synaptic weights.}\\ \mathbf{{Y}_{d}} \text{ : Desired output vector.}\\ \mathbf{{Y}_{e}} \text{ : Vector of the estimated output}\\ \mathbf{X} \text{ : Input vector.}} \)

    The change in Eq. 8 lies in adopting an error that is made up of the difference between the desired output and the corresponding estimated output by combining Eq. 3 and Eq. 2 or Eq. 3 and Eq. 4. In this context, it can be said if the labels are {0, 1}, when the perceptron classifies correctly, the error will be 0. Therefore, it will not be necessary to change the coefficients W. In the scenario where the labels are {-1, 1 }, the error will be 0 if the classification is correct, and in the case of incorrect classification it will be 2 or -2 and the direction of updating the coefficients can be changed.