- 博客(9)
- 收藏
- 关注
原创 RMysql
安装时注意mysql为32位,rjava也要32位。#连接到服务器ucscDb<-dbConnect(MySQL(),user="genome",host="genome-mysql.cse.ucsc.edu")#获得数据库result<-dbGetQuery(ucscDb,"show databases;")#连接到指定数据库hg19<-dbConnect(MySQL(),user="
2014-04-22 20:14:36 697
原创 Rmysql
安装时注意mysql为32位,#连接到服务器ucscDb<-dbConnect(MySQL(),user="genome",host="genome-mysql.cse.ucsc.edu")#获得数据库result<-dbGetQuery(ucscDb,"show databases;")#连接到指定数据库hg19<-dbConnect(MySQL(),user="genome",db=
2014-04-22 20:14:09 648
翻译 hdf5
source("http://bioconductor.org/biocLite.R")biocLite("rhdf5")library(rhdf5)create = h5createFile("example.h5")getwd()create=h5createGroup("example.h5","foo")create=h5createGroup("example.h5","ba
2014-04-22 20:11:22 1187
原创 week 2
GIT下载git:http://git-scm.com/downloads安装git:默认下一步使用:1.设置用户名,邮箱:git config --global user.name ""git config --global user.email ""检查:git config --list2.退出exit新建本地gitmkdir
2014-04-17 20:13:38 650
原创 week1
目录操作getwd();setwd('../')if(!file.exists(directoryname)){ dir.create(directoryname)}下载
2014-04-13 10:10:48 840
原创 杂
随机数生成%产生1到m之间的随机数生成器rand_indices = randperm(m);%生成100个,返回一个向量sel = X(rand_indices(1:100),:);
2014-04-07 16:15:56 673
原创 linear regression几个代码
J = 0;grad = zeros(size(theta));%对于y=1,cost为 -log[h(x)] % y=0,cost为 -log[1-h(x)]%J可以表示为 - log[| if(y==0,1,0) -h(x) |] if(判断,true的输出值,false的输出值)z = X*theta;neg=find(y==0);tmp
2014-03-30 11:10:04 964
原创 牛顿法求解柯西分布参数的最大似然估计(P055)
1.牛顿法求方程根假设f(x)在x=a处取到0,即f(a)=0。已知c在a的附近,有a=c+Δx。根据泰勒公式展开,省略高次项,得2.简单代码实现newt_cauchy.R cauchy_mle=function(x,theta){ sum = 0; for(i in 1:length(x)){ sum = sum+(x[i]-theta)
2014-03-27 22:06:33 9711 2
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人