zoukankan      html  css  js  c++  java
  • [机器学习入门篇]-Logistic函数与Softmax函数

    1.Logistic函数

    在维基百科中,对logistic函数这样介绍道:

      A logistic function or logistic curve is a common "S" shape (sigmoid curve), with equation: $$f(x)=frac{L}{1+e^{-k(x-x0)}}$$

      Logistic函数呈'S'型曲线,当x趋于-∞时函数趋于0,当x趋于+∞时函数趋于L。

    standard logistic function i.e. k=1, x0=0

    2.Softmax函数

     

    softmax函数定义如下:

      In mathematics, the softmax function, or normalized exponential function,is a generalization of the logistic function that "squashes" a K-dimensional vector $mathbf{Z}$ of arbitrary real values to a K-dimensional vector $sigma( extbf{Z})$ of real values in the range (0, 1) that add up to 1. The function is given by

      $$sigma( extbf{Z})_j=frac{e^Z_j}{sum_{k=1}^{K}e^{Z_k}}quad j=1,2,...,K$$

      在数学定义中,Softmax函数是对Logistic函数的一般化。它的作用是将一个K维实数向量的各分量值映射到(0,1),且各分量值之和为1。

    3.对比

    从定义中不难看出,Softmax函数是对Logistic函数的延伸扩展。拿Sigmoid函数(Logistic函数的一种)为例,它将单个变量的取值变换到(0,1),而Softmax函数是Sigmoid函数的多维形式,参数不是单个变量而是多维向量。由于维度不同,Logistic函数常被应用于回归问题(称为Logistic回归)和神经网络的激活函数。而Softmax函数常被用于神经网络的最后一层,进行多分类。

    4.参考资料

    更详细的介绍参考:http://www.cnblogs.com/maybe2030/p/5678387.html?utm_source=tuicool&utm_medium=referral

    兴趣是最好的导师
  • 相关阅读:
    UVA 10564
    ARM GCC CodeSourcery 下载地址
    Linux Shell编程入门
    设计模式------Adapter(适配器)
    设计模式------STRATEGY(策略模式)
    对象创建型模式------Singleton(单例模式)
    设计模式------PROTOTYPE(原型),TEMPLATE(模板)
    对象创建型模式------Builder(生成器或建造者模式)(2)
    对象创建型模式------工厂模式
    effective c++(07)之为多态基类声明virtual析构函数
  • 原文地址:https://www.cnblogs.com/DLarTisan/p/6654552.html
Copyright © 2011-2022 走看看