gravatar

s22150110

s22150110

Recently Published

dplyr処理演習
時系列分析(ARIMA)
予測精度評価指標
アイリスの種類
setosa versicolor virginica 1 0 0.9074074 0.09259259 because Petal.Length >= 2.5 & Petal.Width < 1.8 versicolor 90%以上
自転車
気温が12度以上 湿度が85度以下
決定木
Plot
d <- read.csv('https://stats.dip.jp/01_ds/data/Mall_Customers.csv') colnames(d) <- c('id', 'gender', 'age', 'income', 'score') library(DT) datatable(d, options = list(pageLength = 5)) NGROUPS <- 5 matplot(x = d$income, y = d$score, pch = 16, type = 'p') grid() # カラーパレット COL <- rainbow(NGROUPS) km <- kmeans(d[, c('income','score')],centers = NGROUPS, nstart = 25) c <- vector('list', NGROUPS) matplot(x = d$income, y = d$score, pch = 16, type = 'p', col = COL[1:NGROUPS] ) grid() for (i in 1:NGROUPS) { c[[i]] <- d[km$cluster == i, ] matpoints(x = c[[i]]$income, y = c[[i]]$score, pch = 16, col = COL[i]) } legend('topright', pch = 16, bg='white', col = COL[1:NGROUPS], legend = paste0('Group',1:NGROUPS))
機械学習
VIF課題
library(DT) d <- read.csv('https://stats.dip.jp/01_ds/data/car_mileage.csv') datatable(d) library(car) lm1 <- lm(燃費~気筒数+馬力+車体重量+加速性能, data=d) summary(lm1) (v <- vif(lm1)) barplot(v, main = 'VIF')
説明変数
重回帰
HTML