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
library(beepr) | |
countdown <- function(length, rep, main) { | |
sapply(length : 1, function(t) { | |
plot(0, 0, cex = NA, | |
main =paste0(main, ": REP ", rep), | |
bty = "n", xaxt = "n", yaxt = "n", | |
cex.main = 6) | |
text(0, 0, t, cex = 10) | |
Sys.sleep(1) |
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
% Introduction to Machine Learning | |
% Day 3 | |
% Set style/preamble.Rnw as parent. | |
<<set-parent, include = FALSE>>= | |
knitr::set_parent("../style/preamble.Rnw") | |
@ | |
% Load all R packages and set up knitr | |
<<setup, child="../style/setup.Rnw", include = FALSE>>= |
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
options(error=traceback, deparse.max.lines = 10) | |
library("gamboostLSS") | |
library("gamlss") | |
# y ~ Binomial(p = invlogit(x + z), n= 60) | |
n <- 100 | |
x <- rnorm(n) | |
z <- rnorm(n) | |
data <- data.frame(y = rbinom(n, p = plogis(x + z), size = 60), x = x, z= z) |
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
--- | |
title: A simple array class with specialized linear algebra routines | |
author: Fabian Scheipl | |
license: GPL (>= 2) | |
tags: modeling, armadillo | |
summary: Define a simple array class for implementing Currie/Durban/Eilers "generalized linear array models". | |
--- | |
[Currie, Durban and Eilers](http://www.macs.hw.ac.uk/~iain/research/RSSB.2006.pdf) write: |
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
--- | |
title: Dynamic dispatch for sparse matrices | |
author: Fabian Scheipl | |
license: GPL (>= 2) | |
tags: sparse | |
summary: Define a matrix multiplication function for "sparse times dense" and "dense times dense". | |
--- | |
We want to do matrix multiplication for 3 cases: |