楼主: oliyiyi
91805 2410

【latex版】水贴   [推广有奖]

1571
oliyiyi 发表于 2015-12-16 19:47:10
Linear Least Squares
Consider the linear regression model, [ y_i=f_i(mathbf{x}|boldsymbol{beta})+varepsilon_i,quadmathbf{x}_i=left[ begin{array}{cccc} 1&x_{11}&cdots&x_{1p} end{array}right],quadboldsymbol{beta}=left[begin{array}{c}beta_0\beta_1\vdots\beta_pend{array}right], ] where $y_i$ is the response or the dependent variable at the $i$th case, $i=1,cdots, N$. The $f_i(mathbf{x}|boldsymbol{beta})$ is the deterministic part of the model that depends on both the parameters $boldsymbol{beta}inmathbb{R}^{p+1}$ and the predictor variable $mathbf{x}_i$, which in matrix form, say $mathbf{X}$, is represented as follows [ mathbf{X}=left[ begin{array}{cccccc} 1&x_{11}&cdots&x_{1p}\ 1&x_{21}&cdots&x_{2p}\ vdots&vdots&ddots&vdots\ 1&x_{N1}&cdots&x_{Np}\ end{array} right]. ] $varepsilon_i$ is the error term at the $i$th case which we assumed to be Gaussian distributed with mean 0 and variance $sigma^2$. So that [ mathbb{E}y_i=f_i(mathbf{x}|boldsymbol{beta}), ] i.e. $f_i(mathbf{x}|boldsymbol{beta})$ is the expectation function. The uncertainty around the response variable is also modelled by Gaussian distribution. Specifically, if $Y=f(mathbf{x}|boldsymbol{beta})+varepsilon$ and $yin Y$ such that $y>0$, then begin{align*} mathbb{P}[Yleq y]&=mathbb{P}[f(x|beta)+varepsilonleq y]\ &=mathbb{P}[varepsilonleq y-f(mathbf{x}|boldsymbol{beta})]=mathbb{P}left[frac{varepsilon}{sigma}leq frac{y-f(mathbf{x}|boldsymbol{beta})}{sigma}right]\ &=Phileft[frac{y-f(mathbf{x}|boldsymbol{beta})}{sigma}right], end{align*} where $Phi$ denotes the Gaussian distribution with density denoted by $phi$ below. Hence $Ysimmathcal{N}(f(mathbf{x}|boldsymbol{beta}),sigma^2)$. That is, begin{align*} frac{operatorname{d}}{operatorname{d}y}Phileft[frac{y-f(mathbf{x}|boldsymbol{beta})}{sigma}right]&=phileft[frac{y-f(mathbf{x}|boldsymbol{beta})}{sigma}right]frac{1}{sigma}=mathbb{P}[y|f(mathbf{x}|boldsymbol{beta}),sigma^2]\ &=frac{1}{sqrt{2pi}sigma}expleft{-frac{1}{2}left[frac{y-f(mathbf{x}|boldsymbol{beta})}{sigma}right]^2right}. end{align*} If the data are independent and identically distributed, then the log-likelihood function of $y$ is, begin{align*} mathcal{L}[boldsymbol{beta}|mathbf{y},mathbf{X},sigma]&=mathbb{P}[mathbf{y}|mathbf{X},boldsymbol{beta},sigma]=prod_{i=1}^Nfrac{1}{sqrt{2pi}sigma}expleft{-frac{1}{2}left[frac{y_i-f_i(mathbf{x}|boldsymbol{beta})}{sigma}right]^2right}\ &=frac{1}{(2pi)^{frac{n}{2}}sigma^n}expleft{-frac{1}{2}sum_{i=1}^Nleft[frac{y_i-f_i(mathbf{x}|boldsymbol{beta})}{sigma}right]^2right}\ logmathcal{L}[boldsymbol{beta}|mathbf{y},mathbf{X},sigma]&=-frac{n}{2}log2pi-nlogsigma-frac{1}{2sigma^2}sum_{i=1}^Nleft[y_i-f_i(mathbf{x}|boldsymbol{beta})right]^2. end{align*} And because the likelihood function tells us about the plausibility of the parameter $boldsymbol{beta}$ in explaining the sample data. We therefore want to find the best estimate of $boldsymbol{beta}$ that likely generated the sample. Thus our goal is to maximize the likelihood function which is equivalent to maximizing the log-likelihood with respect to $boldsymbol{beta}$. And that’s simply done by taking the partial derivative with respect to the parameter $boldsymbol{beta}$. Therefore, the first two terms in the right hand side of the equation above can be disregarded since it does not depend on $boldsymbol{beta}$. Also, the location of the maximum log-likelihood with respect to $boldsymbol{beta}$ is not affected by arbitrary positive scalar multiplication, so the factor $frac{1}{2sigma^2}$ can be omitted. And we are left with the following equation, begin{equation}label{eq:1} -sum_{i=1}^Nleft[y_i-f_i(mathbf{x}|boldsymbol{beta})right]^2. end{equation} One last thing is that, instead of maximizing the log-likelihood function we can do minimization on the negative log-likelihood. Hence we are interested on minimizing the negative of Equation (ref{eq:1}) which is begin{equation}label{eq:2} sum_{i=1}^Nleft[y_i-f_i(mathbf{x}|boldsymbol{beta})right]^2, end{equation} popularly known as the residual sum of squares (RSS). So RSS is a consequence of maximum log-likelihood under the Gaussian assumption of the uncertainty around the response variable $y$. For models with two parameters, say $beta_0$ and $beta_1$ the RSS can be visualized like the one in my previous article, that is

1572
oliyiyi 发表于 2015-12-16 19:48:52
The code behind the app is written in R, and leverages the NCBI Eutils API via the rentrez package interface.
The methodology is fairly simple:
Build the search query in Pubmed syntax based on user input parameters.
Extract total number of articles from results.
Output a visualization of the total counts for both selected institutions.
Extract unique article identifiers from results.
Output the number of article identifiers that match (i.e. “collaborations”) between the two selected institutions.

1573
oliyiyi 发表于 2015-12-16 19:49:26
Introduction
The aim of this project is to help students and colleagues who for some reason want to blog on R-related topics. If you have a particular Git Hub project that deals with R and you want to blog about your work as it develops, or if you simply want to blog about R in general, then you can use the material from my knitr-hyde repository to set up, with minimal fuss, a Jekyll-powered site with good styling borrowed from Mark Otto’s Hyde project. With help from Yihui Xie’s servr package and knitr-jekyll code you ‘ll be able to write your posts in R Markdown, build and preview the site locally, and push to your Git Hub Pages site when you are ready.

I have tried to minimize what you need to know about Jekyll (and web development generally) in order to get going. You can learn more about Jekyll when it suits you and eventually make thorough-going alterations to my blog-template, but for now I want you to be able to concentrate on getting your content out there to a waiting public.

1574
oliyiyi 发表于 2015-12-16 19:50:00
Preliminaries
Platform
Jekyll is not officially supported on Windows, so you had best try this with Mac OSX, or with a Linux distribution. (Either way works well, in my experience.) But if you are determined to give it a try on Windows, consult the documentation here.

Get My Files
Consult the Github Pages guide. Decide whether you want a general user site or a site associated with a partcular project repository.

Getting Files for a Project Site

If you don’t already have an existing project but want a project-associated site, then fork my knitr-hyde repository from Git Hub, rename it as you wish and then clone it on your own machine. You can do your project work on the master branch and switch to the gh-pages branch for blogging.

If you already have a project repository on Git Hub and want a site associated with it, then simply create a gh-pages branch, delete all of the files, download a zip file of my gh-pages branch and extract it into your repo while you have your gh-pages branch checked out.

Getting Files for a User Site

Having created your user respository (yourgithubusername.github.io as per the GitHub Pages guide), clone your user repo onto your own machine. Stay on your master branch: you don’t create a gh-pages branch for a user site. Download a zip file of my gh-pages branch and extract it into your repo.

1575
oliyiyi 发表于 2015-12-16 19:51:53
◎影片名称:《绝命海拔》
◎别  名:圣母峰(台)/珠峰浩劫(港)/珠穆朗玛/远征珠峰/珠穆朗玛峰
◎片  名:Everest
◎导  演:巴塔萨·科马库
◎主  演:杰克·吉伦哈尔,凯拉·奈特莉,罗宾·怀特,杰森·克拉科,乔什·布洛林,萨姆·沃辛顿,克莱夫·斯坦登,艾米丽·沃森,约翰·浩克斯,迈克尔·凯利,伊丽莎白·德比茨基,米娅·高斯,马丁·亨德森,凡妮莎·柯比,汤姆·古德曼-希尔
◎豆瓣评分:7.5
◎豆  瓣:http://movie.**.com/subject/22265299
◎IMDb  :http://www.imdb.com/title/tt2719848
◎BT/迅雷/百度云:http://www.92np.com/v/18979.html
◎语  言:英语
◎地  区:美国
◎年  代:2015
◎时  长:121分钟
◎上映时间:2015年09月02日

1576
oliyiyi 发表于 2015-12-16 19:53:27
Configuring my Files for Your Use
In the root directory, locate the _config.yaml file. Make some choices:

Change the title and description.
Change the value of baseurl as per the commented directions. Make sure there is a trailing ‘/’ at the end of baseurl. For a site associated with a repository named myProject the base url will be set to “/myProject/”. For a user site, it’s just “/”. Either way. it begins and ends with a “/”!
Change url. Since you are pushing to Git Hub, it can be https://yourgithubusername.github.io.
Decide if you would like people to be able to comment on your posts. If you want this, leave disqus at true and register at the Disqus.com. You will have the opportunity to add Disqus to your site. Do this. As part of this process you will be asked to create a shortname for your site. Set shortname accordingly. If you don’t want commenting, simply set disqus to false.
Change twitter and facebook to false if you don’t want the Tweet and Facebook buttons for your posts.

1577
oliyiyi 发表于 2015-12-16 19:54:09
Get the Packages
Ruby and Gems
You will need to install Ruby, and then install the Jekyll gem. It’s best if you install the same version of Jekyll that Git Hub will use to build your page. You can find the current version here. At the time of writing this is version 2.4.0, so once you have installed Ruby, open a terminal and run the command:

sudo gem install jekyll -v 2.4.0

You’ll also want a gem that keeps all dependencies of Jekyll at the same version level as used by Git Hub:

sudo gem install gh-pages

In order to stay current with Git Hub, update this gem frequently:

sudo gem update gh-pages

The servr Package
You’ll need Yihui Xie’s servr package. In R, run:

install.packages("servr")

1578
ambut 发表于 2015-12-16 20:22:52

回帖奖励 +5

水贴的魅力无人能挡

1579
oliyiyi 发表于 2015-12-16 20:27:08
Boolean models are a drastic simplification of biological reality, but they have produced valuable results in the past and are especially suited for developmental gene regulatory networks (e.g., Macía et al., 2009).

1580
mysophiahe 发表于 2015-12-17 03:54:01
提示: 作者被禁止或删除 内容自动屏蔽

您需要登录后才可以回帖 登录 | 我要注册

本版微信群
加好友,备注jltj
拉您入交流群
GMT+8, 2026-3-1 09:58