forked from szcf-weiya/ESL-CN
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update and replace travis with github-action
- Loading branch information
1 parent
8d9561c
commit 01aac95
Showing
6 changed files
with
66 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: gh-pages | ||
on: push | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-18.04 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Setup Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.6' | ||
|
||
- name: Install dependencies | ||
run: | | ||
pip install mkdocs==0.17.2 | ||
pip install mkdocs-material==2.5.2 | ||
pip install python-markdown-math | ||
pip install pymdown-extensions | ||
pip install git+https://github.com/szcf-weiya/mkdocs-git-revision-date-plugin.git | ||
- name: Build | ||
run: | | ||
python gentag.py | ||
mkdocs build | ||
mv rmds/_site/ site/rmds | ||
- name: Deploy | ||
uses: peaceiris/actions-gh-pages@v3 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: ./site |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
library(mvtnorm) | ||
library(expm) | ||
set.seed(123) | ||
K = 3; p = 5; N = 100; | ||
X = matrix(runif(p*N), nrow = N) | ||
X = scale(X, scale = F) | ||
B = matrix(runif(p*K), nrow = p) | ||
Y = X %*% B + rmvnorm(N, sigma = diag(K)) | ||
Y = scale(Y, scale = F) | ||
Bhat = solve(t(X) %*% X) %*% t(X) %*% Y | ||
Yhat = X %*% Bhat | ||
SigmaYY1 = t(Y) %*% Y / N | ||
SigmaYY2 = t(Y - Yhat) %*% (Y - Yhat) / (N - p*K) | ||
SigmaXX = t(X) %*% X / N | ||
SigmaYX = t(Y) %*% X / N | ||
Mright = SigmaYX %*% solve(sqrtm(SigmaXX)) | ||
M1 = solve(sqrtm(SigmaYY1)) %*% Mright | ||
M2 = solve(sqrtm(SigmaYY2)) %*% Mright | ||
svd(M1)$u | ||
svd(M2)$u |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters