2012-01-01から1年間の記事一覧
以下の文章のcounts属性を抜出し表示 test.html <head>This is a test. </head> <body> test <dagu elements=xxx> <td counts=3 no=xxx></td> <td counts=4 no=yyy></td> <td counts=hello no=zzz></td> </body> ルビーのソースコード hpricotは, xmlやhtml切り出し用のライブラリ gem install hpricot で入手できる. rubygems をインストール後.ルビーのソース require 'rubygems' req…
例1 そのままの場合 as.numeric(as.POSIXlt("2007-07-03 13:32:06 JST")) 例2 日付が2007.07.03だったら? hidu<-paste(unlist(strsplit("2007.07.03","\\.")),collapse="-") as.numeric(as.POSIXlt(paste(sep="",hidu," 13:32:06 JST")) 例3 ベクトルを一…
データ, data 1の部分だけ黒い縦線を引く. バーコード状のプロット. 1がクラスタしているか確かめられる. rug関数を用いる. #data<-rbinom(size=1,prob=0.5,1000) plot(data,col=0) rug(which(data==1),ticksize=1)
Rで移動平均 moving_average<-function(ts123,lag){ tmp<-0 for(i in 1:lag){ tmp<-tmp+ts123[(i):(length(ts123)-(lag-i))]/lag } tmp<-c(rep(NA,lag-1),tmp) tmp } j<-moving_average(ll,32) plot(j)
##Larning library(nnet) library(tseries) #Logistic map x<-0 x[1]<-0.5 x[2]<-0.5 a<-3.8 for(i in 1:1000){ x[i+1]<-a*x[i]*(1-x[i]) } input<-cbind(x[1:(length(x)-1)]) output<-cbind(x[2:length(x)]) results<-nnet(input,output,size=5,lang=0.3,ma…
CCF →相互相関 x<-rnorm(1000) y<-rnorm(1000) ccf(x,y) x<-rnorm(1000) y<-x[2:length(x)] x<-x[1:(length(x)-1)] ccf(x,y) plot(x) points(y,col=2) plot(x[2:(length(y))],y[1:(length(y)-1)]) TSデータ構造Lagplot →時系列の自己相関を目でみて確認。 x<…
data1<-data.frame(a,b,c) l2<-lm(c~a+b,data=kawase) summary(l2) plot(data1$c,type="l") points(predict(l2),type="l",col=3) plot(l2)
グラフの記号の英語の名前→ http://archives.jpn.org/name/101.html
ノンパラメトリックベイズの勉強法 http://d.hatena.ne.jp/nokuno/20090326/1238085058
Window lnorm_e_d_s_moto() : Graph #Parameter ##Filename String header="test1" String header2="test2" ##Folder name String dir1234="C:Documents and Settings:" ##Levels make /O/N=100 kugiri3 make /O/N=100 kugiri3A kugiri3=0.5*x kugiri3A=0.5*…
NHKの杯の囲碁は準々決勝です。。 謝女流本位坊と羽根棋聖の対局です。。 謝女流本因坊が準決勝進出なるか?の対局 http://cgi2.nhk.or.jp/goshogi/gotou/NHK囲碁と将棋 〜第59回 NHK杯テレビ囲碁トーナメント〜 cgi2.nhk.or.jp 「NHK囲碁と将棋」のページで…
boostで対数正規分布乱数の発生。 g++ test.cpp -L/usr/include/boost/random test.cpp #include<boost/random.hpp> #include<stdio.h> #include<stdlib.h> #include<iostream> int main(){ using namespace std; using namespace boost; mt19937 gen(1); lognormal_distribution<> dst(1,1); //normal_distr</iostream></stdlib.h></stdio.h></boost/random.hpp>…
Rで対数軸の等高線。 matmat<-function(x,y,z,kugirix=27,kugiriy=27,add=F, plot=T,col=col2){ dimx<-exp(seq(min(log(x)),max(log(x)),length.out=kugirix)) dimy<-exp(seq(min(log(y)),max(log(y)),length.out=kugiriy)) mat1<-matrix(nrow=(kugirix-1),n…
bibtexを使った参考文献の作り方. bibtexを利用すると参考文献リストのスタイルを自動的に生成してくれて, 論文ごとに作り直す必要がない. 全面的に参考にさせていたいだいたページ http://did2.blog64.fc2.com/blog-entry-138.html コンパイルについては…
WinXPで,cygwin が不調の場合,具体的には, ls をしても なにも表示されなくなった場合,cygwinをインストールしたユーザーになる (私の場合は, Administrator,だった) cygwinのインストーラからbaseを再インストール.ここで,インストールしたのと別の…
英文法チェッカ Queequeg のインストール TEXの文章の簡単な英文法がチェックできる.(1)http://queequeg.sourceforge.net/#download を確認. (2)pythonの環境整備 (3)ソースをgetとし展開. 例えば, wget http://sourceforge.net/project/showfiles.php?gr…
スペルミス,冠詞ミス,式ミス,図ミス,キャプションミス. この辺がチェックポイント.
Backbone of complex networks of corporations: The flow of control J.B. Glattfelder, S. Battiston http://arxiv.org/abs/0902.0878レフリーによめといわれた論文. 概要: 基本的には,様々な国の企業の株主の所有ネットワークの違いの解析. そこで使…
例. 枠消しはF=0. Window sales_indegree() : Layout PauseUpdate; Silent 1 // building window... Layout/C=1/W=(35.25,60.5,536.25,468.5) sales_indegree_2d_c(71.25,69.75,522.75,411.75)/O=1 Append Graph0(296.25,204.75,486.75,341.25)/O=1/F=0/T En…
http://tuvalu.santafe.edu/~aaronc/powerlaws/ からダウンロードcygwinのインストーラのdevの cmakeとliboost をインストールcmake .
タイトル: Geography versus topology in the European Ownership Network 著者: Stefania Vitali1,2 and Stefano Battiston1,3 所属: 1 Chair of Systems Design, ETH Zurich, Kreuzplatz 5, 8032 Zurich, Switzerland 2 Department of Economics, Univers…