自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(34)
  • 资源 (2)
  • 收藏
  • 关注

转载 python 如何安装第三方模块module

for example1、下载:chardet-1.0.1.tar.gz #md5=7c28b02bca7847c13bebedaf4df6c5a3" target="_blank" rel="nofollow">http://pypi.python.org/packages/source/c/chardet/chardet-1.0.1.tar.gz#md5=7c28b02b

2013-10-31 22:10:34 5108

原创 用nohup和screen将linux 程序放在后台执行。

nohup用nohup > **.out &将程序放在后台执行,注意nohup.out在我们的server中不会自动生成。所以输出要重定向而且nohup.out 是在程序运行结束之后才会将buffer中的输出信息输出到重定向后的out文件中。不能查看进度!screen只用一个会话(session), 开多个窗口,每个窗口对应我运行的程序,开新窗口的命令为c

2013-10-31 18:59:00 775

转载 linux 中 screen命令

一、背景系统管理员经常需要SSH 或者telent 远程登录到Linux 服务器,经常运行一些需要很长时间才能完成的任务,比如系统备份、ftp 传输等等。通常情况下我们都是为每一个这样的任务开一个远程终端窗口,因为它们执行的时间太长了。必须等待它们执行完毕,在此期间不能关掉窗口或者断开连接,否则这个任务就会被杀掉,一切半途而废了。二、简介GNU Screen是一款由GNU计

2013-10-31 16:17:17 762

转载 linux top命令详解

top命令是Linux下常用的性能分析工具,能够实时显示系统中各个进程的资源占用状况,类似于Windows的任务管理器。下面详细介绍它的使用方法。top - 01:06:48 up 1:22, 1 user, load average: 0.06, 0.60, 0.48Tasks: 29 total, 1 running, 28 sleeping, 0 stopped, 0 zombi

2013-10-31 14:52:11 632

转载 如果python程序写硬盘太慢,可以考虑输出为二进制。且save 和load 都用pickle比较方便

import pickle用字典做了文本数据的统计,但是还没有统计完,需要第二天继续,所以用到了数据持久化部分。简单记录字典的保存和导出。import pickle# create dictlist = {"01":02,"02":03,"03":04}# save dictf1 = open("E:\\test.txt","wb")pickle.dump(li

2013-10-31 10:52:13 3248

转载 python error: IndentationError: unindent does not match any outer indentation level

occur at the position where you mix tabs and spaces. you just need to del all of them and press tab button sucessivelyref: http://stackoverflow.com/questions/492387/indentationerror-unindent-does-no

2013-10-30 16:36:48 1202

转载 给定element,求此element在list中的 index or position

ref http://www.cnblogs.com/Kaysin/archive/2013/02/08/2909402.html我们没有测试index,因为index 有个比较有趣的现象,让我们来试一下。# 位置 1 2 3 4 5 6 7# 序号 0 1 2 3 4 5 6a_list =['a','b',

2013-10-30 16:22:21 847

原创 topic model 预处理步骤

1. del punctuation2. lower case3. del stopword4. len(s)>15. del infrequent word

2013-10-30 10:56:44 773

转载 批量replace method python

ref:    http://stackoverflow.com/questions/10017147/python-replace-characters-in-stringTry regular expressions: a = re.sub('[.!,;]', '', a)You can also built an expression dynamically

2013-10-29 23:32:24 1453

转载 python 建立vocabulary,包括去标点,split

http://www.cnblogs.com/sunada2005/archive/2013/05/01/3053377.html一、统计txt中英文单词出现的次数 1 import string                  #处理文本时,需要去除跟在单词后的标点。所以用到string模块 2 3 filename=open('sampleFile.txt')

2013-10-29 22:56:41 6718

原创 python 对string去掉标点符号

delset = string.punctuationl = line.translate(None,delset)print l 即为去掉标点符号的 string,而line本身没有变化

2013-10-29 22:48:11 39728 2

原创 在linux服务器某文件夹下,使用鼠标进行copy,move,其实还是会在目录下留有name.txt~的临时文件

程序如果以这个目录为dataset 运行的话 结果会有错误。。解决方法就是 用shell命令对这些txt~文件进行删除 rm

2013-10-28 17:34:12 894

原创 python中startswith与endswith方法

注意:是startswith  而不是 startwith,有个serror如果是 str has no startwith attribute。。。可能是方法名写错了或者类型不对

2013-10-28 17:09:39 4841 2

转载 常用的优化办法,unconstrained & constrained

For unconstrained,        if f coninuously differentiable,                                                      gradient f = 0. 就是对每个分量求partial derivative 等于0,      得到的f(x_) 至少是local min。

2013-10-23 23:01:49 1287

转载 自己对gradient的误解-----理解gradient descend算法

首先,对于f(x)的gradient,如果x是k维,则gradient就是k维,就是在x的domain里,gradient的方向会使得f(x)的增加最快。注意这里的gradient并不是两个cross black point 之间的方向,这个方向是3维的。而是在2维投影平面中的一个方向,即

2013-10-23 22:11:44 1674

转载 VS2010每次编译都重新编译整个工程的解决方案

在使用VS2010编译C++程序的时候,每次修改工程中的某一个文件,点击“生成-仅用于项目-仅生成**”时,往往都是整个工程都需要重新编译一遍。由于这个工程代码量太大,每次编译完成都需要将近10分钟左右的时间编译。最烦人的时候是当编译完了出错,修改了错误再次编译,浪费很多时间。那么怎么配置VS2010像VC6.0那样默认的可以只编译修改后的文件呢?针对这个问题的解决办法网络上也有不少,在这

2013-10-23 16:27:08 8168

转载 sparse coding理解

ref: yu kai cvpr12 tutorial http://blog.csdn.net/jwh_bupt/article/details/9902949 典型的sparse coding的过程分为训练和测试。       Training:给定一些训练样本(training samples)[ x1, x2, …, xm(in Rd)],学习一本字

2013-10-22 16:02:17 907

原创 通过HMM backforward 与viterbi 理解DP算法

http://www.cnblogs.com/tornadomeet/archive/2012/03/24/2415583.htmlhttp://www.cnblogs.com/tornadomeet/archive/2012/03/24/2415889.htmlhttp://blog.52nlp.org/hmm-learn-best-practices-six-viterbi-alg

2013-10-21 11:31:44 1092

原创 用department的linux sever安装软件,解压tar.gz时遇到gzip,unexpected end of the file

遇到这个问题,主要是/gds/文件夹有space limit限制,google chrome下载的文件,提示成功下载,但其实是没有下载完整的file的。。。以后都要用wget 在terminal里面下载

2013-10-18 16:59:21 5270

转载 linux的目录结构

RT。

2013-10-18 15:14:11 623

转载 关于~/目录

波浪号(“~”)字符在文件名中也有比较特殊的用途。如果是“~/test”,这就表示当前用户的$HOME目录下的test目录。而“~hchen/test”则表示用户hchen的宿主目录下的test目录。(这些都是Unix下的小知识了,make也支持)而在Windows或是MS-DOS下,用户没有宿主目录,那么波浪号所指的目录则根据环境变量“HOME”而定。

2013-10-18 14:53:40 781

转载 vim 常用快捷键

dd刪除游標所在的那一整列(常用)yy複製游標所在的那一行(常用)u復原前一個動作。(常用)[Ctrl]+r重做上一個動作。(常用)這個 u 與 [Ctrl]+r 是很常用的指令!一個是復原,另一個則是重做一次~ 利用這兩個功能按鍵,你的編輯,嘿嘿!很快樂的啦!.不要懷疑!這就是小數

2013-10-18 11:42:39 730

原创 linux常用快捷键

ctrl + L 选中浏览器中的网址shift + insert 是在vim中插入copy的文本

2013-10-18 11:26:08 615

原创 nonparametric method

nonparametric 也要做model selection,即alpha,选择一个new cluster的概率,就是说我们可以通过alpha调整用来fit 这些dataset的cluster 数目

2013-10-13 14:52:16 848

原创 dirichlet mixture process

仅仅是把z的选取 从以前的multinomial 分布改成了,condition on previous z与 G的分布,这个分布可以用CRP, or stick construction来刻画

2013-10-13 14:38:48 858

转载 product of experts & mixture model

ref: http://www.scholarpedia.org/article/Product_of_expertsOne can qualitatively understand the difference between mixtures and products by observing that a mixture distribution can have high pr

2013-10-11 15:29:14 1814

原创 generative model 与 discriminative model 进一步理解

g model 就是 意淫p(x,y)的产生过程,这个过程可以任意复杂,只要能够inference出来。d model 就是 有些observation如果用 generative model来意淫出来的话,会导致model过于复杂,inference是个问题,所以我们可以alleviate这些observation,将其视作已经生成好了的,看做已知的东西,即graphical model 中

2013-10-10 23:30:43 1409

原创 对于observation or feature 的两种利用方式

对于text dataset, 每篇doc 一般都有对应的metadata(side information), 还有容易得到的一些feature e.g. pos, np chunking, wordnet1. word 本身2. metadata3. feature都算是我们的observation, 利用的方式有两种,第一种就是用generative model, 意淫这

2013-10-10 23:11:40 1114

转载 HMM 学习最佳范例

http://wenku.baidu.com/view/ff413e1cc5da50e2524d7f1c.html

2013-10-07 20:54:34 637

原创 KL(q||p)与KL(p||q) variational inferenece

KL(q||p) 重视local的 big p(z), 不重视global,q(z)的z subspace 都对应p(z)的big probability mass,即,“重点打击”. 但是q(z)的z subspace不能 cover 所有p(z) 大的region. 例如在GMM中KL(p||q) 重视global的,avg的,不重视local的,p(z) nonzero的地方,q(z)也

2013-10-05 22:58:10 1848

转载 Gaussina distribution中的马氏距离

马氏距离 Mahalanobis distanceThe drawback of the above approach was that we assumed that the sample points are distributed about the center of mass in a spherical manner. Were the distributi

2013-10-05 20:31:58 936

原创 plsa中的d variable

plsa中的d variable,如果p(z|d)服从multinomial,那么d=theta

2013-10-03 19:34:22 656

原创 什么时候用EM算法?topic model case

在topic model中有parameter 和 hyper parameter, 首先我们不要consider hyper parameter,只对parameter与observation 进行model,即log-likelihood 是 ln p(x|theta) = sigma_ln p(x_i|theta) = sigma_ln sigma_i {p(x_i|z_i)

2013-10-03 09:27:05 1219

原创 latent variable理解

1. typically, latent variable 存在于mixture model中2. 分为discrete latent variable 和 continuous latent variable3. 相当于indicator,为了便于计算而引入,每个observation data corresponds to a latent variable4. p(x) = si

2013-10-02 22:59:37 4786

基于风险决策的企业管理分析

2010年西北工业大学数学建模校队暑假训练题----2010年东北A题

2010-07-22

温室中的绿色生态臭氧病虫害防治

2010年西北工业大学数模校队训练题----第七届苏北B题

2010-07-18

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除