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(MASS) | |
library(mvtnorm) | |
#データの読み込み | |
sb=read.csv("sbnote.csv") | |
#学習用データの区分 | |
sb_train=rbind(sb[1:50,],sb[101:150,]) | |
sb_test=rbind(sb[51:100,],sb[151:200,]) |
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
#MASS読み込み | |
library(MASS) | |
library(mvtnorm) | |
sb=read.csv("sbnote.csv") | |
#学習用データの区分 | |
sb_train=rbind(sb[1:50,],sb[101:150,]) | |
sb_test=rbind(sb[51:100,],sb[151:200,]) | |
test_x=sb_test[,-7] |
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
#データの読み込み | |
exam=read.csv("exam_data.csv",row.names=1) | |
rate=exam[,11:15] | |
#定常過程かの確認 | |
library(tseries) | |
adf.test(rate) | |
#時系列プロット | |
ts.plot(rate,gpars=list(xlab="年", ylab="合格率",lty=c(1:5),col=c(1:5))) |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
###データの読み込み | |
sze_row=read.csv("2018sze.csv",header = T) | |
sze=sze_row[,-11] | |
#1992年~2017年までを学習用、2018年分をテスト用とする | |
train=c(1:1302) | |
test=c(1303:1351) | |
#2017年でテストする場合 | |
#train=c(1:1254) |
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
set.seed(3383) | |
mu1=c(100, 100) | |
sigma1=matrix(c(10, 5, 5, 10), 2, 2) | |
data1=mvrnorm(1000, mu1, sigma1) | |
plot(data1) | |
mu2=c(150, 150) | |
sigma2=matrix(c(5, 0, 0, 5), 2, 2) | |
data2=mvrnorm(200, mu2, sigma2) | |
plot(data2) |
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(MASS) | |
library(kernlab) | |
#データの読み込み | |
sb=read.csv("sbnote.csv") | |
#学習用データの区分 | |
sb.g=sb[1:100,] | |
sb.g=data.frame(sb.g) | |
sb.t=sb.g[,-7] |
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
ac_exam2=function(n,p1_low,p1_high,p2_low,p2_high,study1,study2){ | |
#n:持っている科目数 | |
#p1_low:1次試験科目の合格率下限 | |
#p1_high:1次試験科目の合格率上限 | |
#p2_low:2次試験科目の合格率下限 | |
#p2_high: 2次試験科目の合格率上限 | |
#study1:勉強により科目1の合格率を引き上げることができる | |
#study2:勉強により科目2の合格率を引き上げることができる | |
#year:受験年数 |
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
ac_exam=function(n,p1_low,p1_high,p2_low,p2_high,study){ | |
#n:持っている科目数 | |
#p1_low:1次試験科目の合格率下限 | |
#p1_high:1次試験科目の合格率上限 | |
#p2_low:2次試験科目の合格率下限 | |
#p2_high: 2次試験科目の合格率上限 | |
#study:勉強により1科目だけ合格率を引き上げることができる | |
#year:受験年数 | |
#year1: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
###データの読み込み | |
sze_row=read.csv("2017sze.csv",header = T) | |
sze=sze_row[,-9] | |
#1992年~2016年までを学習用、2017年分をテスト用とする | |
train=c(1:1254) | |
test=c(1255:1302) | |
###seedはサザエさん(3383)とする | |
set.seed(3383) |
NewerOlder