Loading
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
import pandas as pd | |
import numpy as np | |
from sklearn.model_selection import train_test_split | |
import tensorflow as tf | |
from tensorflow.keras.datasets import mnist | |
from tensorflow import keras | |
from tensorflow.keras import layers, models | |
from tensorflow.keras.utils import to_categorical | |
# Kerasに付属の手書き数字画像データをダウンロード |
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
!apt install aptitude | |
!aptitude install mecab libmecab-dev mecab-ipadic-utf8 git make curl xz-utils file -y | |
!pip install mecab-python3==0.7 | |
import pandas as pd | |
import numpy as np | |
import collections | |
import MeCab | |
import lightgbm as lgb | |
from sklearn.model_selection import train_test_split |
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
import glob | |
import pandas as pd | |
import numpy as np | |
import category_encoders as ce | |
from sklearn.model_selection import train_test_split | |
from sklearn.ensemble import RandomForestRegressor | |
from sklearn.metrics import r2_score | |
files = glob.glob("train/*.csv") | |
data_list = [] |
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
import glob | |
import pandas as pd | |
import numpy as np | |
import xgboost as xgb | |
import category_encoders as ce | |
from sklearn.model_selection import train_test_split | |
files = glob.glob("train/*.csv") | |
data_list = [] | |
for file in files: |
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
### 1.データ集計・加工・描画 | |
# ライブラリの読み込み | |
from sklearn import datasets | |
import pandas as pd | |
# irisデータの読み込み | |
iris = datasets.load_iris() | |
iris | |
##irisデータの可視化 |
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
from selenium import webdriver | |
import time | |
driver = webdriver.Chrome() | |
#Googleのブラウザを開く | |
driver.get('https://www.google.com/') | |
time.sleep(2) | |
#スタビジを検索 |
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
import pandas as pd | |
import numpy as np | |
from sklearn.datasets import load_iris | |
from sklearn.cluster import KMeans | |
from sklearn.metrics import confusion_matrix | |
from sklearn.metrics import accuracy_score | |
iris = load_iris() | |
df = pd.DataFrame(iris.data, columns=iris.feature_names) | |
pred_cluster = KMeans(n_clusters=3).fit_predict(df) |
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
import xgboost as xgb | |
import pandas as pd | |
import numpy as np | |
from tensorflow.keras.datasets import mnist | |
from sklearn.model_selection import train_test_split | |
# Kerasに付属の手書き数字画像データをダウンロード | |
np.random.seed(0) | |
(X_train_base, labels_train_base), (X_test, labels_test) = mnist.load_data() |
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
import pandas as pd | |
import numpy as np | |
from tensorflow.keras.datasets import mnist | |
from sklearn.model_selection import train_test_split | |
# Kerasに付属の手書き数字画像データをダウンロード | |
np.random.seed(0) | |
(X_train_base, labels_train_base), (X_test, labels_test) = mnist.load_data() | |
# Training set を学習データ(X_train, labels_train)と検証データ(X_validation, labels_validation)に8:2で分割する |
NewerOlder