Files
mql5-skills/skills/mql5/references/docs/06-matrix/0396-matrix-matrix-machine-learning-matrix-derivative.md
T
2026-06-23 21:47:51 +08:00

53 lines
1.9 KiB
Markdown
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Derivative
Compute activation function derivative values and write them to the passed vector/matrix
```
bool vector::Derivative(
  vector&                   vect_out,      // vector to get values
  ENUM_ACTIVATION_FUNCTION  activation,    // activation function
   ...                                     // additional parameters
   );
 
 
bool matrix::Derivative(
  matrix&                   matrix_out,    // matrix to get values
  ENUM_ACTIVATION_FUNCTION  activation,    // activation function
   );
 
 
bool matrix::Derivative(
  matrix&                   matrix_out,    // matrix to get values
  ENUM_ACTIVATION_FUNCTION  activation,    // activation function
  ENUM_MATRIX_AXIS          axis,          // axis
   ...                                     // additional parameters
   );
```
Parameters
vect_out/matrix_out
[out]  Vector or matrix to get the computed values of the derivative of the activation function.
activation
[in]  Activation function from the [ENUM_ACTIVATION_FUNCTION](/en/docs/matrix/matrix_types/matrix_enumerations#enum_activation_function) enumeration.
axis
[in] [ENUM_MATRIX_AXIS](/en/docs/matrix/matrix_types/matrix_enumerations#enum_matrix_axis) enumeration value (AXIS_HORZ — horizontal axis, AXIS_VERT — vertical axis).
...
[in]  Additional parameters are the same as that of the activation functions. Only some activation functions accept additional parameters. If no parameters are specified, default values are used.
Return Value
Returns true if successful, otherwise - false.
Note
Function derivatives enable an efficient update of model parameters based on the error received in learning during the error backpropagation.