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
12
VibeKanbanについて
curicle
0
6
"バーチャル宮本さん"を作ってみた
curicle
0
6
"バーチャル宮本さん” 本番デプロイ編
curicle
0
11
最近課金しているAIサービスについて
curicle
0
12
Pub_Sub
curicle
0
5
音声認識について
curicle
0
9
Featured
See All Featured
Leo the Paperboy
mayatellez
4
1.4k
コードの90%をAIが書く世界で何が待っているのか / What awaits us in a world where 90% of the code is written by AI
rkaga
60
42k
Code Review Best Practice
trishagee
74
20k
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
67
The SEO Collaboration Effect
kristinabergwall1
0
350
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
22k
Organizational Design Perspectives: An Ontology of Organizational Design Elements
kimpetersen
PRO
1
380
世界の人気アプリ100個を分析して見えたペイウォール設計の心得
akihiro_kokubo
PRO
66
37k
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
0
56
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.2k
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2.1k
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
180
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 ご静聴ありがとうございました。