Skip to content

Commit 80c849f

Browse files
committed
pic
1 parent 8a02e40 commit 80c849f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+84
-48
lines changed

_posts/2009-07-26-welfare-lottery-justice.md

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,14 @@ published: true
1414

1515
在随机选择,且每次抽取都是等概率的的假定条件下,理论的重复彩票注数的分布(0注至41注)如下:
1616

17-
<span style="font-family: Courier New;"><samp style="font-family: 宋体;"><img src="http://bjt.cos.name/wp-content/uploads/1.png" alt="" width="644" height="371" /></samp></span>
18-
19-
17+
![](/upload/pic/1.png)
2018

2119

2220
一等奖是完全随机出现的,那么在假设条件下,一等奖同时出现五注的概率最高,六注、四注其次,再次为七注、三注,类推……当然理论上,没有中奖(0注)和中12注以上的概率相比其他情形低了很多。
2321

2422
那么我们再看一看福利彩票双色球每期中一等奖(2008年1月1日至2009年7月23日)的实际分布情况:
2523

26-
<span style="font-family: Courier New;"><samp><img src="http://bjt.cos.name/wp-content/uploads/2009/07/thunderball2.png" alt="thunderball2.png" width="623" height="401" /></samp></span>
27-
24+
![](/upload/pic/thunderball2.png)
2825

2926
有童鞋看出端倪了:实际数据的分布同理论上的分布是不一致的!理论上的一等奖出现概率最大在出现五注的位置,而实际上一等奖出现的最大概率出现在了两注的位置。
3027

@@ -34,7 +31,7 @@ published: true
3431

3532
一些彩民为了提高中奖概率(或者说迷信一些选号方法),会采用"复式"、"胆拖"、"倍投"等方式投注,当然大部分彩民还是会老老实实的买一注。综合考虑到这些因素以后,凭经验估计样本量应该为现在的一半左右,即5000万。这样看来较为合理的一等奖中奖概率理论上分布为:
3633

37-
<img src="http://bjt.cos.name/wp-content/uploads/2.png" alt="" width="644" height="371" />
34+
![](/upload/pic/2.png)
3835

3936
此时理论分布同实际分布已经非常相似。
4037

_posts/2009-08-29-aquatics-center-voronoi.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@ published: true
1010
还记得第一次看到<a href="http://en.wikipedia.org/wiki/Beijing_National_Aquatics_Center">水立方</a>时的惊讶么?
1111

1212
是什么这么吸引我们?是有如天空般的颜色?还是那气泡似的形状?
13-
<p style="text-align: center;"><a href="http://bjt.cos.name/wp-content/uploads/2009/08/Watercube.jpg"><img class="size-full wp-image-10624 aligncenter" title="Watercube" src="http://bjt.cos.name/wp-content/uploads/2009/08/Watercube.jpg" alt="" width="800" height="462" /></a></p>
13+
14+
![](/upload/pic/Watercube.jpg)
15+
1416
从水立方的外墙结构上看,不但外观美观,而且十分紧凑。水立方外墙为什么会有这样的性质,是因为它上应用了一项最优化的技术,即<a href="http://en.wikipedia.org/wiki/Voronoi" target="_blank">Voronoi</a> 原理。
1517

1618
<a href="http://en.wikipedia.org/wiki/Voronoi" target="_blank">Voronoi</a> 图也常常被称为 Dirichlet 格局(Dirichlet tessellation)。通俗讲,其原理是一项从点到面的技术。它的每个多边形只有一个"生成点",而这个多边形上的每个点到"生成点"的距离总是比到其他"生成点"的距离要小(是不是想到了 K-means 算法?)。
@@ -21,7 +23,7 @@ published: true
2123

2224
下面,我根据各个省会城市(包括香港、澳门)的地理位置,利用 Voronoi 原理,计算每个省最佳控制范围(使用红色的线条标记):
2325

24-
<img src="http://bjt.cos.name/wp-content/uploads/2009/08/China.png" alt="China.png" width="700" height="490" />
26+
![](/upload/pic/China.png)
2527

2628
虽然理论值(最优)和现实值(行政区划、地理)总有差距,但是,比较一下会发现一些值得探讨的现象:
2729
<ul>

_posts/2009-09-05-r-cran-package-networks.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@ zoo?
2525
为了简化起见,这里忽略了同其他包没有关系的包(当然并不是完全没有关系,所有的包都和 <a href="http://www.r-project.org">R</a> 或 <a href="http://www.r-project.org">R</a> 的基础包有关,如果这样计量的话,会导致所有的包都会指向 R)。
2626

2727
首先截取了这个庞大网络的一部分:
28-
<p style="text-align: center;"><img class="aligncenter" src="http://bjt.cos.name/wp-content/uploads/2009/09/sna.png" alt="sna.png" width="630" height="578" /></p>
28+
29+
![](/upload/pic/sna.png)
30+
2931
从上图我们可以看到,标记点为215、271的两个包是我们研究的包网络中的两个关键点,这两个包分别是lattice、mvtnorm。
3032

3133
关于这两个包:
@@ -40,10 +42,9 @@ zoo?
4042
当然,由于抽取的是一个子网络,很多的连接都被生硬地隔断,因此出现了大量的孤立点。
4143

4244
如果我们把 CRAN 上的1950个包都放到我们的网络中会是这样:
43-
<p style="text-align: center;"><a href="http://bjt.cos.name/wp-content/uploads/2009/09/sna_black.png"><img class="aligncenter size-full wp-image-10794" title="R cran packages networks" src="http://bjt.cos.name/wp-content/uploads/2009/09/sna_black.png" alt="" width="800" height="500" /></a></p>
4445

46+
![](/upload/pic/sna_black.png)
4547

46-
<hr />
4748

4849
最后说明:
4950
<ol>

_posts/2009-12-26-mandelbrot-set.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,25 +14,25 @@ published: true
1414
<blockquote>客观自然界中许多事物,具有自相似的“层次”结构,在理想情况下,甚至具有无穷层次。适当的放大或缩小几何尺寸,整个结构并不改变。不少复杂的物理现象,背后就是反映着这类层次结构的分形几何学。</blockquote>
1515
常见的曼德布洛特集是这个样子(分辨率原因,部分细节显示不够):
1616

17-
<a href="http://bjt.cos.name/wp-content/uploads/2009/12/scale1.png"><img class="aligncenter size-full wp-image-10438" title="scale1" src="http://bjt.cos.name/wp-content/uploads/2009/12/scale1.png" alt="" width="480" height="480" /></a>
17+
![](/upload/pic/scale1.png)
1818

1919
假如我们把这个集合的下半部分(最下边的小块)分割出来,就是这个样子(8倍放大):
2020

21-
<a href="http://bjt.cos.name/wp-content/uploads/2009/12/scale2.png"><img class="aligncenter size-full wp-image-10438" title="scale2" src="http://bjt.cos.name/wp-content/uploads/2009/12/scale2.png" alt="" width="480" height="480" /></a>
21+
![](/upload/pic/scale2.png)
2222

2323
由于分辨率的提高,所以显示了第一幅图中并没有显示的细节。
2424

2525
继续放大,上图的左上部分的那个小枝(6倍放大):
2626

27-
<a href="http://bjt.cos.name/wp-content/uploads/2009/12/scale41.png"><img class="aligncenter size-full wp-image-10446" title="scale4" src="http://bjt.cos.name/wp-content/uploads/2009/12/scale41.png" alt="" width="480" height="480" /></a>
27+
![](/upload/pic/scale41.png)
2828

2929
再把上图最靠近左边的那个小枝——放大(50/3倍放大):
3030

31-
<a href="http://bjt.cos.name/wp-content/uploads/2009/12/scale51.png"><img class="aligncenter size-full wp-image-10447" title="scale5" src="http://bjt.cos.name/wp-content/uploads/2009/12/scale51.png" alt="" width="480" height="480" /></a>
31+
![](/upload/pic/scale51.png)
3232

3333
继续放大最左边的小枝,似乎在末端又出现了一个类似的小枝(5倍放大):
3434

35-
<a href="http://bjt.cos.name/wp-content/uploads/2009/12/scale6.png"><img class="aligncenter size-full wp-image-10450" title="scale6" src="http://bjt.cos.name/wp-content/uploads/2009/12/scale6.png" alt="" width="480" height="480" /></a>
35+
![](/upload/pic/scale6.png)
3636

3737
如果继续放大下去可能还是这个样子 :)
3838

_posts/2010-01-16-rockets-heat-assists-network.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ published: true
2121

2222
本场比赛火箭一共20个助攻,Brooks 和 Battier 分别助攻了最高的5个和4个。每次助攻都会涉及两位球员,那么本场比赛所有助攻结果综合在一起,即我们将助攻者和被助攻者之间的关系使用社会网络关系表现出来,会有一些有趣的现象:
2323

24-
<a href="http://bjt.cos.name/wp-content/uploads/2010/01/hou.png"><img class="aligncenter size-full wp-image-10516" title="hou" src="http://bjt.cos.name/wp-content/uploads/2010/01/hou.png" alt="" width="485" height="449" /></a>
24+
![](/upload/pic/hou.png)
2525

2626
注释:
2727

@@ -47,7 +47,7 @@ published: true
4747

4848
<hr />40场比赛助攻数据同时考虑,结果有些凌乱:
4949

50-
<span style="text-decoration: line-through;"><a href="http://bjt.cos.name/wp-content/uploads/2010/01/hou40.png"><img class="aligncenter size-full wp-image-10529" title="hou40" src="http://bjt.cos.name/wp-content/uploads/2010/01/hou40.png" alt="" width="525" height="465" /></a></span>
50+
![](/upload/pic/hou40.png)
5151

5252
注:这个赛季火箭队有一些球员实际上并没有真正的进入轮转,比如"Tracy McGrady","Mike Harris","Jermaine Taylor","Pops Mensah-Bonsu","Brian Cook"。虽然有些球员(比如麦蒂)的确对球队的(被)助攻仍有帮助,但贡献非常有限。出于结果整洁性的考虑,上图已将这些球员因素剔除。
5353

_posts/2010-01-26-chinese-earthquake-visualization.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ published: true
2626

2727
这破坏级地震可不是闹着玩的,得仔细瞧瞧最近这地震都发生在哪里了,震级多大?是不是会对我们构成威胁!?于是有了下面这张图——最近一周中国及周边版图地震情况(1月20日至1月25日共计六天):
2828

29-
<a href="http://bjt.cos.name/wp-content/uploads/2010/01/earthquake.png"><img class="aligncenter size-full wp-image-10562" title="earthquake" src="http://bjt.cos.name/wp-content/uploads/2010/01/earthquake.png" alt="" width="730" height="653" /></a>
29+
![](/upload/pic/earthquake.png)
3030

3131
数据童鞋们可以在<a href="http://data.earthquake.cn/datashare/globeEarthquake_csn.jsp" target="_blank">这里</a>查看,里面的震级需要注意一下,有Ms和ML两种,换算关系如下。但具体什么意思大家直接 wiki 好了。
3232

@@ -47,6 +47,6 @@ published: true
4747

4848
最后我们再回头看一下,最近一周地震的震级(ML)分布:
4949

50-
<a href="http://bjt.cos.name/wp-content/uploads/2010/01/hist_earth.png"><img class="aligncenter size-medium wp-image-10565" title="hist_earth" src="http://bjt.cos.name/wp-content/uploads/2010/01/hist_earth-300x271.png" alt="" width="300" height="271" /></a>
50+
![](/upload/pic/hist_earth.png)
5151

5252
至少可以长舒一口气,原来大部分都是小震,不具“破坏性”的居多。

_posts/2010-03-04-beijing-real-estate-contracts.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ published: true
1616
(首先声明,房地产市场比较复杂,比如官啊、商啊、摇号啊、中介啊、银行啊、炒房团啊,空军、多军……指标忒多,所以我一直也没搞太明白。搞不明白也想凑一凑热闹,与时俱进嘛!扔两张图上来,大家笑笑)
1717

1818
2008年9月1日至今的期房(不包含经适房、限价房)签约情况:
19-
<p style="text-align: center;"><a href="http://bjt.cos.name/wp-content/uploads/2010/03/amount1.png" target="_blank"><img class="size-full wp-image-10631 aligncenter" title="amount1" src="http://bjt.cos.name/wp-content/uploads/2010/03/amount1.png" alt="" width="800" height="600" /></a></p>
19+
20+
![](/upload/pic/amount1.png)
2021

2122
<div id="_mcePaste">其中的时点数据不包括:</div>
2223
<div>
@@ -30,7 +31,9 @@ published: true
3031
<div>假设2008年是期房市场正常年的话,那么2009年几乎可以用“疯狂”二字来标记北京的期房市场。每天平均400套的签约数量,动辄200、300万的房价,都贵成这样了,被谁买去啦?</div>
3132
<div><!--more--></div>
3233
<div>然后是北京存量房签约情况:</div>
33-
<div><a href="http://bjt.cos.name/wp-content/uploads/2010/03/amount2.png"><img class="size-full wp-image-10630 aligncenter" title="amount2" src="http://bjt.cos.name/wp-content/uploads/2010/03/amount2.png" alt="" width="800" height="600" /></a></div>
34+
35+
![](/upload/pic/amount2.png)
36+
3437
(不知为何,北京房地场交易网没有2008年9月1日至2008年10月14日数据。)
3538

3639
存量房签约的情况大致和期房签约变化一致。同样是2008年的数量比较小,而到了2009年,市场开始癫狂。不过存量房签约套数变化有点意思:

_posts/2010-03-31-something-about-r.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,6 @@ published: true
1212
上周在部门内部做了一个小规模的R相关培训,大致把R的整体构架和特点做了个综述。聊得非常随意,天马行空。在这里,贴出概要(下图)和大家一起分享:
1313

1414
(顺序是:从右至左,由上至下)
15-
<p style="text-align: center;"><a href="http://bjt.cos.name/wp-content/uploads/2010/03/R-简介.png"><img class="size-full wp-image-10641 aligncenter" title="R 简介" src="http://bjt.cos.name/wp-content/uploads/2010/03/R-简介.png" alt="" width="879" height="631" /></a></p>
15+
![](/upload/pic/R-intro.png)
16+
1617
红色是重点讲的部分,当然还穿插了一些关于R的八卦:比如R和SPSS、SAS之间的故事……。我发现大家对“八卦”还是相当感兴趣的:)

_posts/2010-12-07-toronto-data-mining-intro.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@ published: true
3232

3333
首先是——描述:
3434

35-
<a href="http://bjt.cos.name/wp-content/uploads/2010/12/dm1.png"><img class="aligncenter size-full wp-image-10716" title="description" src="http://bjt.cos.name/wp-content/uploads/2010/12/dm1.png" alt="" width="687" height="480" /></a>然后是——推断:
35+
![](/upload/pic/dm1.png)
3636

37-
<a href="http://bjt.cos.name/wp-content/uploads/2010/12/dm2.png"><img class="aligncenter size-full wp-image-10717" title="inference" src="http://bjt.cos.name/wp-content/uploads/2010/12/dm2.png" alt="" width="645" height="703" /></a>
37+
![](/upload/pic/dm2.png)
3838

3939
最后是<a href="mailto:saed.sayad@utoronto.ca"> S. Sayad</a> 教授的数据挖掘<a href="http://chem-eng.utoronto.ca/~datamining/dmc/data_mining_map.htm" target="_blank">在线 intro</a>,请猛击之!
4040

_posts/2011-06-14-mosaic-plot-with-r.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ published: true
1313

1414
本来想标题改的彪悍一些——《一千二百个女人和我的故事》,想想还是算了吧,虽说是用了1200个漂亮女人组成了我的头像,但她们我一个也不认识,哈哈。
1515

16-
<a href="http://bjt.cos.name/wp-content/uploads/2011/06/me.png"><img class="aligncenter size-full wp-image-10802" title="it is me" src="http://bjt.cos.name/wp-content/uploads/2011/06/me.png" alt="" width="750" height="1000" /></a>
16+
![](http://i.imgur.com/4lrOvvF.png)
1717

1818
用的原图我就不贴了,实际上我是戴着眼镜的,马赛克平滑以后,不明显了。
1919

20-
最后是<a href="http://bjt.cos.name/wp-content/uploads/2011/06/main.r" target="_blank">代码</a>。非常简单,不到20行。大概所需要的时间:构思写代码1个小时,下载和整理图片时间长点,3个多小时(当然你本地资源和<a href="http://www.matrix67.com/blog" target="_blank">Matrix67</a>一样丰富的话另说,哈)。
20+
最后是[代码](/upload/pic/main.r)。非常简单,不到20行。大概所需要的时间:构思写代码1个小时,下载和整理图片时间长点,3个多小时(当然你本地资源和<a href="http://www.matrix67.com/blog" target="_blank">Matrix67</a>一样丰富的话另说,哈)。

0 commit comments

Comments
 (0)