@@ -2557,39 +2557,55 @@ namespace Ostap
25572557 // ========================================================================
25582558 // / the sigmoid type
25592559 enum class SigmoidType
2560- {
2561- //
2562- Logistic , // based on logistic function
2563- Hyperbolic , // based on tanh
2564- Trigonometric , // based on atan
2565- Error , // Based on error function
2566- Gudermannian , // Based on Gudermannian function
2567- Algebraic , // 0.5 * ( 1 + 2*x / hypot ( 1 , 2*x ) )
2568- SmoothTransition , // Based on "smooth transition" function
2569- //
2570- Polynomial_n0 , // Based on "smooth step" with n=0
2571- Polynomial_n1 , // Based on "smooth step" with n=1
2572- Polynomial_n2 , // Based on "smooth step" with n=2
2573- Polynomial_n3 , // Based on "smooth step" with n=3
2574- Polynomial_n4 , // Based on "smooth step" with n=4
2575- Polynomial_n5 , // Based on "smooth step" with n=5
2576- Polynomial_n6 , // Based on "smooth step" with n=6
2577- //
2578- First = Logistic ,
2579- Last = Polynomial_n6
2580- } ;
2581- // ========================================================================
2582- /* * Sigmoid function
2560+ {
2561+ //
2562+ Logistic , // based on logistic function
2563+ Hyperbolic , // based on tanh
2564+ Trigonometric , // based on atan
2565+ Error , // Based on error function
2566+ Gudermannian , // Based on Gudermannian function
2567+ Algebraic , // 0.5 * ( 1 + 2*x / hypot ( 1 , 2*x ) )
2568+ SmoothTransition , // Based on "smooth transition" function
2569+ //
2570+ Polynomial_n0 , // Based on "smooth step" with n=0
2571+ Polynomial_n1 , // Based on "smooth step" with n=1
2572+ Polynomial_n2 , // Based on "smooth step" with n=2
2573+ Polynomial_n3 , // Based on "smooth step" with n=3
2574+ Polynomial_n4 , // Based on "smooth step" with n=4
2575+ Polynomial_n5 , // Based on "smooth step" with n=5
2576+ Polynomial_n6 , // Based on "smooth step" with n=6
2577+ //
2578+ First = Logistic ,
2579+ Last = Polynomial_n6
2580+ } ;
2581+ // ========================================================================
2582+ /* * sigmoid type
2583+ * @param name the case-insensitive name of of sigmoid function
2584+ * @return ID of sigmoid function
2585+ */
2586+ SigmoidType sigmoid_type
2587+ ( const std::string& name = " Hyperbolic" ) ;
2588+ // ========================================================================
2589+ /* sigmoid type
2590+ * @param sigmoid ID
2591+ * @return the name of of sigmoid function
2592+ */
2593+ // ========================================================================
2594+ std::string sigmoid_name
2595+ ( const SigmoidType stype ) ;
2596+ // =======================================================================
2597+ /* * Sigmoid functions
25832598 * All sigmoid fuctions \f$ \sigma(z) \f$ are normalized & scaled such
25842599 * - \f$ \sigma(-\infty) =0\f$
25852600 * - \f$ \sigma(+\infty) =1\f$
2586- * - \f$ \sigma^\prime(0)=1\f$
2601+ * - \f$ \sigma^\prime(0)=1\f$
2602+ * @see Ostap::Math::SigmoidType
25872603 */
25882604 double sigmoid
25892605 ( const double x ,
25902606 const SigmoidType t = SigmoidType::Hyperbolic ) ;
25912607 // ========================================================================
2592-
2608+
25932609 // ========================================================================
25942610 // Moebius ransformation
25952611 // ========================================================================
0 commit comments