SlideShare una empresa de Scribd logo
1 de 12
第14回AIツール入門講座
「Google Colaboratoryによる
ネットワーク分析入門」
2. ネットワーク分析・可視化の具体例
NetworkXやmatplotlibを用いてネットワークを入力、分析、可視
化して出力するやり方について説明します。
分析の具体例
• ネットワーク読み込み・生成
• ネットワークの可視化
• ランキング・中心性
• 特徴量計算
• コミュニティ抽出
• 出力
ネットワーク読み込み・生成
• ネット上に公開されているネットワークデータを読み込み
• http://www-personal.umich.edu/~mejn/netdata/
• http://snap.stanford.edu/data/
• csv形式のデータからpandasを用いて読み込み
• networkX上で人工ネットワークを生成
ネットワークの可視化
• 頂点数が数万以下の疎なネットワークなら可視化は有効
• 全体構造の把握、グループの大きさやその関係、孤立点などの発見…
• 望ましい可視化とは?
• 辺の交差や頂点の重なりを少なく
• 頂点が集中せずに平面上で分散させる
• 関連性のある頂点や辺を近くに配置
• 対称性や階層性などを反映
• …
ばねモデルによる描画 描画の際の色、ラベル、
フォントの指定
さまざまな可視化
• draw_circular
• 頂点を円周上に配置
• draw_kamada_kawai
• 頂点を力学モデルにより配置
• draw_random
• 頂点をランダムに配置
• draw_spectral
• ネットワークを表す行列の固有ベクトルにより
頂点を配置
• draw_spring
• 頂点を力学モデルにより配置
• draw_shell
• 頂点を同心円上に配置
中心性・ランキング
• どの頂点が中心的か?
• ソーシャルメディアでのオピニオンリーダー
• 街のどこへでも短時間で駆けつけられるような場所
• …
• 次数中心性(Degree Centrality)
• 他の多くの頂点とつながっている頂点を中心的とみなす
• 固有ベクトル中心性(Eigenvector Centrality)
• 周囲の頂点の中心性も加味し、多くの中心的な頂点とつながっている頂点を中心的
とみなす
• 近接中心性(Closeness Centrality)
• ネットワーク中の他の頂点へ短い距離で到達できる頂点を中心的とみなす
• 媒介中心性(Betweenness Centrality)
• その頂点がなくなると多くの経路が分断されてしまうような頂点を中心的とみなす
中心性の例
参考: https://aksakalli.github.io/2017/07/17/network-centrality-measures-and-their-visualization.html
特徴量計算
• 頂点数は同じでも、ネットワークはさまざま
ランダムグラフ
ピーターセングラフ
完全グラフ
サイクルグラフ
2部グラフ
バーベルグラフ
スターグラフ
ホイールグラフ
スケールフリーグラフ
特徴量の例
• 密度
• 直径
• クラスタ係数
• 平均次数
• 次数分布
• 平均パス長
• 次数相関
• …
コミュニティ抽出
• 密に結びついた部分ネットワーク(コミュニティ)
• 友人グループや派閥などに対応
• 類似頂点がコミュニティを構成→嗜好の似た人に商品や情報を推薦
• さまざまな定義、さまざまな抽出手法
参考: https://python-graph-gallery.com/324-map-a-color-to-network-nodes/
http://ryancompton.net/2014/06/16/community-detection-and-colored-plotting-in-networkx/
出力
• ネットワークのデータフォーマットの変換
• ネットワーク可視化結果の出力
• 特徴量やコミュニティ抽出などの分析結果の出力
networkXとGephiとの連携
• networkXでグラフをGEXF形式で出力→Gephiを使って分析
• Gephiはユーザインタフェースが優れており、頂点や辺の色や
サイズ・太さ、可視化のレイアウトなどをインタラクティブに
変更できる
• あらかじめ自分のPC上にGephiをインストールする必要あり
• https://gephi.org/

Más contenido relacionado

Similar a Introduction of network analysis with Google Colaboratory -- Example of Network Analysis and Visualization

20131211 Neutron Havana
20131211 Neutron Havana20131211 Neutron Havana
20131211 Neutron HavanaAkihiro Motoki
 
Okinawa Open Days 2014 OpenStackハンズオンセミナー / OpenStackの機能概要
Okinawa Open Days 2014 OpenStackハンズオンセミナー / OpenStackの機能概要Okinawa Open Days 2014 OpenStackハンズオンセミナー / OpenStackの機能概要
Okinawa Open Days 2014 OpenStackハンズオンセミナー / OpenStackの機能概要Etsuji Nakai
 
Spark Summit 2014 の報告と最近の取り組みについて
Spark Summit 2014 の報告と最近の取り組みについてSpark Summit 2014 の報告と最近の取り組みについて
Spark Summit 2014 の報告と最近の取り組みについてRecruit Technologies
 
クラウドを活用したシステム開発における、ネットワークのInfrastructure as Code
クラウドを活用したシステム開発における、ネットワークのInfrastructure as Codeクラウドを活用したシステム開発における、ネットワークのInfrastructure as Code
クラウドを活用したシステム開発における、ネットワークのInfrastructure as Codeskipping classes
 
icp_meetup_japan_tokuryoo.pdf
icp_meetup_japan_tokuryoo.pdficp_meetup_japan_tokuryoo.pdf
icp_meetup_japan_tokuryoo.pdfryoo toku
 
第2章アーキテクチャ
第2章アーキテクチャ第2章アーキテクチャ
第2章アーキテクチャKenta Hattori
 
[DL Hacks]OCNet: Object Context Networkfor Scene Parsing
[DL Hacks]OCNet: Object Context Networkfor Scene Parsing[DL Hacks]OCNet: Object Context Networkfor Scene Parsing
[DL Hacks]OCNet: Object Context Networkfor Scene ParsingDeep Learning JP
 
Jubatusが目指すインテリジェンス基盤
Jubatusが目指すインテリジェンス基盤Jubatusが目指すインテリジェンス基盤
Jubatusが目指すインテリジェンス基盤Shohei Hido
 
テレコムのビッグデータ解析 & AI サイバーセキュリティ
テレコムのビッグデータ解析 & AI サイバーセキュリティテレコムのビッグデータ解析 & AI サイバーセキュリティ
テレコムのビッグデータ解析 & AI サイバーセキュリティNVIDIA Japan
 
基礎演習V 河野ゼミ紹介20161025
基礎演習V 河野ゼミ紹介20161025基礎演習V 河野ゼミ紹介20161025
基礎演習V 河野ゼミ紹介20161025義広 河野
 
Javaで学ぶネットワークプログラミングの基礎
Javaで学ぶネットワークプログラミングの基礎Javaで学ぶネットワークプログラミングの基礎
Javaで学ぶネットワークプログラミングの基礎なべ
 
[Modern Cloud Day Tokyo 2019] 実践エンタープライズ・ブロックチェーン ~ システム設計・運用における課題とそのソリューション
[Modern Cloud Day Tokyo 2019] 実践エンタープライズ・ブロックチェーン ~ システム設計・運用における課題とそのソリューション[Modern Cloud Day Tokyo 2019] 実践エンタープライズ・ブロックチェーン ~ システム設計・運用における課題とそのソリューション
[Modern Cloud Day Tokyo 2019] 実践エンタープライズ・ブロックチェーン ~ システム設計・運用における課題とそのソリューションオラクルエンジニア通信
 
Software for Edge Heavy Computing @ INTEROP 2016 Tokyo
Software for Edge Heavy Computing @ INTEROP 2016 TokyoSoftware for Edge Heavy Computing @ INTEROP 2016 Tokyo
Software for Edge Heavy Computing @ INTEROP 2016 TokyoShohei Hido
 
高速ネットワーク技術と周辺動向(特別講義)
高速ネットワーク技術と周辺動向(特別講義)高速ネットワーク技術と周辺動向(特別講義)
高速ネットワーク技術と周辺動向(特別講義)Naoto MATSUMOTO
 
Jubatusでマルウェア分類
Jubatusでマルウェア分類Jubatusでマルウェア分類
Jubatusでマルウェア分類Shuzo Kashihara
 
オンライン技術勉強会 20201216 QSEoWサーバー管理者向けトレーニング_2
オンライン技術勉強会 20201216 QSEoWサーバー管理者向けトレーニング_2オンライン技術勉強会 20201216 QSEoWサーバー管理者向けトレーニング_2
オンライン技術勉強会 20201216 QSEoWサーバー管理者向けトレーニング_2QlikPresalesJapan
 
さくらのクラウド サービス開発とデータセンター運用
さくらのクラウド サービス開発とデータセンター運用さくらのクラウド サービス開発とデータセンター運用
さくらのクラウド サービス開発とデータセンター運用SAKURA Internet Inc.
 
【de:code 2020】 Azure Synapse Analytics 技術編 ~ 最新の統合分析プラットフォームによる新しい価値の創出(後編)
【de:code 2020】 Azure Synapse Analytics 技術編 ~ 最新の統合分析プラットフォームによる新しい価値の創出(後編)【de:code 2020】 Azure Synapse Analytics 技術編 ~ 最新の統合分析プラットフォームによる新しい価値の創出(後編)
【de:code 2020】 Azure Synapse Analytics 技術編 ~ 最新の統合分析プラットフォームによる新しい価値の創出(後編)日本マイクロソフト株式会社
 
学生からみた松江高専生とOpenStackで遊んだお話
学生からみた松江高専生とOpenStackで遊んだお話学生からみた松江高専生とOpenStackで遊んだお話
学生からみた松江高専生とOpenStackで遊んだお話Toru Komatsu
 
Tips for passing AZ-103 once
Tips for passing AZ-103 onceTips for passing AZ-103 once
Tips for passing AZ-103 onceOshitari_kochi
 

Similar a Introduction of network analysis with Google Colaboratory -- Example of Network Analysis and Visualization (20)

20131211 Neutron Havana
20131211 Neutron Havana20131211 Neutron Havana
20131211 Neutron Havana
 
Okinawa Open Days 2014 OpenStackハンズオンセミナー / OpenStackの機能概要
Okinawa Open Days 2014 OpenStackハンズオンセミナー / OpenStackの機能概要Okinawa Open Days 2014 OpenStackハンズオンセミナー / OpenStackの機能概要
Okinawa Open Days 2014 OpenStackハンズオンセミナー / OpenStackの機能概要
 
Spark Summit 2014 の報告と最近の取り組みについて
Spark Summit 2014 の報告と最近の取り組みについてSpark Summit 2014 の報告と最近の取り組みについて
Spark Summit 2014 の報告と最近の取り組みについて
 
クラウドを活用したシステム開発における、ネットワークのInfrastructure as Code
クラウドを活用したシステム開発における、ネットワークのInfrastructure as Codeクラウドを活用したシステム開発における、ネットワークのInfrastructure as Code
クラウドを活用したシステム開発における、ネットワークのInfrastructure as Code
 
icp_meetup_japan_tokuryoo.pdf
icp_meetup_japan_tokuryoo.pdficp_meetup_japan_tokuryoo.pdf
icp_meetup_japan_tokuryoo.pdf
 
第2章アーキテクチャ
第2章アーキテクチャ第2章アーキテクチャ
第2章アーキテクチャ
 
[DL Hacks]OCNet: Object Context Networkfor Scene Parsing
[DL Hacks]OCNet: Object Context Networkfor Scene Parsing[DL Hacks]OCNet: Object Context Networkfor Scene Parsing
[DL Hacks]OCNet: Object Context Networkfor Scene Parsing
 
Jubatusが目指すインテリジェンス基盤
Jubatusが目指すインテリジェンス基盤Jubatusが目指すインテリジェンス基盤
Jubatusが目指すインテリジェンス基盤
 
テレコムのビッグデータ解析 & AI サイバーセキュリティ
テレコムのビッグデータ解析 & AI サイバーセキュリティテレコムのビッグデータ解析 & AI サイバーセキュリティ
テレコムのビッグデータ解析 & AI サイバーセキュリティ
 
基礎演習V 河野ゼミ紹介20161025
基礎演習V 河野ゼミ紹介20161025基礎演習V 河野ゼミ紹介20161025
基礎演習V 河野ゼミ紹介20161025
 
Javaで学ぶネットワークプログラミングの基礎
Javaで学ぶネットワークプログラミングの基礎Javaで学ぶネットワークプログラミングの基礎
Javaで学ぶネットワークプログラミングの基礎
 
[Modern Cloud Day Tokyo 2019] 実践エンタープライズ・ブロックチェーン ~ システム設計・運用における課題とそのソリューション
[Modern Cloud Day Tokyo 2019] 実践エンタープライズ・ブロックチェーン ~ システム設計・運用における課題とそのソリューション[Modern Cloud Day Tokyo 2019] 実践エンタープライズ・ブロックチェーン ~ システム設計・運用における課題とそのソリューション
[Modern Cloud Day Tokyo 2019] 実践エンタープライズ・ブロックチェーン ~ システム設計・運用における課題とそのソリューション
 
Software for Edge Heavy Computing @ INTEROP 2016 Tokyo
Software for Edge Heavy Computing @ INTEROP 2016 TokyoSoftware for Edge Heavy Computing @ INTEROP 2016 Tokyo
Software for Edge Heavy Computing @ INTEROP 2016 Tokyo
 
高速ネットワーク技術と周辺動向(特別講義)
高速ネットワーク技術と周辺動向(特別講義)高速ネットワーク技術と周辺動向(特別講義)
高速ネットワーク技術と周辺動向(特別講義)
 
Jubatusでマルウェア分類
Jubatusでマルウェア分類Jubatusでマルウェア分類
Jubatusでマルウェア分類
 
オンライン技術勉強会 20201216 QSEoWサーバー管理者向けトレーニング_2
オンライン技術勉強会 20201216 QSEoWサーバー管理者向けトレーニング_2オンライン技術勉強会 20201216 QSEoWサーバー管理者向けトレーニング_2
オンライン技術勉強会 20201216 QSEoWサーバー管理者向けトレーニング_2
 
さくらのクラウド サービス開発とデータセンター運用
さくらのクラウド サービス開発とデータセンター運用さくらのクラウド サービス開発とデータセンター運用
さくらのクラウド サービス開発とデータセンター運用
 
【de:code 2020】 Azure Synapse Analytics 技術編 ~ 最新の統合分析プラットフォームによる新しい価値の創出(後編)
【de:code 2020】 Azure Synapse Analytics 技術編 ~ 最新の統合分析プラットフォームによる新しい価値の創出(後編)【de:code 2020】 Azure Synapse Analytics 技術編 ~ 最新の統合分析プラットフォームによる新しい価値の創出(後編)
【de:code 2020】 Azure Synapse Analytics 技術編 ~ 最新の統合分析プラットフォームによる新しい価値の創出(後編)
 
学生からみた松江高専生とOpenStackで遊んだお話
学生からみた松江高専生とOpenStackで遊んだお話学生からみた松江高専生とOpenStackで遊んだお話
学生からみた松江高専生とOpenStackで遊んだお話
 
Tips for passing AZ-103 once
Tips for passing AZ-103 onceTips for passing AZ-103 once
Tips for passing AZ-103 once
 

Más de tm1966

情報理工学院情報工学系村田研究室.pptx
情報理工学院情報工学系村田研究室.pptx情報理工学院情報工学系村田研究室.pptx
情報理工学院情報工学系村田研究室.pptxtm1966
 
Networks, Deep Learning and COVID-19
Networks, Deep Learning and COVID-19Networks, Deep Learning and COVID-19
Networks, Deep Learning and COVID-19tm1966
 
友人関係と感染症伝搬をネットワークで理解する
友人関係と感染症伝搬をネットワークで理解する友人関係と感染症伝搬をネットワークで理解する
友人関係と感染症伝搬をネットワークで理解するtm1966
 
Networks, Deep Learning (and COVID-19)
Networks, Deep Learning (and COVID-19)Networks, Deep Learning (and COVID-19)
Networks, Deep Learning (and COVID-19)tm1966
 
20191107 deeplearningapproachesfornetworks
20191107 deeplearningapproachesfornetworks20191107 deeplearningapproachesfornetworks
20191107 deeplearningapproachesfornetworkstm1966
 
Introduction of network analysis with Google Colaboratory -- Diffusion in Net...
Introduction of network analysis with Google Colaboratory -- Diffusion in Net...Introduction of network analysis with Google Colaboratory -- Diffusion in Net...
Introduction of network analysis with Google Colaboratory -- Diffusion in Net...tm1966
 
Introduction of network analysis with Google Colaboratory -- Network Models
Introduction of network analysis with Google Colaboratory -- Network ModelsIntroduction of network analysis with Google Colaboratory -- Network Models
Introduction of network analysis with Google Colaboratory -- Network Modelstm1966
 
Introduction of network analysis with Google Colaboratory -- Network Algorithms
Introduction of network analysis with Google Colaboratory -- Network AlgorithmsIntroduction of network analysis with Google Colaboratory -- Network Algorithms
Introduction of network analysis with Google Colaboratory -- Network Algorithmstm1966
 
Introduction of network analysis with Google Colaboratory -- Network Metrics
Introduction of network analysis with Google Colaboratory -- Network MetricsIntroduction of network analysis with Google Colaboratory -- Network Metrics
Introduction of network analysis with Google Colaboratory -- Network Metricstm1966
 
Introduction of network analysis with Google Colaboratory -- Introduction of ...
Introduction of network analysis with Google Colaboratory -- Introduction of ...Introduction of network analysis with Google Colaboratory -- Introduction of ...
Introduction of network analysis with Google Colaboratory -- Introduction of ...tm1966
 
Introduction of network analysis with Google Colaboratory -- Orientation
Introduction of network analysis with Google Colaboratory -- OrientationIntroduction of network analysis with Google Colaboratory -- Orientation
Introduction of network analysis with Google Colaboratory -- Orientationtm1966
 
20140925 multilayernetworks
20140925 multilayernetworks20140925 multilayernetworks
20140925 multilayernetworkstm1966
 

Más de tm1966 (12)

情報理工学院情報工学系村田研究室.pptx
情報理工学院情報工学系村田研究室.pptx情報理工学院情報工学系村田研究室.pptx
情報理工学院情報工学系村田研究室.pptx
 
Networks, Deep Learning and COVID-19
Networks, Deep Learning and COVID-19Networks, Deep Learning and COVID-19
Networks, Deep Learning and COVID-19
 
友人関係と感染症伝搬をネットワークで理解する
友人関係と感染症伝搬をネットワークで理解する友人関係と感染症伝搬をネットワークで理解する
友人関係と感染症伝搬をネットワークで理解する
 
Networks, Deep Learning (and COVID-19)
Networks, Deep Learning (and COVID-19)Networks, Deep Learning (and COVID-19)
Networks, Deep Learning (and COVID-19)
 
20191107 deeplearningapproachesfornetworks
20191107 deeplearningapproachesfornetworks20191107 deeplearningapproachesfornetworks
20191107 deeplearningapproachesfornetworks
 
Introduction of network analysis with Google Colaboratory -- Diffusion in Net...
Introduction of network analysis with Google Colaboratory -- Diffusion in Net...Introduction of network analysis with Google Colaboratory -- Diffusion in Net...
Introduction of network analysis with Google Colaboratory -- Diffusion in Net...
 
Introduction of network analysis with Google Colaboratory -- Network Models
Introduction of network analysis with Google Colaboratory -- Network ModelsIntroduction of network analysis with Google Colaboratory -- Network Models
Introduction of network analysis with Google Colaboratory -- Network Models
 
Introduction of network analysis with Google Colaboratory -- Network Algorithms
Introduction of network analysis with Google Colaboratory -- Network AlgorithmsIntroduction of network analysis with Google Colaboratory -- Network Algorithms
Introduction of network analysis with Google Colaboratory -- Network Algorithms
 
Introduction of network analysis with Google Colaboratory -- Network Metrics
Introduction of network analysis with Google Colaboratory -- Network MetricsIntroduction of network analysis with Google Colaboratory -- Network Metrics
Introduction of network analysis with Google Colaboratory -- Network Metrics
 
Introduction of network analysis with Google Colaboratory -- Introduction of ...
Introduction of network analysis with Google Colaboratory -- Introduction of ...Introduction of network analysis with Google Colaboratory -- Introduction of ...
Introduction of network analysis with Google Colaboratory -- Introduction of ...
 
Introduction of network analysis with Google Colaboratory -- Orientation
Introduction of network analysis with Google Colaboratory -- OrientationIntroduction of network analysis with Google Colaboratory -- Orientation
Introduction of network analysis with Google Colaboratory -- Orientation
 
20140925 multilayernetworks
20140925 multilayernetworks20140925 multilayernetworks
20140925 multilayernetworks
 

Introduction of network analysis with Google Colaboratory -- Example of Network Analysis and Visualization