SlideShare a Scribd company logo
1 of 19
RとPythonを比較する
- 機械学習の数理100問シリーズを
2冊ずつ執筆してみて –
2020年 12月19日@ R集会
鈴木讓(大阪大学)
useR 2015 @デンマーク
R集会に参加するきっかけ: 藤野、服部両氏と一緒だった
データサイエンス 分野 機械学習
35-50歳 中心年齢層 25-40歳
大学 大学/企業 企業
データサイエンス 業務 機械学習
深層学習
豊富 (S言語時代も) 実績 急激にユーザが増加
すぐに使える プログラム言語 オブジェクト指向
Rの問題を改善している
機械学習の数理100問シリーズ (共立出版, Springer)
機械学習の数理100問シリーズ: タイトル 発行時期 R Python
統計的機械学習の数理100問 2020年3月4月 ○ ○
スパース推定100問 2020年10月12月 ○ ○
グラフィカルモデルと因果推論100問 2021年 ○ ○
機械学習のためのカーネル100問 2021年 ○ ○
渡辺澄夫ベイズ理論100問 未定 ○ ○
統計検定1級100問 未定 ○
○○ with Math and R/Python
100 Exercises for Building Logic
(Springer)
スパース推定
2021年1月25日発売2020年10月25日発売
移植に3ヶ月を要した
RとPythonの違い
(今日のメインの話)
Bitbucketにソースプログラム
https://bitbucket.org/prof-joe/workspace/projects/BSC
Prof-joe, bitbucket で検索
線形回帰のLassoとRidge
正則化
最小となる
βを求める L2正則化
(Ridge)
L1正則化
(Lasso)
R言語のNipponMap vs Pythonのjapanmap
三重大 谷村先生
Fused Lasso
1次元
グラフ
データの平滑化
glmnet J. Friedman, T. Hastie, R. Tibshirani
Balasubramanian Narasimhan, Kenneth Tay, Noah
Simon, Junyang Qian
R言語 (CRAN) 著者が開発、どの環境でもok
Python
(Stanford)
Linuxのみ
Google Colabやwin (Jupyter Note)で動作しない
scikit-learn 専門家ではなくボランティアが開発
本家のglmnetと違う動作, オプションが異なる
DSや機械学習の研究者だと、論文では怖くて使えない
glasso J. Friedman, T. Hastie, R. Tibshirani
R言語 (CRAN) 著者が開発、どの環境でもok
Python
(Stanford)
Linuxのみ
Google Colabやwin (Jupyter Note)で動作しない
scikit-learn 専門家ではなくボランティアが開発
本家のglassoと違う動作
グラフィカルモデルの同定
むすびにかえて
• 専門的な処理は、専門家が開発したパッケージが安心
• Stanford統計学科をはじめ、データサイエンスではRが強い
• 業務などでは、R/Pythonの両方できるようにするのが普通
予告: 機械学習の数理100問シリーズ
機械学習のためのカーネル
関数解析の基礎がなく、めげる人が多い

More Related Content

What's hot

グラフィカルモデル入門
グラフィカルモデル入門グラフィカルモデル入門
グラフィカルモデル入門Kawamoto_Kazuhiko
 
研究室における研究・実装ノウハウの共有
研究室における研究・実装ノウハウの共有研究室における研究・実装ノウハウの共有
研究室における研究・実装ノウハウの共有Naoaki Okazaki
 
[DL輪読会]Deep Learning 第5章 機械学習の基礎
[DL輪読会]Deep Learning 第5章 機械学習の基礎[DL輪読会]Deep Learning 第5章 機械学習の基礎
[DL輪読会]Deep Learning 第5章 機械学習の基礎Deep Learning JP
 
Prml4.4 ラプラス近似~ベイズロジスティック回帰
Prml4.4 ラプラス近似~ベイズロジスティック回帰Prml4.4 ラプラス近似~ベイズロジスティック回帰
Prml4.4 ラプラス近似~ベイズロジスティック回帰Yuki Matsubara
 
2 4.devianceと尤度比検定
2 4.devianceと尤度比検定2 4.devianceと尤度比検定
2 4.devianceと尤度比検定logics-of-blue
 
関数データ解析の概要とその方法
関数データ解析の概要とその方法関数データ解析の概要とその方法
関数データ解析の概要とその方法Hidetoshi Matsui
 
Rによる高速処理 まだfor使ってるの?
Rによる高速処理 まだfor使ってるの?Rによる高速処理 まだfor使ってるの?
Rによる高速処理 まだfor使ってるの?jundoll
 
『バックドア基準の入門』@統数研研究集会
『バックドア基準の入門』@統数研研究集会『バックドア基準の入門』@統数研研究集会
『バックドア基準の入門』@統数研研究集会takehikoihayashi
 
状態空間モデルの考え方・使い方 - TokyoR #38
状態空間モデルの考え方・使い方 - TokyoR #38状態空間モデルの考え方・使い方 - TokyoR #38
状態空間モデルの考え方・使い方 - TokyoR #38horihorio
 
最適輸送入門
最適輸送入門最適輸送入門
最適輸送入門joisino
 
社会心理学者のための時系列分析入門_小森
社会心理学者のための時系列分析入門_小森社会心理学者のための時系列分析入門_小森
社会心理学者のための時系列分析入門_小森Masashi Komori
 
基礎からのベイズ統計学 輪読会資料 第4章 メトロポリス・ヘイスティングス法
基礎からのベイズ統計学 輪読会資料 第4章 メトロポリス・ヘイスティングス法基礎からのベイズ統計学 輪読会資料 第4章 メトロポリス・ヘイスティングス法
基礎からのベイズ統計学 輪読会資料 第4章 メトロポリス・ヘイスティングス法Ken'ichi Matsui
 
ファクター投資と機械学習
ファクター投資と機械学習ファクター投資と機械学習
ファクター投資と機械学習Kei Nakagawa
 
[DL輪読会]Grokking: Generalization Beyond Overfitting on Small Algorithmic Datasets
[DL輪読会]Grokking: Generalization Beyond Overfitting on Small Algorithmic Datasets[DL輪読会]Grokking: Generalization Beyond Overfitting on Small Algorithmic Datasets
[DL輪読会]Grokking: Generalization Beyond Overfitting on Small Algorithmic DatasetsDeep Learning JP
 
機械学習の理論と実践
機械学習の理論と実践機械学習の理論と実践
機械学習の理論と実践Preferred Networks
 
変分推論法(変分ベイズ法)(PRML第10章)
変分推論法(変分ベイズ法)(PRML第10章)変分推論法(変分ベイズ法)(PRML第10章)
変分推論法(変分ベイズ法)(PRML第10章)Takao Yamanaka
 
スパース推定法による統計モデリング(入門)
スパース推定法による統計モデリング(入門)スパース推定法による統計モデリング(入門)
スパース推定法による統計モデリング(入門)Hidetoshi Matsui
 

What's hot (20)

グラフィカルモデル入門
グラフィカルモデル入門グラフィカルモデル入門
グラフィカルモデル入門
 
研究室における研究・実装ノウハウの共有
研究室における研究・実装ノウハウの共有研究室における研究・実装ノウハウの共有
研究室における研究・実装ノウハウの共有
 
[DL輪読会]Deep Learning 第5章 機械学習の基礎
[DL輪読会]Deep Learning 第5章 機械学習の基礎[DL輪読会]Deep Learning 第5章 機械学習の基礎
[DL輪読会]Deep Learning 第5章 機械学習の基礎
 
Prml4.4 ラプラス近似~ベイズロジスティック回帰
Prml4.4 ラプラス近似~ベイズロジスティック回帰Prml4.4 ラプラス近似~ベイズロジスティック回帰
Prml4.4 ラプラス近似~ベイズロジスティック回帰
 
2 4.devianceと尤度比検定
2 4.devianceと尤度比検定2 4.devianceと尤度比検定
2 4.devianceと尤度比検定
 
関数データ解析の概要とその方法
関数データ解析の概要とその方法関数データ解析の概要とその方法
関数データ解析の概要とその方法
 
PRML第3章@京大PRML輪講
PRML第3章@京大PRML輪講PRML第3章@京大PRML輪講
PRML第3章@京大PRML輪講
 
Rの高速化
Rの高速化Rの高速化
Rの高速化
 
Rによる高速処理 まだfor使ってるの?
Rによる高速処理 まだfor使ってるの?Rによる高速処理 まだfor使ってるの?
Rによる高速処理 まだfor使ってるの?
 
『バックドア基準の入門』@統数研研究集会
『バックドア基準の入門』@統数研研究集会『バックドア基準の入門』@統数研研究集会
『バックドア基準の入門』@統数研研究集会
 
状態空間モデルの考え方・使い方 - TokyoR #38
状態空間モデルの考え方・使い方 - TokyoR #38状態空間モデルの考え方・使い方 - TokyoR #38
状態空間モデルの考え方・使い方 - TokyoR #38
 
MCMC法
MCMC法MCMC法
MCMC法
 
最適輸送入門
最適輸送入門最適輸送入門
最適輸送入門
 
社会心理学者のための時系列分析入門_小森
社会心理学者のための時系列分析入門_小森社会心理学者のための時系列分析入門_小森
社会心理学者のための時系列分析入門_小森
 
基礎からのベイズ統計学 輪読会資料 第4章 メトロポリス・ヘイスティングス法
基礎からのベイズ統計学 輪読会資料 第4章 メトロポリス・ヘイスティングス法基礎からのベイズ統計学 輪読会資料 第4章 メトロポリス・ヘイスティングス法
基礎からのベイズ統計学 輪読会資料 第4章 メトロポリス・ヘイスティングス法
 
ファクター投資と機械学習
ファクター投資と機械学習ファクター投資と機械学習
ファクター投資と機械学習
 
[DL輪読会]Grokking: Generalization Beyond Overfitting on Small Algorithmic Datasets
[DL輪読会]Grokking: Generalization Beyond Overfitting on Small Algorithmic Datasets[DL輪読会]Grokking: Generalization Beyond Overfitting on Small Algorithmic Datasets
[DL輪読会]Grokking: Generalization Beyond Overfitting on Small Algorithmic Datasets
 
機械学習の理論と実践
機械学習の理論と実践機械学習の理論と実践
機械学習の理論と実践
 
変分推論法(変分ベイズ法)(PRML第10章)
変分推論法(変分ベイズ法)(PRML第10章)変分推論法(変分ベイズ法)(PRML第10章)
変分推論法(変分ベイズ法)(PRML第10章)
 
スパース推定法による統計モデリング(入門)
スパース推定法による統計モデリング(入門)スパース推定法による統計モデリング(入門)
スパース推定法による統計モデリング(入門)
 

More from Joe Suzuki

R集会@統数研
R集会@統数研R集会@統数研
R集会@統数研Joe Suzuki
 
E-learning Development of Statistics and in Duex: Practical Approaches and Th...
E-learning Development of Statistics and in Duex: Practical Approaches and Th...E-learning Development of Statistics and in Duex: Practical Approaches and Th...
E-learning Development of Statistics and in Duex: Practical Approaches and Th...Joe Suzuki
 
分枝限定法でモデル選択の計算量を低減する
分枝限定法でモデル選択の計算量を低減する分枝限定法でモデル選択の計算量を低減する
分枝限定法でモデル選択の計算量を低減するJoe Suzuki
 
連続変量を含む条件付相互情報量の推定
連続変量を含む条件付相互情報量の推定連続変量を含む条件付相互情報量の推定
連続変量を含む条件付相互情報量の推定Joe Suzuki
 
E-learning Design and Development for Data Science in Osaka University
E-learning Design and Development for Data Science in Osaka UniversityE-learning Design and Development for Data Science in Osaka University
E-learning Design and Development for Data Science in Osaka UniversityJoe Suzuki
 
AMBN2017 サテライトワークショップ
AMBN2017 サテライトワークショップAMBN2017 サテライトワークショップ
AMBN2017 サテライトワークショップJoe Suzuki
 
CRAN Rパッケージ BNSLの概要
CRAN Rパッケージ BNSLの概要CRAN Rパッケージ BNSLの概要
CRAN Rパッケージ BNSLの概要Joe Suzuki
 
Forest Learning from Data
Forest Learning from DataForest Learning from Data
Forest Learning from DataJoe Suzuki
 
A Bayesian Approach to Data Compression
A Bayesian Approach to Data CompressionA Bayesian Approach to Data Compression
A Bayesian Approach to Data CompressionJoe Suzuki
 
A Conjecture on Strongly Consistent Learning
A Conjecture on Strongly Consistent LearningA Conjecture on Strongly Consistent Learning
A Conjecture on Strongly Consistent LearningJoe Suzuki
 
A Generalization of the Chow-Liu Algorithm and its Applications to Artificial...
A Generalization of the Chow-Liu Algorithm and its Applications to Artificial...A Generalization of the Chow-Liu Algorithm and its Applications to Artificial...
A Generalization of the Chow-Liu Algorithm and its Applications to Artificial...Joe Suzuki
 
A Generalization of Nonparametric Estimation and On-Line Prediction for Stati...
A Generalization of Nonparametric Estimation and On-Line Prediction for Stati...A Generalization of Nonparametric Estimation and On-Line Prediction for Stati...
A Generalization of Nonparametric Estimation and On-Line Prediction for Stati...Joe Suzuki
 
研究紹介(学生向け)
研究紹介(学生向け)研究紹介(学生向け)
研究紹介(学生向け)Joe Suzuki
 
Bayesian Criteria based on Universal Measures
Bayesian Criteria based on Universal MeasuresBayesian Criteria based on Universal Measures
Bayesian Criteria based on Universal MeasuresJoe Suzuki
 
MDL/Bayesian Criteria based on Universal Coding/Measure
MDL/Bayesian Criteria based on Universal Coding/MeasureMDL/Bayesian Criteria based on Universal Coding/Measure
MDL/Bayesian Criteria based on Universal Coding/MeasureJoe Suzuki
 
The Universal Measure for General Sources and its Application to MDL/Bayesian...
The Universal Measure for General Sources and its Application to MDL/Bayesian...The Universal Measure for General Sources and its Application to MDL/Bayesian...
The Universal Measure for General Sources and its Application to MDL/Bayesian...Joe Suzuki
 
Universal Prediction without assuming either Discrete or Continuous
Universal Prediction without assuming either Discrete or ContinuousUniversal Prediction without assuming either Discrete or Continuous
Universal Prediction without assuming either Discrete or ContinuousJoe Suzuki
 
Bayesian network structure estimation based on the Bayesian/MDL criteria when...
Bayesian network structure estimation based on the Bayesian/MDL criteria when...Bayesian network structure estimation based on the Bayesian/MDL criteria when...
Bayesian network structure estimation based on the Bayesian/MDL criteria when...Joe Suzuki
 
The Universal Bayesian Chow-Liu Algorithm
The Universal Bayesian Chow-Liu AlgorithmThe Universal Bayesian Chow-Liu Algorithm
The Universal Bayesian Chow-Liu AlgorithmJoe Suzuki
 

More from Joe Suzuki (20)

R集会@統数研
R集会@統数研R集会@統数研
R集会@統数研
 
E-learning Development of Statistics and in Duex: Practical Approaches and Th...
E-learning Development of Statistics and in Duex: Practical Approaches and Th...E-learning Development of Statistics and in Duex: Practical Approaches and Th...
E-learning Development of Statistics and in Duex: Practical Approaches and Th...
 
分枝限定法でモデル選択の計算量を低減する
分枝限定法でモデル選択の計算量を低減する分枝限定法でモデル選択の計算量を低減する
分枝限定法でモデル選択の計算量を低減する
 
連続変量を含む条件付相互情報量の推定
連続変量を含む条件付相互情報量の推定連続変量を含む条件付相互情報量の推定
連続変量を含む条件付相互情報量の推定
 
E-learning Design and Development for Data Science in Osaka University
E-learning Design and Development for Data Science in Osaka UniversityE-learning Design and Development for Data Science in Osaka University
E-learning Design and Development for Data Science in Osaka University
 
UAI 2017
UAI 2017UAI 2017
UAI 2017
 
AMBN2017 サテライトワークショップ
AMBN2017 サテライトワークショップAMBN2017 サテライトワークショップ
AMBN2017 サテライトワークショップ
 
CRAN Rパッケージ BNSLの概要
CRAN Rパッケージ BNSLの概要CRAN Rパッケージ BNSLの概要
CRAN Rパッケージ BNSLの概要
 
Forest Learning from Data
Forest Learning from DataForest Learning from Data
Forest Learning from Data
 
A Bayesian Approach to Data Compression
A Bayesian Approach to Data CompressionA Bayesian Approach to Data Compression
A Bayesian Approach to Data Compression
 
A Conjecture on Strongly Consistent Learning
A Conjecture on Strongly Consistent LearningA Conjecture on Strongly Consistent Learning
A Conjecture on Strongly Consistent Learning
 
A Generalization of the Chow-Liu Algorithm and its Applications to Artificial...
A Generalization of the Chow-Liu Algorithm and its Applications to Artificial...A Generalization of the Chow-Liu Algorithm and its Applications to Artificial...
A Generalization of the Chow-Liu Algorithm and its Applications to Artificial...
 
A Generalization of Nonparametric Estimation and On-Line Prediction for Stati...
A Generalization of Nonparametric Estimation and On-Line Prediction for Stati...A Generalization of Nonparametric Estimation and On-Line Prediction for Stati...
A Generalization of Nonparametric Estimation and On-Line Prediction for Stati...
 
研究紹介(学生向け)
研究紹介(学生向け)研究紹介(学生向け)
研究紹介(学生向け)
 
Bayesian Criteria based on Universal Measures
Bayesian Criteria based on Universal MeasuresBayesian Criteria based on Universal Measures
Bayesian Criteria based on Universal Measures
 
MDL/Bayesian Criteria based on Universal Coding/Measure
MDL/Bayesian Criteria based on Universal Coding/MeasureMDL/Bayesian Criteria based on Universal Coding/Measure
MDL/Bayesian Criteria based on Universal Coding/Measure
 
The Universal Measure for General Sources and its Application to MDL/Bayesian...
The Universal Measure for General Sources and its Application to MDL/Bayesian...The Universal Measure for General Sources and its Application to MDL/Bayesian...
The Universal Measure for General Sources and its Application to MDL/Bayesian...
 
Universal Prediction without assuming either Discrete or Continuous
Universal Prediction without assuming either Discrete or ContinuousUniversal Prediction without assuming either Discrete or Continuous
Universal Prediction without assuming either Discrete or Continuous
 
Bayesian network structure estimation based on the Bayesian/MDL criteria when...
Bayesian network structure estimation based on the Bayesian/MDL criteria when...Bayesian network structure estimation based on the Bayesian/MDL criteria when...
Bayesian network structure estimation based on the Bayesian/MDL criteria when...
 
The Universal Bayesian Chow-Liu Algorithm
The Universal Bayesian Chow-Liu AlgorithmThe Universal Bayesian Chow-Liu Algorithm
The Universal Bayesian Chow-Liu Algorithm
 

RとPythonを比較する