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

    兴趣是最好的导师
  • 相关阅读:
    QT 开发小记
    linux c 时间函数
    ubuntu 16.04 登录后黑屏
    ubuntu 16.04 修正网卡与ifname对应关系
    HTML5 Shiv完美解决IE(IE6/IE7/IE8)不兼容HTML5标签的方法
    vue里面引入jq的方法
    如何禁用手机自带的输入法软键盘
    vue的首页渲染了两次的原因以及解决方法
    vue使用hightchats
    解决微信小程序使用switchTab跳转后页面不刷新的问题
  • 原文地址:https://www.cnblogs.com/DLarTisan/p/6654552.html
Copyright © 2011-2022 走看看