I hereby claim:
- I am tomaskrehlik on github.
- I am tkrhlk (https://keybase.io/tkrhlk) on keybase.
- I have a public key ASD1cPESRfDE76MuVyWvWzcERmG9gpfjlf6gVQGnl-W-Xgo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
# | |
# linter.py | |
# Linter for SublimeLinter3, a code checking framework for Sublime Text 3 | |
# | |
# Written by Tomas Krehlik | |
# Copyright (c) 2014 Tomas Krehlik | |
# | |
# License: MIT | |
# |
# Critical values for the Augmented Dickey-Fuller test. | |
# http://home.cerge-ei.cz/petrz/GDN/crit_values_ADF_KPSS_Perron.pdf | |
# The p-vals are 0.01, 0.025, 0.05, 0.1 | |
# Number of observations is in the Ts | |
# Small test only for the df test | |
# Should print something close to critical value | |
# using Distributions | |
# mean([sort([df(cumsum(rand(Normal(), 1000)), "None")[1] for i=1:500])[25] for j=1:200]) |
grid <- expand.grid(.size=5:10) | |
modelFunc <- function(data, parameter, levels, last, ...) | |
{ | |
library(RSNNS) | |
list(fit = jordan(data[,setdiff(names(data),".outcome")], data$.outcome, size = parameter$.size, initFuncParams = c(1,-1, 0.3, 1, 0.5))) | |
} | |
predFunc <- function(object, newdata) | |
{ | |
library(RSNNS) |
temp <- lapply(c("data.table","reshape","ggplot2","wavelets", "Rcpp", "compiler", "base", "stringr", "RSNNS", "forecast", "rugarch", "parallel"),function(x) toBibtex(citation(x))) | |
cat(str_join(unlist(temp), "\n"), file="~/.../R.bib") |
# Lag-function lags the given variable by the date_variable | |
lag_variable <- function(data, variable, lags, date_variable = c("Date")) { | |
if (lags == 0) { | |
return(data) | |
} | |
if (lags>0) { | |
name <- "lag" | |
} else { | |
name <- "forward" |