Jackey's 感悟

Do Research

Tag Archives: Uncategorized

pdf和各种图片格式转换成eps的方法

IEEE会议、期刊在其conf-express网站上要求上传latex源码,要求是生成 dvi格式文件,故编译命令应该用latex,而不能用pdftex等;
同时,对使用到的任何图片,都要求是eps格式。现罗列常用的pdf、其他文件格式转换成 eps的方法。
以下方法,均自由、免费。

1、pdftops.exe pdf –> ps
ps2eps ps->eps

bmp2png.exe
png2bmp.exe

2、 Gimp可以打开pdf以及其他各种图像文件。可以通过gimp转成eps格式文件,而且gimp生成的eps比较容易调整大小,会比方法1产生的文件 小。

当然,各种方法都不怎么影响生成的dvi和pdf文件大小。

Advertisements

记博士生论坛讨论

今天举行了应用所博士生论坛,09级9人,10级12人,其中四人在国外以视频方式作为分身。

整体讨论很boring,没有任何交互,快郁闷死人了。

转载Making PC’s Speak with SAPI.SpVoice

From Evernote:

[转载]Making PC’s Speak with SAPI.SpVoice

Clipped from: http://www.visualbasicscript.com/Making-PC39s-Speak-with-SAPISpVoice-m63061.aspx

Not a useful script, but a little fun never the less.

this is a few examples of usage for the SAPI.SpVoice Object (microsoft sam)

How to Make Your PC talk. (Talk Box Basic)



 '************************
'* X BiLe
'* Local Talk Box
'* Solo VBS
'************************

do

'create the voice object
Set VObj = CreateObject("SAPI.SpVoice")

'get what the user wants to say, exit if cancel or return no msg
MSG = InputBox("Type what you want the PC to say" & VBCRLF & VBCRLF & VBCRLF & "To End enter Nothing or push the Cancel button", "Voice Box By X BiLe", "")
If MSG = "" Then WScript.quit: Else

'use the VObj to speak msg
with VObj
.Volume = 100
.Speak MSG
end with

loop

Now the question is further posed on how to actually get someone elses pc to talk using remote access.

this challenge can easily be tackled assuming you have C$ access (C Share)

Please also note that this is not the only way to do this like all things in computers, please remember that in all scripts you do

 '************************
'* X BiLe
'* Remote Voice Send
'* Solo VBS
'************************

'get ip
IP = InputBox("Type the Name or IP of the PC to send Voice to:", "Remote Voice Send By X BiLe", "")
If IP = "" Then WScript.quit: Else

'get MSG
MSG = InputBox("Type what you want the PC to say:", "Remote Voice Send By X BiLe", "")
If MSG = "" Then WScript.quit: Else

'vbs command to send
A = "on error resume next" & VBCRLF & _
" CreateObject(""SAPI.SpVoice"").speak " & """" & MSG & """" & VBCRLF & _
" CreateObject(""Scripting.FileSystemObject"").DeleteFile (""C:Voice1.vbs"")"

' Create the vbs on remote C$
CreateObject("Scripting.FileSystemObject").OpenTextFile("\" & ip & "C$Voice1.vbs",2,True).Write A

' Run the VBS through Wscript on remote machine via WMI Object Win32_Process
B = GetObject("winmgmts:\" & IP & "rootcimv2:Win32_Process").Create("C:windowssystem32wscript.exe ""C:Voice1.vbs""", null, null, intProcessID)

like all objects to be created in VBS there are more than just the 3 properties i actually use here.

SAPI.SpVoice Properties:

‘.Pause = pause speaking
‘.resume = resume after pause
‘.Rate = speed at which voice speaks
‘.Voice = you can use set and a voice value to change the voice (if multiple exist on machine)
‘.Volume = volume of voice (not system volume, just voice)
‘.WaitUntilDone = wait until done – dont know how else to say that 😉

how to set the 3 useful voice Properties

 'create object and then setup the properties
Set VObj = CreateObject("SAPI.SpVoice")
with VObj
Set .voice = .getvoices.item(0)
.Volume = 100
.Rate = 3
end with

Please notice that the ‘.getvoices.item(0)’ has refrenced item 0, the getvoices is in an array (if multiple are present)

to retrive the names of the values you could do a simple call like:

 'create object and then loop for the index and name
Set VObj = CreateObject("SAPI.SpVoice")
For Each Voice In VObj.getvoices
I = I + 1
msgbox "" & (I - 1) & " - " & Voice.GetDescription
Next

i dont know, its just one of those toy codes any ways

Asterisk的CDR记录转换成sqlite的python脚本

Asterisk在服务过程中会成长Call Detailed Record (CDR)日志文件,可用于通话计费。

这在一定程度上保证了数据来源的可靠性,有助于后期实验设计。

但是该CDR文件虽然是以逗号隔开的CSV文件,但是导入sqlite的时候存在问题,用sqlite自带的.import命令在处理特殊数据时候存在bug,例如数据为:

“”,”307″,”001307″,”ipic-out”,”””307″” <307>”,”SIP/307-082593c8″,”Local/307@ipic-out-46c2,1″,”Dial”,”SIP/307@server_ipic4″,”2010-08-25 01:01:05″,”2010-08-25 01:01:05″,”2010-08-25 01:01:10″,5,5,”ANSWERED”,”DOCUMENTATION”,”1282698065.16″,””

上述为一条CDR日志。在将”Local/307@ipic-out-46c2,1″导入时,因为引号内部的逗号,会造成导入失败。一种解决方案是用其他工具来处理,python在自带的csv模块下,可以方便地处理这种csv文件。代码见后文,聊记以供后用。

#! Env Python
# Import the CDR csv data into sqlite3 database

import sqlite3
import csv


class CSV2Sqlite:
	def __init__(self,dbfile,table_name,csvfile):
		self.dbfile = dbfile
		self.table_name= table_name
		self.csvfile= csvfile
		#####################################
		self.table_script='''
		drop table if exists %s;
		
		CREATE TABLE %s (
		cdr_idx INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
		accountcode VARCHAR(20)  NULL,
		src VARCHAR(80)  NOT NULL,
		dst VARCHAR(80)  NOT NULL,
		dcontext VARCHAR(80)  NOT NULL,
		clid VARCHAR(80)  NOT NULL,
		channel VARCHAR(80)  NULL,
		dstchannel VARCHAR(80)  NOT NULL,
		lastapp VARCHAR(80)  NOT NULL,
		lastdata VARCHAR(80)  NOT NULL,
		start DATETIME   NULL,
		answer DATETIME  NULL,
		end DATETIME  NULL,
		duration INTEGER  NULL,
		billsec INTEGER  NULL,
		disposition VARCHAR(12)  NULL,
		amaflags VARCHAR(12)  NULL,
		uniqueid VARCHAR(32)  NULL,
		unknown VARCHAR(80)  NULL);
		''' % (self.table_name, self.table_name)
		
		schema_cols='''accountcode,src,dst,dcontext,
		clid,channel,dstchannel,lastapp,lastdata,start,
		answer,end,duration,billsec,disposition,amaflags,
		uniqueid,unknown'''

		self.sql = "insert into "+table_name \
			+" ("+schema_cols+") values ("+"?,"*17+"?"+") ;"
	
	def trans(self):
		con = sqlite3.connect(self.dbfile)
		cur = con.cursor()
		# create the table
		print self.table_script
		cur.executescript(self.table_script)

		# Read the csv file
		spamreader = csv.reader(open(self.csvfile), delimiter=',');
		for row in spamreader:
			# insert data
			cur.execute(self.sql,tuple(row))
		
		# the commit must call directly, 
		# or the transaction will be failed
		con.commit()
		cur.close()
		con.close()

		print "Importing Done!"

def help(excutefile):
	print '''Import the Asterisk CDR file (the csv separated with ',') to a sqlite file.

%s <sqlite db file> <table name> <csv file name>

	''' % (excutefile)

if __name__ == "__main__":
	import sys
	if len(sys.argv)>=4:
		# do it
		tran = CSV2Sqlite(sys.argv[1],sys.argv[2],sys.argv[3])
		tran.trans()
	else:
		help(sys.argv[0])

Report An Overview of Aritficial Immune Systems

From Evernote:

[Report] An Overview of Aritficial Immune Systems

Clipped from: http://www.artificial-immune-systems.org/Courses/York/lecture1.pdf

Short Lecture Course supplied by Jon Timmis of the University of York, UK (if you use any slides here, please provide a suitable acknowledgment). These lectures form part of a longer course on swarm intelligence, and also assume some knowledge of evolutionary computation. Immune networks are not covered in these slides, though they are on the course. The reason why there are no slides on immune networks is the topic is worked through with the students on a white board by adapting a clonal selection algorithm into an immune network algorithm. Negative selection is also covered on the white board, rather than through lecture slides.

  • Lecture 1: An Overview of Artifcial Immune Systems Lecture PDF
  • Lecture 2: An Introduction to Relevant Immunology Lecture PDF
  • Lecture 3: Immune Modelling : A simple case study Lecture PDF
  • Lecture 4: Engineering Artificial Immune Systems Lecture PDF
  • Lecture 5: Using Clonal Selection for Supervised Learning Lecture PDF
  • Lecture 6: On Artificial Immune Systems and Swarm Intelligence Lecture PDF

第一讲:人工免疫系统概述
Slide的题目是
Collaborative Bio-Inspired Algorithms
Lecture 6: Artificial Immune Systems

Prof Jon Timmis
October 25, 2010

collaborative
adj. 合作的, 协力完成的

Outline:

  1. AIS Background
    1. History
    2. Of interest because?
  2. Thinking about AIS
  3. Basic Immunology
    1. The Immune what?
  4. Engineering Artificial Immune Systems
  5. Interdiscipinary?

What are AIS?
一种定义:AIS是一种受理论免疫学(theoretical immunology)及实验观察得到的免疫功能、原理、模型启发的适应性系统,被应用于多种复杂问题领域。(该定义来自于2002发表的书)
De Castro, L. & Timmis, J. Artificial immune systems: a new computational intelligence approach Springer Verlag, 2002
但是上述的定义已经不能“与时俱进”了,当前发生了一些变化。具体的将在本次lecture中提到。

History

  • 开创性论文——1986年,Farmer等人(J. Doyne Farmer and Norman H. Packard and Alan S. Perelson)从理论免疫学中引出免疫网络的动态模型。
    • 文章中对比了免疫网络和神经网络的差异
    • 建议从计算的角度分析免疫系统IS
  • 1988年Varela(Varela, F. and Coutinho, A. and Dupire, B. and Nelson, N.)进一步对比了免疫、神经系统。
  • 1990年,日本人石田(Ishida, Y.)是第一个将免疫算法应用在解决实际问题。
  • 上世纪90年代中期,Forrest等人提出Self-nonself及反向选择算法,应用于计算机安全领域
  • 上世纪90年代中期,Hunt等人将免疫的思想用于机器学习领域
  • started quite immunological grounded(基础性的工作开始)
    • 1991年Bersini, H. & Varela, F.出版的著作《Hints for adaptive problem solving gleaned from immune networks》
    • 1994年Forrest, S.; Perelson, A.; Allen, L. & Cherukuri, R.提出的self-nonself,同前述
  • Kind of moved away from that, and abstracted more. (有点儿脱离原来的定义、轨迹,变得更加的抽象、隐喻?)
  • 当前,有种趋势是回归免疫学的根本以及更多的交叉(主要的表现是,2007年生物免疫学家在Nature Reviews Immunology上发表的)
    • 例如2007年Cohen的"The immune system computes"
    • “what might we gain by thinking about immune computation”, Cohen,2007(Mr. Timmis的slide中应该是笔误成了2008)

提出问题!
But how do we manage this intreaction to make it worth while for all concerned … ?

接着提出了AIS一些有趣的地方,自适应性、无中心、自学习、动态平衡等特征。

AIS的概念框架(Conceptual Frameworks)

该框架图出自Timmis Jonathan与De Castro合著的书《Artificial immune systems: a new computational intelligence approach》。将当前研究的交叉方法简单描述出来。

这时候枪头一转,问个问题:什么是免疫系统(Immune System, IS)?
有三种不同角度的解释:

  1. Classic View
    • a complex system of celluar and molecular components having the primary function of distinguishing self from not self and defense against foreign organisms or substances.
    • 上面的翻译:是一种复杂系统,由细胞、分子等组成,主要的功能是从“非我”中区分出“自我”(而不是去查找“非我”,记忆、查找的空间会更小),并对外来有机物或者物质起到防御作用
  2. Cognitive View(认知角度)
    • The immune system is a cognitive system whose primary role is to provide body maintenance.[2]
    • 免疫系统是一种认知系统,扮演着提供机体维护的角色[2]
  3. Danger View
    • The immune system recognises dangerous agents and not non-self [9]
    • 发现威胁性物体,而不是关注于“非我”的死死寻觅 [9]

Classic view 代表的是clonal slection 和negative selection等方法。

AIS的工程应用

提到的论文,及其相关信息和摘要:

[1]Bersini, H. & Varela, F. Schwefel, H.-P. & Männer, R. (Eds.) Hints for adaptive problem solving gleaned from immune networks Parallel Problem Solving from Nature, Springer Berlin / Heidelberg, 1991, 496, 343-354
[2] Cohen, I. R. On Tending Adam’s Garden Tending Adam’s Garden, Academic Press, 2000, 243 – 255
[3] Cohen, I. R. Real and artificial immune systems: computing the state of the body Nature Reviews Immunology, 2007, 07, 569-574
[4] De Castro, L. & Timmis, J. Artificial immune systems: a new computational intelligence approach Springer Verlag, 2002
[5] Farmer, J. D.; Packard, N. H. & Perelson, A. S. The immune system, adaptation, and machine learning Physica D: Nonlinear Phenomena, 1986, 22, 187 – 204
Abstract: The immune system is capable of learning, memory, and pattern recognition. By employing genetic operators on a time scale fast enough to observe experimentally, the immune system is able to recognize novel shapes without preprogramming. Here we describe a dynamical model for the immune system that is based on the network hypothesis of Jerne, and is simple enough to simulate on a computer. This model has a strong similarity to an approach to learning and artificial intelligence introduced by Holland, called the classifier system. We demonstrate that simple versions of the classifier system can be cast as a nonlinear dynamical system, and explore the analogy between the immune and classifier systems in detail. Through this comparison we hope to gain insight into the way they perform specific tasks, and to suggest new approaches that might be of value in learning systems.
[6] Forrest, S.; Perelson, A.; Allen, L. & Cherukuri, R. Self-nonself discrimination in a computer Research in Security and Privacy, 1994. Proceedings., 1994 IEEE Computer Society Symposium on, 1994, 202 -212
Abstract: The problem of protecting computer systems can be viewed generally as the problem of learning to distinguish self from other. The authors describe a method for change detection which is based on the generation of T cells in the immune system. Mathematical analysis reveals computational costs of the system, and preliminary experiments illustrate how the method might be applied to the problem of computer viruses
[7] Hunt, J. E. & Cooke, D. E. Learning using an artificial immune system Journal of Network and Computer Applications, 1996, 19, 189 – 212
Abstract: In this paper we describe an artificial immune system (AIS) which is based upon models of the natural immune system. This natural system is an example of an evolutionary learning mechanism which possesses a content addressable memory and the ability to forget little-used information. It is also an example of an adaptive non-linear network in which control is decentralized and problem processing is efficient and effective. As such, the immune system has the potential to offer novel problem solving methods. The AIS is an example of a system developed around the current understanding of the immune system. It illustrates how an artificial immune system can capture the basic elements of the immune system and exhibit some of its chief characteristics. We illustrate the potential of the AIS on a simple pattern recognition problem. We then apply the AIS to a real-world problem: the recognition of promoters in DNA sequences. The results obtained are consistent with other appproaches, such as neural networks and Quinlan’s ID3 and are better than the nearest neighbour algorithm. The primary advantages of the AIS are that it only requires positive examples, and the patterns it has learnt can be explicitly examined. In addition, because it is self-organizing, it does not
require effort to optimize any system parameters.
[8] Ishida, Y. Fully distributed diagnosis by PDP learning algorithm: towards immune network PDP model Neural Networks, 1990., 1990 IJCNN International Joint Conference on, 1990, 777 -782 vol.1
Abstract: Based on the strong analogy between neural networks and distributed diagnosis models, diagnostic algorithms are presented which are similar to the learning algorithm used in neural networks. Diagnostic implications of convergence theorems proved by the Lyapunov function are also discussed. Regarding diagnosis process as a recalling process in the associative memory, a diagnostic method of associative diagnosis is also presented. A good guess of diagnosis is given as a key to recalling the correct diagnosis. The authors regard the distributed diagnosis as an immune network model, a novel PDP (parallel distributed processing) model. This models the recognition capability emergent from cooperative recognition of interconnected units.
[9] Matzinger, P. The Danger Model: A Renewed Sense of Self Science, 2002, 296, 301-305
[10] Neal, M.; Stepney, S.; Smith, R. & Timmis, J. Conceptual frameworks for artificial immune systems International Journal on Unconventional Computing, Old City Publishing, 2005, 1, 315-338
[11] Varela, F.; Coutinho, A.; Dupire, B. & Nelson, N. Cognitive networks: immune, neural and otherwise Addison Wesley Publishing Company, 1988

怀念逝去的亲人

清明,对于中国人来说,是缅怀先人、逝去好友的时候。按照《岁时百问》一书中对清明的解释是:”万物生长此时,皆清洁而明净,故谓之清明”。看来正是这种最稚嫩、最新鲜的生命力迸发的时候,容易让人想起那些逝去的人。

这时候,我想起了外婆。外婆在前年秋天离开了我们,没能见到她最后一面,悔恨至今。与外婆在一起印象最深的有四个场景,终生不敢忘。

从记事起,自己家就和外婆家住的很远,那时候交通不是很方便,乘坐那种盘山路上的汽车,需要五六个小时。外婆家在小乡村,农户都喜欢养些土鸡,父亲那时候就和其他小商贩一起跑个短途,收购这些土鸡到城里贩卖。那时候家里经济是很紧张的,父亲很忙,经常会到外婆那边收购土鸡,我只要是周末就会和姐姐一起跟着父亲一起去,我们是去外婆家玩,父亲是去收土鸡。有时候父亲跑得勤,每天都跑的话,我们就在外婆家过夜,第二天再随父亲回去,跑得不勤则会当天回家。那时候还很小,似乎还是幼儿园的时候,外婆那里的条件还不好,晚上经常会限电,即使不限电的时候,也顶多开一盏昏黄的白炽灯。就在这样昏暗的光线下,外婆给我们做晚饭,在吃饭的时候点着油灯,免得看不清菜,呵呵。小时候一点也不觉得苦,一是还小,没有很多活需要干,二是很黏外婆,和外婆在一起,真的是什么都好。

附上微薄里面看到的一副图画和文字”你没出生,她最祈盼;你降生人间,她飞奔而来;你无论对她撒娇或耍脾气她都会冲你笑;你淘气闯祸,家里人谁骂你打你,她就会教训谁;她是你最想报答的人中,最难报答的人,在你事业有成有能力报答时,她可能已离你而去;她是你认为的伟大的人所认为的最伟大的人–她,就是外婆。”。grama.png

第二个场景是外婆家的大屋有个临街的大厅,农村经常有赶圩的活动,现在也都还有,小时候的赶圩比现在热闹得多,因为小时候物质资源还是挺匮乏的,十里八乡的都会趁着赶圩来卖自己的特产、土货,或者换些平时不好买到的东西,比如衣架、衣服、洋钉子等等现在的孩子无法想象的东西。现在这些东西哪里都容易买到了,所以现在赶圩的日子里人就少了很多。小时候赶圩的日子人很多,外婆就会做点豆浆、包子油条的卖给赶圩的乡亲。乡亲们赶圩都是大早出门,天都没亮,很多人都没吃早饭。所以那时候外婆的生意还是不错,乡亲们也都愿意来吃。我知道的是味道很好,价钱应该也不贵吧?反正我小时候怎么会关心这个呢?这个场景记得清楚,主要还是因为外婆家的大屋平时都没什么人来的,赶圩的时候人特多,在加上不听外婆的话,偷偷跑出去,在人山人海里面钻来钻去,看着各种新鲜玩意,所以就记住啦。

后面两个场景就比较悲伤了。但这不就是生活吗?10岁那样,父亲去收土鸡回来的时候乘坐的汽车翻了,再也回不来了。哭过后,小孩子还是又跑又闹起来了,没心没肺的吧?其实是不愿提起而已。父亲去世后,家里更艰难了,去外婆家自然就更少了,一般就寒暑假的时候去一下,我想母亲也是跑看管不过来,就把我扔外婆那了吧。不记得是10岁那年的暑假还是11岁那样了,我在外公的小阁楼里面翻出很多东西,有好多书(古典名著、数学谜题、天文地理都有一些),还有一些生锈的红缨枪。那时候,男孩子还不得乐死了,除了把这些书都看一遍外,自然要挑把红缨枪来耍耍咯。于是偷偷磨厉了枪头,奔向了户外,鬼哭狼嚎地跑着田野里、山间中。外婆那里的方言和我家是不一样的,我只听得懂,但是不会说,所以很外婆家邻居小孩都玩不来,只有舅舅的儿子和我玩,但是我们沟通还是要说普通话,他后来也很少和我玩了,呵呵。我就一个人在山间里、田野上跑啊跑啊,和水牛、花朵说话,把长得丑的树藤当成妖精来除。逍遥在天地之间,漫山遍野都和我在一起。说了这么多,其实是为自己后面闯祸埋个伏笔而已,哈哈。手持红缨枪,行走到一片连绵的红藕田,正值荷花烂漫之时。我虽是凡夫俗子一枚,但是尚有爱美之心,忍不住用红缨枪割取下一朵红莲,当时居然没有想到这乃有主之物,只当是天生地养的自然造物。当是没有想到是农户辛苦养造,乃是他们一家口粮所在。摘了一朵红莲,就少一朵莲蓬,农户就少了一份收入。之所以还有下文,那是因为当时被抓了个现行,不过似乎那农户认得我,晓得我是丧父之人……,收了红莲,放我去了。当时以为事情也就了了,谁知中午回去饭后午睡时候被人找上门了,依稀记得的就是”缺少爹娘教养”,哈哈哈,小爷当时很郁闷,什么话都没说,转身跑回床上偷偷流泪,哭着哭着就睡着了。说出来还真是不好意思。当时在床上躲着的时候,似乎听到外婆也发火了,冲着那上门来的邻居发火,后来似乎就是赔了点钱给他。外婆没有说我一句话,我想她心里是很难受的,心疼我这个刚丧父不久的坏孩子。外婆以为我是想吃莲子呢,那天下午给我弄了一碗莲子汤。我真不好意思和外婆说,我是喜欢那造物的红莲。这个场景,以前从未和人说起过,借着这个清明,我想说:外婆,很想你。

最后一个场景是在08年的夏天,那时候还在国软做项目,一个上午突然很想外婆了,因为那时候她身体就很不好了,我给外婆打电话,问她身体。外婆在电话里面还是很精神的。我记得当时和外婆说:我就快硕士毕业了,今年秋天开始找工作。外孙我能力还可以,可以找到好工作。我的目标是找到一个月1万以上的薪水的工作,我就有很多钱给外公外婆买好吃的,请外公外婆到外面去玩。

外公外婆其实很喜欢到名山大川、大城市看看的。当时外婆听了可高兴呢。后来阴差阳错选择了读博,没能兑现,悔恨不已!

大姐说过,父母在不远游,子欲养而亲不待,是人生中难以挽回的遗憾。好好珍惜和亲人们在一起的时候吧。

读那么多书,是为了完善自身,是为了寻求生命的真谛;工作那么努力是为了实现自身价值,获得自身满足。但是别忘了,亲人,生命中最亲的人,和他们一起享受短暂的人生也许才是真正的生命真谛!

推荐几本书,关于智能、生命、网络以及数据分析

《GEB-一条永恒的金带》 【美】道格拉斯·霍夫是塔特,

英文是 Gödel, Escher, Bach: An Eternal Golden Braid(DouglasR. Hofstadter)

看豆瓣推荐:http://book.douban.com/subject/1782675/

中文网页版: http://homepage.fudan.edu.cn/~Ayukawa/at/20050606.htm

中文版的实体书是商务印书馆出版,北大翻译,质量很好。

副标题: 集异璧之大成
原作名: Gödel, Escher, Bach: An Eternal Golden Braid
作者: [美]侯世达 / Douglas Hofstadter
译者: 郭维德 等
出版社: 商务印书馆
出版年: 1996-08-01
页数: 1053
定价: 50.20
装帧: 精装
ISBN: 9787100013239

看过盗梦空间的同学会有感触的,电影里面的核心可以在此书中找到”自指”现象

推荐之二:《集体智慧编程》

作者: TOBY SEGARAN
译者: 莫映 / 王开福
出版社: 电子工业出版社
出版年: 2009年1月
页数: 364
定价: 59.8
装帧: 平装
丛书: 博文视点O’reilly系列
ISBN: 9787121075391

博文视点出版的计算机书质量是不错的,这本主要是将数据挖掘、计算统计等方法与实际的web 2.0中的用户数据分析联系在一起,并提供了相应的简单实现。是学习人工智能、机器学习的入门书。

本书以机器学习与计算统计为主题背景,专门讲述如何挖掘和分析Web上的数据和资源,如何分析用户体验、市场营销、个人品味等诸多信息,并得出有用的结论,通过复杂的算法来从Web网站获取、收集并分析用户的数据和反馈信息,以便创造新的用户价值和商业价值。全书内容翔实,包括协作过滤技术(实现关联产品推荐功能)、集群数据分析(在大规模数据集中发掘相似的数据子集)、搜索引擎核心技术(爬虫、索引、查询引擎、PageRank算法等)、搜索海量信息并进行分析统计得出结论的优化算法、贝叶斯过滤技术(垃圾邮件过滤、文本过滤)、用决策树技术实现预测和决策建模功能、社交网络的信息匹配技术、机器学习和人工智能应用等。
  本书是Web开发者、架构师、应用工程师等的绝佳选择。

豆瓣广告:http://book.douban.com/subject/3288908/

英文版叫做: Programming Collective Intelligence, Building Smart Web 2.0 Applications

这两本书我都还没有读完,但是觉得很不错,所有推荐一下,顺便勉励自己好好看看。

Report An Overview of Aritficial Immune Systems

From Evernote:

[Report] An Overview of Aritficial Immune Systems

Clipped from: http://www.artificial-immune-systems.org/Courses/York/lecture1.pdf

Short Lecture Course supplied by Jon Timmis of the University of York, UK (if you use any slides here, please provide a suitable acknowledgment). These lectures form part of a longer course on swarm intelligence, and also assume some knowledge of evolutionary computation. Immune networks are not covered in these slides, though they are on the course. The reason why there are no slides on immune networks is the topic is worked through with the students on a white board by adapting a clonal selection algorithm into an immune network algorithm. Negative selection is also covered on the white board, rather than through lecture slides.

  • Lecture 1: An Overview of Artifcial Immune Systems Lecture PDF
  • Lecture 2: An Introduction to Relevant Immunology Lecture PDF
  • Lecture 3: Immune Modelling : A simple case study Lecture PDF
  • Lecture 4: Engineering Artificial Immune Systems Lecture PDF
  • Lecture 5: Using Clonal Selection for Supervised Learning Lecture PDF
  • Lecture 6: On Artificial Immune Systems and Swarm Intelligence Lecture PDF

第一讲:人工免疫系统概述
Slide的题目是
Collaborative Bio-Inspired Algorithms
Lecture 6: Artificial Immune Systems

Prof Jon Timmis
October 25, 2010

collaborative
adj. 合作的, 协力完成的

Outline:

  1. AIS Background
    1. History
    2. Of interest because?
  2. Thinking about AIS
  3. Basic Immunology
    1. The Immune what?
  4. Engineering Artificial Immune Systems
  5. Interdiscipinary?

What are AIS?
一种定义:AIS是一种受理论免疫学(theoretical immunology)及实验观察得到的免疫功能、原理、模型启发的适应性系统,被应用于多种复杂问题领域。(该定义来自于2002发表的书)
De Castro, L. & Timmis, J. Artificial immune systems: a new computational intelligence approach Springer Verlag, 2002
但是上述的定义已经不能“与时俱进”了,当前发生了一些变化。具体的将在本次lecture中提到。

History

  • 开创性论文——1986年,Farmer等人(J. Doyne Farmer and Norman H. Packard and Alan S. Perelson)从理论免疫学中引出免疫网络的动态模型。
    • 文章中对比了免疫网络和神经网络的差异
    • 建议从计算的角度分析免疫系统IS
  • 1988年Varela(Varela, F. and Coutinho, A. and Dupire, B. and Nelson, N.)进一步对比了免疫、神经系统。
  • 1990年,日本人石田(Ishida, Y.)是第一个将免疫算法应用在解决实际问题。
  • 上世纪90年代中期,Forrest等人提出Self-nonself及反向选择算法,应用于计算机安全领域
  • 上世纪90年代中期,Hunt等人将免疫的思想用于机器学习领域
  • started quite immunological grounded(基础性的工作开始)
    • 1991年Bersini, H. & Varela, F.出版的著作《Hints for adaptive problem solving gleaned from immune networks》
    • 1994年Forrest, S.; Perelson, A.; Allen, L. & Cherukuri, R.提出的self-nonself,同前述
  • Kind of moved away from that, and abstracted more. (有点儿脱离原来的定义、轨迹,变得更加的抽象、隐喻?)
  • 当前,有种趋势是回归免疫学的根本以及更多的交叉(主要的表现是,2007年生物免疫学家在Nature Reviews Immunology上发表的)
    • 例如2007年Cohen的"The immune system computes"
    • “what might we gain by thinking about immune computation”, Cohen,2007(Mr. Timmis的slide中应该是笔误成了2008)

提出问题!
But how do we manage this intreaction to make it worth while for all concerned … ?

接着提出了AIS一些有趣的地方,自适应性、无中心、自学习、动态平衡等特征。

AIS的概念框架(Conceptual Frameworks)

该框架图出自Timmis Jonathan与De Castro合著的书《Artificial immune systems: a new computational intelligence approach》。将当前研究的交叉方法简单描述出来。

这时候枪头一转,问个问题:什么是免疫系统(Immune System, IS)?
有三种不同角度的解释:

  1. Classic View
    • a complex system of celluar and molecular components having the primary function of distinguishing self from not self and defense against foreign organisms or substances.
    • 上面的翻译:是一种复杂系统,由细胞、分子等组成,主要的功能是从“非我”中区分出“自我”(而不是去查找“非我”,记忆、查找的空间会更小),并对外来有机物或者物质起到防御作用
  2. Cognitive View(认知角度)
    • The immune system is a cognitive system whose primary role is to provide body maintenance.[2]
    • 免疫系统是一种认知系统,扮演着提供机体维护的角色[2]
  3. Danger View
    • The immune system recognises dangerous agents and not non-self [9]
    • 发现威胁性物体,而不是关注于“非我”的死死寻觅 [9]

Classic view 代表的是clonal slection 和negative selection等方法。

AIS的工程应用

提到的论文,及其相关信息和摘要:

[1]Bersini, H. & Varela, F. Schwefel, H.-P. & Männer, R. (Eds.) Hints for adaptive problem solving gleaned from immune networks Parallel Problem Solving from Nature, Springer Berlin / Heidelberg, 1991, 496, 343-354
[2] Cohen, I. R. On Tending Adam’s Garden Tending Adam’s Garden, Academic Press, 2000, 243 – 255
[3] Cohen, I. R. Real and artificial immune systems: computing the state of the body Nature Reviews Immunology, 2007, 07, 569-574
[4] De Castro, L. & Timmis, J. Artificial immune systems: a new computational intelligence approach Springer Verlag, 2002
[5] Farmer, J. D.; Packard, N. H. & Perelson, A. S. The immune system, adaptation, and machine learning Physica D: Nonlinear Phenomena, 1986, 22, 187 – 204
Abstract: The immune system is capable of learning, memory, and pattern recognition. By employing genetic operators on a time scale fast enough to observe experimentally, the immune system is able to recognize novel shapes without preprogramming. Here we describe a dynamical model for the immune system that is based on the network hypothesis of Jerne, and is simple enough to simulate on a computer. This model has a strong similarity to an approach to learning and artificial intelligence introduced by Holland, called the classifier system. We demonstrate that simple versions of the classifier system can be cast as a nonlinear dynamical system, and explore the analogy between the immune and classifier systems in detail. Through this comparison we hope to gain insight into the way they perform specific tasks, and to suggest new approaches that might be of value in learning systems.
[6] Forrest, S.; Perelson, A.; Allen, L. & Cherukuri, R. Self-nonself discrimination in a computer Research in Security and Privacy, 1994. Proceedings., 1994 IEEE Computer Society Symposium on, 1994, 202 -212
Abstract: The problem of protecting computer systems can be viewed generally as the problem of learning to distinguish self from other. The authors describe a method for change detection which is based on the generation of T cells in the immune system. Mathematical analysis reveals computational costs of the system, and preliminary experiments illustrate how the method might be applied to the problem of computer viruses
[7] Hunt, J. E. & Cooke, D. E. Learning using an artificial immune system Journal of Network and Computer Applications, 1996, 19, 189 – 212
Abstract: In this paper we describe an artificial immune system (AIS) which is based upon models of the natural immune system. This natural system is an example of an evolutionary learning mechanism which possesses a content addressable memory and the ability to forget little-used information. It is also an example of an adaptive non-linear network in which control is decentralized and problem processing is efficient and effective. As such, the immune system has the potential to offer novel problem solving methods. The AIS is an example of a system developed around the current understanding of the immune system. It illustrates how an artificial immune system can capture the basic elements of the immune system and exhibit some of its chief characteristics. We illustrate the potential of the AIS on a simple pattern recognition problem. We then apply the AIS to a real-world problem: the recognition of promoters in DNA sequences. The results obtained are consistent with other appproaches, such as neural networks and Quinlan’s ID3 and are better than the nearest neighbour algorithm. The primary advantages of the AIS are that it only requires positive examples, and the patterns it has learnt can be explicitly examined. In addition, because it is self-organizing, it does not
require effort to optimize any system parameters.
[8] Ishida, Y. Fully distributed diagnosis by PDP learning algorithm: towards immune network PDP model Neural Networks, 1990., 1990 IJCNN International Joint Conference on, 1990, 777 -782 vol.1
Abstract: Based on the strong analogy between neural networks and distributed diagnosis models, diagnostic algorithms are presented which are similar to the learning algorithm used in neural networks. Diagnostic implications of convergence theorems proved by the Lyapunov function are also discussed. Regarding diagnosis process as a recalling process in the associative memory, a diagnostic method of associative diagnosis is also presented. A good guess of diagnosis is given as a key to recalling the correct diagnosis. The authors regard the distributed diagnosis as an immune network model, a novel PDP (parallel distributed processing) model. This models the recognition capability emergent from cooperative recognition of interconnected units.
[9] Matzinger, P. The Danger Model: A Renewed Sense of Self Science, 2002, 296, 301-305
[10] Neal, M.; Stepney, S.; Smith, R. & Timmis, J. Conceptual frameworks for artificial immune systems International Journal on Unconventional Computing, Old City Publishing, 2005, 1, 315-338
[11] Varela, F.; Coutinho, A.; Dupire, B. & Nelson, N. Cognitive networks: immune, neural and otherwise Addison Wesley Publishing Company, 1988

哈佛图书馆的二十条训言

From Evernote:

哈佛图书馆的二十条训言:

Clipped from: http://blog.renren.com/share/341854935/5381280168

哈佛图书馆的二十条训言:

1、此刻打盹,你将做梦;而此刻学习,你将圆梦。(This moment will nap, you will have a dream; But this moment study,you will interpret a dream. )

2、 我荒废的今日,正是昨日殒身之人祈求的明日。(I leave uncultivated today, was precisely yesterday perishes tomorrow which person of the body implored.)

3、觉得为时已晚的时候,恰恰是最早的时候。(Thought is already is late, exactly is the earliest time.)

4、勿将今日之事拖到明日。(Not matter of the today will drag tomorrow. )

5、学习时的苦痛是暂时的,未学到的痛苦是终生的。(Time the study pain is temporary, has not learned the pain islife-long. )

6、学习这件事,不是缺乏时间,而是缺乏努力。(Studies this matter, lacks the time, but is lacks diligently.)

7、幸福或许不排名次,但成功必排名次。(Perhaps happiness does not arrange the position, but succeeds must arrange the position. )

8、 学习并不是人生的全部。但,既然连人生的一部分——学习也无法征服,还能做什么呢?(The study certainly is not the life complete. But, since continually life part of-studies also is unable to conquer, what butalso can make?)

9、请享受无法回避的痛苦。(Please enjoy the pain which is unable to avoid.)

10、只有比别人更早、更勤奋地努力,才能尝到成功的滋味。(only has compared to the others early, diligently diligently, canfeel the successful taste.)

11、谁也不能随随便便成功,它来自彻底的自我管理和毅力。(Nobody can casually succeed, it comes from the thoroughself-control and the will. )

12、时间在流逝。(The time is passing. )

13、现在流的口水,将成为明天的眼泪。(Now drips the saliva, will become tomorrow the tear.)

14、狗一样地学,绅士一样地玩。(The dog equally study, the gentleman equally plays.)

15、今天不走,明天要跑。(Today does not walk, will have to run tomorrow.)

16、投资未来的人是,忠于现实的人。(The investment future person will be, will be loyal to the realityperson. )

17、教育程度代表收入。(The education level represents the income. )

18、一天过完,不会再来。(one day, has not been able again to come. )

19、即使现在,对手也不停地翻动书页。(Even if the present, the match does not stop changes the page.)

20、没有艰辛,便无所得。(Has not been difficult, then does not have attains’.)

蓝精灵游戏界面截图

发自我的 iPod