mlpack  3.1.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Classes | Namespaces
hardshrink.hpp File Reference
Include dependency graph for hardshrink.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  HardShrink< InputDataType, OutputDataType >
 Hard Shrink operator is defined as,

\begin{eqnarray*} f(x) &=& \left\{ \begin{array}{lr} x & : x > lambda \\ x & : x < -lambda \\ 0 & : otherwise \end{array} \\ \right. f'(x) &=& \left\{ \begin{array}{lr} 1 & : x > lambda \\ 1 & : x < -lambda \\ 0 & : otherwise \end{array} \right. \end{eqnarray*}

lambda is set to 0.5 by default. More...

 

Namespaces

 mlpack
 strip_type.hpp
 
 mlpack::ann
 Artificial Neural Network.
 

Detailed Description

Author
Lakshya Ojha

Same as soft thresholding, if its amplitude is smaller than a predefined threshold, it will be set to zero (kill), otherwise it will be kept unchanged. In order to promote sparsity and to improve the approximation, the hard thresholding method is used as an alternative.

mlpack is free software; you may redistribute it and/or modify it under the terms of the 3-clause BSD license. You should have received a copy of the 3-clause BSD license along with mlpack. If not, see http://www.opensource.org/licenses/BSD-3-Clause for more information.

Definition in file hardshrink.hpp.