Skip to content

Instantly share code, notes, and snippets.

View RottenFruits's full-sized avatar

RottenFruits(S.O.) RottenFruits

View GitHub Profile
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
#前準備------------------------------------------------------------------------
#ライブラリ読み込み
library(prophet)
library(tidyverse)
#データ読み込み
#ブログのユーザー数のアクセスログ
df <-read.csv("s_ogawa_blog_access.csv", skip = 13, stringsAsFactors = FALSE)
#変数名・型調整
#------------------------------------------------------
# bayesian linear model
#------------------------------------------------------
blm <- function(formula, data, lambda){
#model
mm <- model.matrix(formula, data) #design matrix
y <- model.response(model.frame(formula, data)) #response variable
#hyper parameter
Lambda <- diag(ncol(mm))
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
FROM centos:6
#print doing command
RUN set -x
#install utility command
RUN yum -y install epel-release && \
yum install -y wget && \
yum install -y sudo
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
#ライブラリ
library(boot)
library(ggplot2)
library(tidyverse)
library(bayesboot)
library(simpleboot)
#関数
#正解率計算
calc_acc <- function(x, true){