Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
データ整形について
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
株式会社Curious Vehicle
February 28, 2025
0
7
データ整形について
株式会社Curious Vehicle
February 28, 2025
Tweet
Share
More Decks by 株式会社Curious Vehicle
See All by 株式会社Curious Vehicle
ElasticsearchのHA構成について
curicle
0
8
機械学習で絶対音感になりたかった
curicle
0
5
BQにおけるSQLアンチパターンとslot消費削減策
curicle
0
11
VibeKanbanについて
curicle
0
6
"バーチャル宮本さん"を作ってみた
curicle
0
5
"バーチャル宮本さん” 本番デプロイ編
curicle
0
11
最近課金しているAIサービスについて
curicle
0
12
Pub_Sub
curicle
0
5
音声認識について
curicle
0
9
Featured
See All Featured
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
26
3.3k
A Modern Web Designer's Workflow
chriscoyier
698
190k
Jamie Indigo - Trashchat’s Guide to Black Boxes: Technical SEO Tactics for LLMs
techseoconnect
PRO
0
52
Docker and Python
trallard
47
3.7k
Build The Right Thing And Hit Your Dates
maggiecrowley
38
3k
Building the Perfect Custom Keyboard
takai
2
670
Optimising Largest Contentful Paint
csswizardry
37
3.6k
The World Runs on Bad Software
bkeepers
PRO
72
12k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
5
710
Measuring & Analyzing Core Web Vitals
bluesmoon
9
740
Transcript
第40回勉強会 データ解析まわり (1) 安齋 佑司 -- Curious Vehicle Confidential. --
1
もくじ 1. データ解析のフロー 2. デモの概要 3. 加工・整形の環境 4. CSVデータのロード 5.
trainとtestデータの作成 6. まとめ -- Curious Vehicle Confidential. -- 2
データ解析のフロー -- Curious Vehicle Confidential. -- 3 データ解析までの一般的な流れ
1. 収集 2. 選択 3. 加工・整形 4. 解析 • 本題の解析に至るまで のプロセスが長い • ここを速くできれば本 題の解析に使う工数が 増やせる
データ解析のフロー -- Curious Vehicle Confidential. -- 4 データ解析までの一般的な流れ
1. 収集 2. 選択 3. 加工・整形 4. 解析 • 環境や内容に依存する ためパターンは様々
データ解析のフロー -- Curious Vehicle Confidential. -- 5 データ解析までの一般的な流れ
1. 収集 2. 選択 3. 加工・整形 4. 解析 今回はここには触れません
データ解析のフロー -- Curious Vehicle Confidential. -- 6 データ解析までの一般的な流れ
1. 収集 2. 選択 3. 加工・整形 4. 解析 • プログラミングでここを 簡単に対応する方法を 紹介 • 一部解析も入ります
デモの概要 -- Curious Vehicle Confidential. -- 7 ワインの定量情報をもとに質を分類する
使用するデータ
デモの概要 -- Curious Vehicle Confidential. -- 8
デモの概要 -- Curious Vehicle Confidential. -- 9
デモの概要 -- Curious Vehicle Confidential. -- 10
加工・整形の環境 -- Curious Vehicle Confidential. -- 11 今回使用するライブラリ
(Python3) 加工・成形部分
加工・整形の環境 -- Curious Vehicle Confidential. -- 12 今回使用するライブラリ
(Python3) 分析部分
CSVデータのロード -- Curious Vehicle Confidential. -- 13 1行目のヘッダー行はスキップ
デリミターは “;” セミコロン (拡張子はcsvになっているが、、) データファイルから ndarray 形式のオブジェクトが作成される
trainとtestデータの作成 -- Curious Vehicle Confidential. -- 14 読み込んだデータの0から10のカラムは解析の素性として使う
12番目(配列の11) はラベルとして使用する (質を分類するため)
trainとtestデータの作成 -- Curious Vehicle Confidential. -- 15 今回は質を
8 以上、6以上7以下、6未満の3カテゴリに変更した ※ 質はだいたい正規分布になっているためボリュームを考慮した
trainとtestデータの作成 -- Curious Vehicle Confidential. -- 16 データの90%をtrainに10%をtestに設定
randomが毎回同じになるように seed を設定 この関数だけでtrainとtestの分析用データとラベルが作成される train のデータを使用して分類モデルを作成
trainとtestデータの作成 -- Curious Vehicle Confidential. -- 17 作成した分析モデルを使用してテストデータを予測する
正解ラベルと予測結果を比較して分類精度を出力する
まとめ -- Curious Vehicle Confidential. -- 18 • CSVデータのロードは
loadtxt 関数 • train と test データの作成部分は train_test_split 関数 • 面倒なデータ整形は便利なライブラリで解決 • ついでに機械学習と精度の出力もライブラリの関 数をつかって完了 • 余った時間をモデルの精度向上に充てよう
おしまい -- Curious Vehicle Confidential. -- 19 ご静聴ありがとうございました。