- 8) Lecture 2020/12/8(火,2コマ目): ガイダンス、概要
資料1
薄板の資料(2017)
fruits_clf_20181129.ipynbデータ分析例題,
fruits.txtのデータセット
Titanic dataset (Google Colabで分析、モデル化する, 日経ソフトウェア2019(check the magazine at the library)), 20Newsgroups dataset
Kaggle website (データサイエンスの認知の高まりとともに,データ分析に関するコンペティション)
Kaggle Data Science Learning Course
- 9) Lecture 2020/12/15(火,2コマ目): EDA, データについて
スライド資料2
Coronary Artery Disease (CAD) or Heart Disease Dataset - Exploratory Data Analysis (EDA)
Looking at Data (univariate data, histograms, Kernel Density estimates, Cumulative Distribution Function,
when appropriate: summary statistics and boxplots, bivariate data, scatter plots, smoothing, correlation, showing what's important)
On Titanic dataset, the 'cabin' variable has 687 missing values out of 891. It doesn't worth to consider it as a feature for the classification or prediction.
Know the dimensions, data types, class distributions, standard deviation, skew, and understand the relationships between attributes by calculating correlations.
Visualize your data (matplotlib or bokeh). Check outliers. For each variable, show the class separation or overlap on target variable.
On Kaggle, find the "covid-19 japan", make your own EDA (create a notebook). https://www.kaggle.com/lisphilar/covid19-dataset-in-japan
- 10) Lecture 2020/12/22(火,2コマ目): EDA, Data Visualization, データについて2
スライド資料3(2016/12/14 更新)
Feature Engineering: Data are formatted in different forms, some variable have numerical values, some don't. We need to convert non-numerical values into numerical values.
Depending on the problem, we also need to transform each qualitative attribute into quantitative one. At the end of the process, we should obtain a matrix with only numerical values.
https://www.kaggle.com/learn/feature-engineering (Reading)
Assignment 2:
- (課題1のデータ, アイリスデータ, CAD)特徴の相関行列の可視化を行う. Data visualization for the correlation matrix (first assignment data, Iris, Coronary heart disease) using seaborn library
- CADについて自分の独自EDA可視化ノートブックを作る(pairplot,factorplotなどを使用する). Create your own EDA for the Coronay heart disease dataset (use seaborn pairplot, factorplot, facetgrid, and distplot) (reference: factorplot_facetgrid.pdf)
- 使用するデータセット:heart.csv (clevelandのデータセットです)
- 11) Lecture 2021/1/7(木,1コマ目): EDA, Data Visualization, データについて3
Feature Engineering and Feature Selection:
center, scale, range, pca, ica, transform data.
https://scikit-learn.org/stable/modules/preprocessing.html
- 12) Lecture 2021/1/12(火,2コマ目): 基本的な学習アルゴリズム
スライド資料4
Assignment 3:
- Boston Housingデータセットを利用し、Pipelineの回帰モデルと評価を行う。下記の内容も同様に行う。
- CADのノートブックにRandomizedSearchCVと[clf1,clf2]の組合せのモデルと評価を行う。
- CADのPipelineには新しい処理を追加する(その処理は需要な特徴量を自動で選択する)(add a transformer in the preparation pipeline to select only
the most important attributes)
- 13) Lecture 2021/1/19(火,2コマ目): 基本的な学習アルゴリズム(2)
スライド資料5
訂正:P(Yes|Rainy)=P(Rainy|Yes)*P(Yes)/P(Rainy)= 0.39; P(No|Rainy)=P(Rainy|No)*P(No)/P(Rainy)= 0.6;
P(Yes|Overcast)=P(Overcast|Yes)*P(Yes)/P(Overcast)= 0.98;P(No|Overcast)=P(Overcast|No)*P(No)/P(Overcast)= 0.;
Assignment 4:
- scikit-learn-GaussianNBを用いて次のデータセット(play golf)を利用し、x={cloud,hot,high,few}の予測クラスを出力する.(Predict the play (yes or no) giving x.)
- scikit-learn-GaussianNB-Pipelineを用いてCAD:heart.csvのtrain=80%,test=20%のscoreを求めよう.(Compute the accuracy score from GaussianNB model on CAD dataset)
- scikit-learn-KNeighborsClassifier(KNN)-GridCV-Pipelineを用いてCAD:heart.csvのベストkを求めよ.(By using KNN and grid search, find the best k and score for this dataset.)
- 14)Lecture 2021/1/26(火,2コマ目): 基本的な学習アルゴリズム(3)
スライド資料6
Assignment 5:
- データセット(play golf)を利用し、x={cloud,hot,high,few}の予測クラスを出力する.(Predict the play (yes or no) giving x with decision tree algorithm.)
- scikit-learn-DecisionTreeClassifierを用いてCAD:heart.csvのtrain=80%,test=20%のscoreを求めよう.(Compute the accuracy score from DecisionTreeClassifier model on CAD dataset and draw the decision tree results.)
- scikit-learn-RandomForestClassifierを用いてCAD:heart.csvのベストスコアを求めよ.(By using RandomForestClassifier and grid search, find the best score for this dataset.)
Use the hyperparameters:
- "randomforestclassifier__n_estimators":[10,50,100],
- "randomforestclassifier__max_depth":[2,4,10,20,None],
- "randomforestclassifier__min_samples_leaf":[1,2,5,10,15,30],
- "randomforestclassifier__max_leaf_nodes": [2, 5,8]
- 15)Lecture 2021/2/2(火,2コマ目): モデル評価、検証、データサイエンスの展望
機械学習を用いた予測モデル構築・評価(外部リンク)
教師無し学習について、クラスター分析
トピックモデルについて
Classifying images with Neural Networks, MNIST dataset
fashion_mnist_basic_classification.ipynb
mnist_fashion_dataset_cnn.ipynb
ディープラーニングとベイズ的最適化によるCNN自動チューニング