当前位置:网站首页>torch. Var (), sample variance, parent variance
torch. Var (), sample variance, parent variance
2022-06-11 08:12:00 【Interval】
List of articles
Classification of variance

There is an obvious difference between the two , Why is there such a difference ?
There are two differences , The two differences are interrelated , An integral :
- How much data . The above one is only a part of the sample , The following one has complete data , Overall , Mother .
- Purpose . You want to calculate the variance of this part of the data , Or estimate the variance of the population . If it's the former , Then use the matrix variance formula , If it's the latter , Use the sample variance formula .
Further explanation : When we only have part of the sample , Obviously, we cannot estimate the variance of the complete data ( The following formula ), therefore , The above formula is actually an approximate estimate , But the expectation of this estimate is equal to the variance of the complete data , Unbiased estimation .
torch.var
import torch
torch.var Both variances can be calculated , It depends on a parameter , namely unbiased, Unbiased meaning . The default value is true, in other words , The default goal is to sample the estimated population , The sample variance formula above is used , It calculates the sample variance .
Our actual combat view is as follows :
a=torch.tensor([1.0,-1])
torch.var(a)# The denominator is divided by 1.
give the result as follows :
tensor(2.)
a=torch.tensor([1.0,-1])
torch.var(a,unbiased=False)# The denominator is divided by 2.
give the result as follows :
tensor(1.)
边栏推荐
- 嵌入式软件面试问题总结
- 【案例解读】医疗单据OCR识别助力健康险智能理赔
- How to find the complementary sequence of digraph
- Sign in system design: how to draw the sign in function
- 签到体系设计:签到功能该怎么画
- A detailed explanation of one of the causes of dead loop caused by array out of bounds in C language
- Typescript null and undefined
- Dameng database startup and shutdown
- Solve notimplementederror: layer XX has arguments in`__ init__` and therefore must override `get_ config`
- Use special characters to splice strings "+“
猜你喜欢

SOCKET【5】- struct linger 用法

Study the Analects of entanglement

Training yolov4 CSP model using coco dataset

2022.6.6 特长生模拟

安卓初中级开发基础知识整理(面试自用)

空间几何

Jupyter notebook code completion plug-in + Solution

签到体系设计:签到功能该怎么画

使用 COCO 数据集训练 YOLOv4-CSP 模型

C language to achieve three piece chess (not artificial mental retardation ha ha ha)
随机推荐
SOCKET【5】- struct linger 用法
Printing diamond of beginner C
嵌入式软件面试问题总结
Post - form data of interface test
Dameng database startup and shutdown
(taking pytorch as an example) a simple understanding of the regularization method of path (depth) -drop path
使用 COCO 数据集训练 YOLOv4-CSP 模型
Socket [5] - struct linker usage
用 Keras/TensorFlow 2.9 创建深度学习模型的方法总结
彻底记住ImageView的background和src的区别
Typescript header file usage details
Xshell7 and xftp7 to continue using this program, you must apply the latest updates or use a new version
JS basic learning script
通过ComponentCallbacks2来接收onTrimMemory等回调,并mock对应的场景
134. gas station
C. Managing history (greedy / hashing / thinking / good questions)
空间几何
Tutoriel de démarrage bladed (vidéo)
Request request object and response response object
Js基础学习Script