More Related Content Similar to 第2回メドレー読書会 (16) 第2回メドレー読書会3. 経歴
• 2014/04 - 2015/06
• グリー株式会社
• 2015/07 -
• 株式会社メドレー
• 2014/04 -
• ターゲットスポーツ(※ダーツメーカー)
3
http://2013.rl-competition.org/results
保有資格
ダーツプロライセンス
ジグソーパズル検定1級
大学院時代の研究
人工知能(進化計算)
ICML RL Competition 1位
19. kmeans(x, variable.names, target.name, k.list, n)
• x: データフレーム
• variable.names: クラスタリング時の説明変数名
• target.name: クラスタリング間比較の変数名
• k.list: クラスタ数候補
• n: 試行回数
➡ xのデータをk個のグループに分割する
関数の説明
19
出典:http://d.hatena.ne.jp/yokkuns/20140316/1394975943
20. melt(data, id.vars, measure.vars, variable.name,
value.name, na.rm, factorsAsStrings, …)
• data: データフレーム
• id.vars: そのまま列として維持したい列名
• …
➡ data.frame の複数列の値を、カテゴリ変数1列
と値1列の組に変換する。
関数の説明
20
出典:http://meme.biology.tohoku.ac.jp/students/iwasaki/rstats/reshape2.html
21. procomp(x, center = TRUE, scale = FALSE)
• x: データフレーム
• center: 正規化するための平均扱い
• scale: 正規化するための分散の扱いを指定
➡ 主成分分析を行う
➡ 固有値ベクトルの数、主成分が求まる
関数の説明
21
出典:itbc-world.com/home/rfm/rの統計関数/主成分分析/
38. 38
> summary(lm_result)
Call
lm(formula = freeny.y time(freeny.y))
Residuals:
Min 1Q Median 3Q Max
-0.051305 -0.014040 0.006104 0.014610 0.034788
Coefficients:
Estimate Std. Error t value Pr(>¦t¦)
(Intercept) -2.080e+02 2.298e+00 -90.53 <2e-16 ***
time(freeny.y) 1.105e-01 1.168e-03 94.57 <2e-16 ***
---
Signif. codes: 0 *** 0.001 ** 0.01 * 0.05 . 0.1 1
Residual standard error: 0.02053 on 37 degrees of freedom
Multiple R-squared: 0.9959, Adjusted R-squared: 0.9958
F-statistic: 8944 on 1 and 37 DF, p-value: < 2.2e-16
実行結果
39. 39
> summary(lm_result)
Call
lm(formula = freeny.y time(freeny.y))
Residuals:
Min 1Q Median 3Q Max
-0.051305 -0.014040 0.006104 0.014610 0.034788
Coefficients:
Estimate Std. Error t value Pr(>¦t¦)
(Intercept) -2.080e+02 2.298e+00 -90.53 <2e-16 ***
time(freeny.y) 1.105e-01 1.168e-03 94.57 <2e-16 ***
---
Signif. codes: 0 *** 0.001 ** 0.01 * 0.05 . 0.1 1
Residual standard error: 0.02053 on 37 degrees of freedom
Multiple R-squared: 0.9959, Adjusted R-squared: 0.9958
F-statistic: 8944 on 1 and 37 DF, p-value: < 2.2e-16
lm()関数を読み解く
y = ax + bの
bにあたる
y = ax + bの
aにあたる
40. 40
> summary(lm_result)
Call
lm(formula = freeny.y time(freeny.y))
Residuals:
Min 1Q Median 3Q Max
-0.051305 -0.014040 0.006104 0.014610 0.034788
Coefficients:
Estimate Std. Error t value Pr(>¦t¦)
(Intercept) -2.080e+02 2.298e+00 -90.53 <2e-16 ***
time(freeny.y) 1.105e-01 1.168e-03 94.57 <2e-16 ***
---
Signif. codes: 0 *** 0.001 ** 0.01 * 0.05 . 0.1 1
Residual standard error: 0.02053 on 37 degrees of freedom
Multiple R-squared: 0.9959, Adjusted R-squared: 0.9958
F-statistic: 8944 on 1 and 37 DF, p-value: < 2.2e-16
lm()関数を読み解く
決定係数という、
1に近いほど
2つの変数間に関連性が強い
44. 44
> print(rf_result)
Call:
randomForest(formula = freeny.y ., data = df, mtry =
1, ntree = 500, type = "regression")
Type of random forest: regression
Number of trees: 500
No. of variables tried at each split: 1
Mean of squared residuals: 0.0006837185
% Var explained: 99.3
実行結果
45. 45
> print(rf_result)
Call:
randomForest(formula = freeny.y ., data = df, mtry =
1, ntree = 500, type = "regression")
Type of random forest: regression
Number of trees: 500
No. of variables tried at each split: 1
Mean of squared residuals: 0.0006837185
% Var explained: 99.3
randomForestを読み解く
%Var exlpainedにより評価できる
100に近いほど、対象のことを説明できているモデル