.. _f-neuraltreenode: module ``ml._neural_tree_node`` =============================== .. inheritance-diagram:: mlstatpy.ml._neural_tree_node Short summary +++++++++++++ module ``mlstatpy.ml._neural_tree_node`` Conversion from tree to neural network. :githublink:`%|py|6` Classes +++++++ +------------------------------------------------------------------------+-------------------------------+ | class | truncated documentation | +========================================================================+===============================+ | :class:`NeuralTreeNode ` | One node in a neural network. | +------------------------------------------------------------------------+-------------------------------+ Properties ++++++++++ +------------------------------------------------------------------------------------------+-------------------------------------------+ | property | truncated documentation | +==========================================================================================+===========================================+ | :meth:`bias ` | Returns the weights. | +------------------------------------------------------------------------------------------+-------------------------------------------+ | :meth:`input_weights ` | Returns the weights. | +------------------------------------------------------------------------------------------+-------------------------------------------+ | :meth:`ndim ` | Returns the input dimension. | +------------------------------------------------------------------------------------------+-------------------------------------------+ | :meth:`ndim_out ` | Returns the output dimension. | +------------------------------------------------------------------------------------------+-------------------------------------------+ | :meth:`training_weights ` | Returns the weights stored in the neuron. | +------------------------------------------------------------------------------------------+-------------------------------------------+ Static Methods ++++++++++++++ +--------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------+ | staticmethod | truncated documentation | +==========================================================================================================================+=================================================================================================================+ | :py:meth:`_dleakyrelu ` | Derivative of the Leaky Relu function. | +--------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------+ | :py:meth:`_drelu ` | Derivative of the Relu function. | +--------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------+ | :py:meth:`_dsigmoid ` | Derivativ of the sigmoid function. | +--------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------+ | :py:meth:`_dsoftmax ` | Derivative of the softmax function. | +--------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------+ | :py:meth:`_leakyrelu ` | Leaky Relu function. | +--------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------+ | :py:meth:`_relu ` | Relu function. | +--------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------+ | :py:meth:`_softmax ` | Derivative of the softmax function. | +--------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------+ | :meth:`get_activation_dloss_function ` | Returns the derivative of the default loss function based on the activation function. It returns a function ... | +--------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------+ | :meth:`get_activation_function ` | Returns the activation function. It returns a function *y=f(x)*. | +--------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------+ | :meth:`get_activation_gradient_function ` | Returns the activation function. It returns a function *y=f'(x)*. About the sigmoid: | +--------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------+ | :meth:`get_activation_loss_function ` | Returns a default loss function based on the activation function. It returns two functions *g=loss(x,y)*. | +--------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------+ Methods +++++++ +--------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+ | method | truncated documentation | +========================================================================================================+=============================================================================================================+ | :py:meth:`__eq__ ` | | +--------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+ | :py:meth:`__getstate__ ` | usual | +--------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+ | :py:meth:`__init__ ` | | +--------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+ | :py:meth:`__repr__ ` | usual | +--------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+ | :py:meth:`__setstate__ ` | usual | +--------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+ | :py:meth:`_common_loss_dloss ` | Common beginning to methods *loss*, *dlossds*, *dlossdw*. | +--------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+ | :py:meth:`_predict ` | Computes inputs of the activation function. | +--------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+ | :py:meth:`_set_fcts ` | | +--------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+ | :meth:`dlossds ` | Computes the loss derivative due to prediction error. | +--------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+ | :meth:`fill_cache ` | Creates a cache with intermediate results. ``lX`` is the results before the activation function, ``aX`` ... | +--------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+ | :meth:`gradient_backward ` | Computes the gradients at point *X*. | +--------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+ | :meth:`loss ` | Computes the loss. Returns a float. | +--------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+ | :meth:`predict ` | Computes neuron outputs. | +--------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+ | :meth:`update_training_weights ` | Updates weights. | +--------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+ Documentation +++++++++++++ .. automodule:: mlstatpy.ml._neural_tree_node :members: :special-members: __init__ :show-inheritance: