最新消息:20190717 VPS服务器:Vultr新加坡,WordPress主题:大前端D8,统一介绍入口:关于

【整理】numpy mean std

Mean crifan 137浏览 0评论
NLP: Text Data Cleaning and Preprocessing – Maria Dobko – Medium
numpy mean std
numpy.std() in Python – GeeksforGeeks
“numpy.std() in Python
numpy.std(arr, axis = None) : Compute the standard deviation of the given data (array elements) along the specified axis(if any).. Standard Deviation (SD) is measured as the spread of data distribution in the given data set.
Standard Deviation (SD)
numpy.mean — NumPy v1.13 Manual
“numpy.std
numpy.std(a, axis=None, dtype=None, out=None, ddof=0, keepdims=<no value>)[source]
Compute the standard deviation along the specified axis.
Returns the standard deviation, a measure of the spread of a distribution, of the array elements. The standard deviation is computed for the flattened array by default, otherwise over the specified axis.”
【总结】
全称:SD=Standard Deviation=标准方差
  • the spread of a distribution
    • 数据分布的广泛程度
      • 是否是否很集中
        • 方差越大:越分散
        • 方差越小:越集中
  • numpy的api接口名称:numpy.std
计算过程:
std = sqrt(mean(abs(x - x.mean())**2))
举例:
x = 1 1 1 1 1 
Standard Deviation = 0 . 


y = 9, 2, 5, 4, 12, 7, 8, 11, 9, 3, 7, 4, 12, 5, 4, 10, 9, 6, 9, 4 
Step 1 : Mean of distribution 4 = 7
Step 2 : Summation of (x - x.mean())**2 = 178
Step 3 : Finding Mean = 178 /20 = 8.9 
This Result is Variance.
Step 4 : Standard Deviation = sqrt(Variance) = sqrt(8.9) = 2.983..

转载请注明:在路上 » 【整理】numpy mean std

发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
21 queries in 0.102 seconds, using 9.22MB memory