星期二, 九月 23, 2008

群殴

好久没有这样的感觉了,群殴,我快要崩溃了。
容易激动,看来修行还不够,继续练习百毒不侵之身......
以后能不解释就不解释,能和气就和气......

星期六, 九月 20, 2008

Stanford Engineering Everywhere



Getting Start,Enjoy it

Mathematics Related


素数定理(Prime Number Theorem)

星期日, 九月 14, 2008

正则文法和上下文无关文法

对于文法G=(V, T, S, P),如果产生式的形式如下:
A -> xB
A -> x
其中A, B属于V,x属于T*,则称为右线性文法;相似的,如果产生式的形式如下:
A -> Bx
A -> x
则称为左线性文法。右线性文法和左线性文法统称为正则文法。
正则表达式的表达能力等价于正则文法,正则表达式的定义如下:
字母表中的任意字母是正则表达式,空串和空集也是正则表达式;
如果r, s是正则表达式,那么r|s, rs, r*, (r)也是正则表达式。
正则表达式的扩展:
r+:一个或多个重复
. :任意字符
[a-z]:字符范围
[^abc]:不在给定集合中的任意字符
r?:可选
正则表达式只能使用终结符(字母表中的字符),因而很容易变得复杂又难懂,实际中,经常使用正则描述,正则描述允许使用非终结符定义表达式,很像EBNF,但是它限制在未完全定义之前,不能使用非终结符,也就是说不允许递归或自嵌套。
像正则表达式的表达能力等价于正则文法一样,BNF范式的表达能力等价于上下文无关文法。BNF是“Backus Naur Form”的缩写。John Backus和Peter Naur首次引入一种形式化符号来描述给定语言的语法。
BNF的元符号:
::= 表示“定义为 ”,有的书上用-->
| 表示“或者”
< > 尖括号用于括起非终结符。
BNF的扩展EBNF:
可选项被括在元符号“[”和“]”中
重复项(零个或者多个)被括在元符号“{”和“}”中
仅一个字符的终结符用引号(")引起来,以和元符号区别开来
上述操作符不是严格限定的,有的人喜欢直接使用扩展正则表达式的操作符描述EBNF。除了方便表达以外,引入EBNF的另一个主要原因是为了更紧密地把文法映射到递归下降分析程序的真实代码。当需要手动构造归下降分析程序的时候,通常把上下文无关文法改写为EBNF是必需的。
如果一个上下文无关文法G不是自嵌套或自递归的,即不存在如下推导:
U =>* xUy
那么L(G)是正则语言。自嵌套的上下文无关文法不一定是正则语言。事实上,一个上下文无关文法是严格的,既不可能由正则文法产生,当且仅当该语言的一切文法都是自嵌套的。
如果一个上下文无关文法G不是自嵌套或自递归的,即不存在如下推导:
U =>* xUy
那么L(G)是正则语言。自嵌套的上下文无关文法不一定是正则语言。事实上,一个上下文无关文法是严格的,既不可能由正则文法产生,当且仅当该语言的一切文法都是自嵌套的。
BNF的扩展EBNF:
可选项被括在元符号“[”和“]”中
重复项(零个或者多个)被括在元符号“{”和“}”中
仅一个字符的终结符用引号(")引起来,以和元符号区别开来
上述操作符不是严格限定的,有的人喜欢直接使用扩展正则表达式的操作符描述EBNF。除了方便表达以外,引入EBNF的另一个主要原因是为了更紧密地把文法映射到递归下降分析程序的真实代码。当需要手动构造归下降分析程序的时候,通常把上下文无关文法改写为EBNF是必需的。
如果一个上下文无关文法G不是自嵌套或自递归的,即不存在如下推导:
U =>* xUy
那么L(G)是正则语言。自嵌套的上下文无关文法不一定是正则语言。事实上,一个上下文无关文法是严格的,既不可能由正则文法产生,当且仅当该语言的一切文法都是自嵌套的。
如上所述,上下文无关文法的递归性,对其分析方法也有很大影响。首先,用作识别这些结构的算法必须使用递归调用或显式管理的分析栈。其次,用作表示语言语义结构的数据结构现在也必须是递归的(通常是一颗分析树),而不再是线性的(如同用于词法和记号中的一样)了。
在程序设计语言中,通常用正则表达式描述词法规则。但是正则表示式的表达能力有限,她无法表达括号配对等语法形式,因而,需要引入表达能力更强的上下文无关文法。编译程序中常用正则文法表示词法,用上下文无关文法表示语法。那么程序语言中那些属于词法哪些属于语法呢?一个简单的办法,把所有能用正则文法表示的规则成为词法,即我们用尽可能的使用正则文法表示更多的东西,那些无法用正则表示式表示的成为句法,如C语言中的{ statement; }语法形式。语言中有些规则使用上下文无关文法仍然无法描述,例如变量的定义在使用之前,类型匹配等等,这些通常称为(静态)语义,它们在编译程序的静态语义检查阶段进行检测。
如果一个上下文无关文法G不是自嵌套或自递归的,即不存在如下推导:
U =>* xUy
那么L(G)是正则语言。自嵌套的上下文无关文法不一定是正则语言。事实上,一个上下文无关文法是严格的,既不可能由正则文法产生,当且仅当该语言的一切文法都是自嵌套的。

星期三, 九月 10, 2008

淡定

有期待的平静,不让任何事影响自己的心态和态度,Just do it.积攒RP,做好自己,宁静而不乏激情。
祝福自己:)

星期六, 九月 06, 2008

数据挖掘领域十大经典算法

下面是参与评比的18种算法,实际上随便拿出一种来都可以称得上是经典算法,它们在数据挖掘领域都产 生了极为深远的影响。在我们学习数据挖掘时,可以以这18种算法为主线,如果能把每一种算法都弄懂,整个数据挖掘领域就掌握得差不多了。另外,也可以用这 18种算法的熟悉程度来判断自己知识的掌握程度。

------------------

18 Candidates for the Top 10 Algorithms in Data Mining

Classification
==============

#1. C4.5

Quinlan, J. R. 1993. C4.5: Programs for Machine Learning.
Morgan Kaufmann Publishers Inc.

Google Scholar Count in October 2006: 6907

#2. CART

L. Breiman, J. Friedman, R. Olshen, and C. Stone. Classification and
Regression Trees. Wadsworth, Belmont, CA, 1984.

Google Scholar Count in October 2006: 6078

#3. K Nearest Neighbours (kNN)

Hastie, T. and Tibshirani, R. 1996. Discriminant Adaptive Nearest
Neighbor Classification. IEEE Trans. Pattern
Anal. Mach. Intell. (TPAMI). 18, 6 (Jun. 1996), 607-616.
DOI= http://dx.doi.org/10.1109/34.506411

Google SCholar Count: 183

#4. Naive Bayes

Hand, D.J., Yu, K., 2001. Idiot's Bayes: Not So Stupid After All?
Internat. Statist. Rev. 69, 385-398.

Google Scholar Count in October 2006: 51

Statistical Learning
====================

#5. SVM

Vapnik, V. N. 1995. The Nature of Statistical Learning
Theory. Springer-Verlag New York, Inc.

Google Scholar Count in October 2006: 6441

#6. EM

McLachlan, G. and Peel, D. (2000). Finite Mixture Models.
J. Wiley, New York.

Google Scholar Count in October 2006: 848

Association Analysis
====================

#7. Apriori

Rakesh Agrawal and Ramakrishnan Srikant. Fast Algorithms for Mining
Association Rules. In Proc. of the 20th Int'l Conference on Very Large
Databases (VLDB '94), Santiago, Chile, September 1994.
http://citeseer.comp.nus.edu.sg/agrawal94fast.html

Google Scholar Count in October 2006: 3639

#8. FP-Tree

Han, J., Pei, J., and Yin, Y. 2000. Mining frequent patterns without
candidate generation. In Proceedings of the 2000 ACM SIGMOD
international Conference on Management of Data (Dallas, Texas, United
States, May 15 - 18, 2000). SIGMOD '00. ACM Press, New York, NY, 1-12.
DOI= http://doi.acm.org/10.1145/342009.335372

Google Scholar Count in October 2006: 1258

Link Mining
===========

#9. PageRank

Brin, S. and Page, L. 1998. The anatomy of a large-scale hypertextual
Web search engine. In Proceedings of the Seventh international
Conference on World Wide Web (WWW-7) (Brisbane,
Australia). P. H. Enslow and A. Ellis, Eds. Elsevier Science
Publishers B. V., Amsterdam, The Netherlands, 107-117.
DOI= http://dx.doi.org/10.1016/S0169-7552(98)00110-X

Google Shcolar Count: 2558

#10. HITS

Kleinberg, J. M. 1998. Authoritative sources in a hyperlinked
environment. In Proceedings of the Ninth Annual ACM-SIAM Symposium on
Discrete Algorithms (San Francisco, California, United States, January
25 - 27, 1998). Symposium on Discrete Algorithms. Society for
Industrial and Applied Mathematics, Philadelphia, PA, 668-677.

Google Shcolar Count: 2240

Clustering
==========

#11. K-Means

MacQueen, J. B., Some methods for classification and analysis of
multivariate observations, in Proc. 5th Berkeley Symp. Mathematical
Statistics and Probability, 1967, pp. 281-297.

Google Scholar Count in October 2006: 1579

#12. BIRCH

Zhang, T., Ramakrishnan, R., and Livny, M. 1996. BIRCH: an efficient
data clustering method for very large databases. In Proceedings of the
1996 ACM SIGMOD international Conference on Management of Data
(Montreal, Quebec, Canada, June 04 - 06, 1996). J. Widom, Ed.
SIGMOD '96. ACM Press, New York, NY, 103-114.
DOI= http://doi.acm.org/10.1145/233269.233324

Google Scholar Count in October 2006: 853

Bagging and Boosting
====================

#13. AdaBoost

Freund, Y. and Schapire, R. E. 1997. A decision-theoretic
generalization of on-line learning and an application to
boosting. J. Comput. Syst. Sci. 55, 1 (Aug. 1997), 119-139.
DOI= http://dx.doi.org/10.1006/jcss.1997.1504

Google Scholar Count in October 2006: 1576

Sequential Patterns
===================

#14. GSP

Srikant, R. and Agrawal, R. 1996. Mining Sequential Patterns:
Generalizations and Performance Improvements. In Proceedings of the
5th international Conference on Extending Database Technology:
Advances in Database Technology (March 25 - 29, 1996). P. M. Apers,
M. Bouzeghoub, and G. Gardarin, Eds. Lecture Notes In Computer
Science, vol. 1057. Springer-Verlag, London, 3-17.

Google Scholar Count in October 2006: 596

#15. PrefixSpan

J. Pei, J. Han, B. Mortazavi-Asl, H. Pinto, Q. Chen, U. Dayal and
M-C. Hsu. PrefixSpan: Mining Sequential Patterns Efficiently by
Prefix-Projected Pattern Growth. In Proceedings of the 17th
international Conference on Data Engineering (April 02 - 06,
2001). ICDE '01. IEEE Computer Society, Washington, DC.

Google Scholar Count in October 2006: 248

Integrated Mining
=================

#16. CBA

Liu, B., Hsu, W. and Ma, Y. M. Integrating classification and
association rule mining. KDD-98, 1998, pp. 80-86.
http://citeseer.comp.nus.edu.sg/liu98integrating.html

Google Scholar Count in October 2006: 436


Rough Sets
==========

#17. Finding reduct

Zdzislaw Pawlak, Rough Sets: Theoretical Aspects of Reasoning about
Data, Kluwer Academic Publishers, Norwell, MA, 1992

Google Scholar Count in October 2006: 329

Graph Mining
============

#18. gSpan

Yan, X. and Han, J. 2002. gSpan: Graph-Based Substructure Pattern
Mining. In Proceedings of the 2002 IEEE International Conference on
Data Mining (ICDM '02) (December 09 - 12, 2002). IEEE Computer
Society, Washington, DC.

Google Scholar Count in October 2006: 155
 
最终当选的十大经典算法:
http://www.cs.uvm.edu/~icdm/algorithms/10Algorithms-08.pdf