File:Binary entropy plot.svg

原始文件(SVG文件,尺寸为300 × 300像素,文件大小:1 KB)


摘要

描述

en:Information entropy of a en:Bernoulli trial X. If X can assume values 0 and 1, entropy of X is defined as H(X) = -Pr(X=0) log2 Pr(X=0) - Pr(X=1) log2 Pr(X=1). It has value if Pr(X=0)=1 or Pr(X=1)=1. The entropy reaches maximum when Pr(X=0)=Pr(X=1)=1/2 (the value of entropy is then 1). The image was created in the following steps. First I have created a DVI version starting from a LaTeX/Pstricks source. Here is the code:

%Plot of information entropy of Bernoulli variable
%
%latex binary_entropy_plot; dvips binary_entropy_plot
%open .ps file in gimp, choose strong antialias in both text and graphics,
%resulution 500, color mode, crop, scale to 45%, save as .png
\documentclass[12pt]{article}
\usepackage{pst-plot}
\begin{document}
\psset{unit=4cm}        
\begin{pspicture}(0,0)(1.01,1)
\psgrid[gridlabels=0pt,gridcolor=lightgray,subgriddiv=10,subgridcolor=lightgray](0,0)(0,0)(1,1)
\newrgbcolor{myblue}{0 0 0.7}
\psaxes[arrows=->,arrowsize=2pt 4,Dx=0.5,Dy=0.5](0,0)(0,0)(1.1,1.1)
\psplot[plotstyle=curve,plotpoints=100,linewidth=1.8pt,linecolor=myblue]{0.0001}{0.9999}{-1 x x log 2 log div mul 1 x sub 1 x sub log 2 log div mul add mul}
\rput(0.5,-0.22){$\Pr(X=1)$}
\rput{90}(-0.28,0.5){$H(X)$}
\end{pspicture}
\end{document}
compile it with latex to get the DVI. Then it was converted to PS with dvips. Finally it was converted to SVG using ps2svg.sh; it needed some post-processing with Inkscape
日期
来源 基于如下对象的个人作品: Binary entropy plot.png  Brona
作者
矢量:

Newer version by Rubber Duck
SVG开发
InfoField
 
SVG的源代码为有效代码.
 
矢量图形使用文本编辑器创作. (0309%)
Previous version had been created with Inkscape (40763 bytes)  d  now 3.08% of previous size
 
Please do not replace the simplified code of this file with a version created with Inkscape or any other vector graphics editor
 
 此SVG 文件使用了内嵌文本,可以使用任何文本编辑器轻松翻译

许可协议

我,本作品著作权人,特此采用以下许可协议发表本作品:
GNU head 已授权您依据自由软件基金会发行的无固定段落及封面封底文字(Invariant Sections, Front-Cover Texts, and Back-Cover Texts)的GNU自由文件许可协议1.2版或任意后续版本的条款,复制、传播和/或修改本文件。该协议的副本请见“GNU Free Documentation License”。
w:zh:知识共享
署名 相同方式共享
本文件采用知识共享署名-相同方式共享 3.0 未本地化版本许可协议授权。
您可以自由地:
  • 共享 – 复制、发行并传播本作品
  • 修改 – 改编作品
惟须遵守下列条件:
  • 署名 – 您必须对作品进行署名,提供授权条款的链接,并说明是否对原始内容进行了更改。您可以用任何合理的方式来署名,但不得以任何方式表明许可人认可您或您的使用。
  • 相同方式共享 – 如果您再混合、转换或者基于本作品进行创作,您必须以与原先许可协议相同或相兼容的许可协议分发您贡献的作品。
本许可协议标签作为GFDL许可协议更新的组成部分被添加至本文件。

说明

添加一行文字以描述该文件所表现的内容

此文件中描述的项目

描繪內容

image/svg+xml

a9cd604177c23863a984861678b72545aed6298f

1,258 字节

300 像素

300 像素

文件历史

点击某个日期/时间查看对应时刻的文件。

日期/时间缩⁠略⁠图大小用户备注
当前2015年2月9日 (一) 16:072015年2月9日 (一) 16:07版本的缩略图300 × 300(1 KB)Krishnavedalasimplified drawing
2007年4月22日 (日) 15:192007年4月22日 (日) 15:19版本的缩略图169 × 163(40 KB)Alejo2083{{Information |Description=Information entropy of a Bernoulli trial ''X''. If ''X'' can assume values 0 and 1, entropy of ''X'' is defined as ''H''(''X'') = -Pr(''X''=0) log<sub>2</sub> Pr(''X''=0) - Pr(''X''=1) log<sub>2</sub> Pr(''X''=1). It has

以下页面使用本文件:

全域文件用途

以下其他wiki使用此文件:

元数据