Skip to Content
For Enterprise
For Government
For Higher Ed
For Individuals
For Marketing
For Enterprise
For Government
For Higher Ed
For Individuals
For Marketing
Explore Skills
Cloud Computing
Microsoft Azure
Amazon Web Services (AWS)
Google Cloud
Cloud Migration
Cloud Deployment
Cloud Platforms
Data Engineering
Data Warehouse
SQL
Apache Spark
Microsoft SQL Server
MySQL
Kafka
Data Lake
Streaming & Messaging
NoSQL Databases
Relational Databases
Data Science
Pandas
R
MATLAB
SAS
D3
Power BI
Tableau
Statistics
Exploratory Data Analysis
Data Visualization
AI & ML
Generative AI
Machine Learning
Artificial Intelligence (AI)
Deep Learning
Reinforcement Learning
Natural Language Processing
TensorFlow
Scikit-Learn
Hyperparameter Tuning
MLOps
Programming Languages
Java
JavaScript
Spring
Python
Go
C#
C++
C
Swift
Rust
Functional Programming
Software Architecture
Object-Oriented
Distributed Systems
Domain-Driven Design
Architectural Patterns
IT/Ops
Kubernetes
Docker
GitHub
Terraform
Continuous Delivery
Continuous Integration
Database Administration
Computer Networking
Operating Systems
IT Certifications
Security
Network Security
Application Security
Incident Response
Zero Trust Model
Disaster Recovery
Penetration Testing / Ethical Hacking
Governance
Malware
Security Architecture
Security Engineering
Security Certifications
Design
Web Design
Graphic Design
Interaction Design
Film & Video
User Experience (UX)
Design Process
Design Tools
Business
Agile
Project Management
Product Management
Marketing
Human Resources
Finance
Team Management
Business Strategy
Digital Transformation
Organizational Leadership
Soft Skills
Professional Communication
Emotional Intelligence
Presentation Skills
Innovation
Critical Thinking
Public Speaking
Collaboration
Personal Productivity
Confidence / Motivation
Features
All features
Verifiable skills
AI Academy
Courses
Certifications
Interactive learning
Live events
Superstreams
Answers
Insights reporting
Radar Blog
Buy Courses
Plans
Sign In
Try Now
O'Reilly Platform
book
エレガントなSciPy ―Pythonによる科学技術計算
by
Juan Nunez-Iglesias
,
Stéfan van der Walt
,
Harriet Dashnow
,
山崎 邦子
,
山崎 康宏
November 2018
Intermediate to advanced
272 pages
6h 51m
Japanese
O'Reilly Japan, Inc.
Content preview from
エレガントなSciPy ―Pythonによる科学技術計算
226
付録 演習の解答
A.15
解答:ぶら下がりノードの処理法
以下は「
6.4.1
演習:ぶら下がりノードの処理法」の解答です。
確率行列を持つには、遷移行列のすべての列の総和が
1
である必要があります。この条件は、
ある生物種が他のどの種にも食べられない場合には、満たされません。この場合、その生物種に対
応する列の要素は、すべてゼロになります。しかし、そのような列のすべてを
1/
n
で置き換える
操作は、高コストとなります。
肝心なのは、変換行列と現在の確率ベクトルの乗算に、
どの列も同じ量だけ
寄与することに気付
くことです。つまり、これらの列を足すと、反復の乗算の結果に
1
つの値が加えられるのです。
どんな値かというと、
1/
n
に、ぶら下がりノードに対応する
r
の要素を掛けたものです。このこと
は、ぶら下がりノードに対応する位置の要素の値が
1/
n
で、それ以外の要素はゼロであるベクト
ルと、現在の反復のベクトル
r
の内積として表されます。
def power2(Trans, damping=0.85, max_iter=10**5):
n = Trans.shape[0]
dangling = (1/n) * np.ravel(Trans.sum(axis=0) == 0)
r0 = np.full(n, 1/n)
r = r0
for _ in range(max_iter):
rnext = (damping * (Trans @ r + dangling @ r) +
(1 - damping) / n) ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial
You might also like
リーンエンタープライズ ―イノベーションを実現する創発的な組織づくり
Jez Humble, Joanne Molesky, Barry O'Reilly, 角 征典, 笹井 崇司, Eric Ries
データサイエンスのための統計学入門 第2版 ―予測、分類、統計モデリング、統計的機械学習とR/Pythonプログラミング
Peter Bruce, Andrew Bruce, Peter Gedeck, 黒川 利明, 大橋 真也
戦略的データサイエンス入門 ―ビジネスに活かすコンセプトとテクニック
Foster Provost, Tom Fawcett, 竹田 正和, 古畠 敦, 瀬戸山 雅人, 大木 嘉人, 藤野 賢祐, 宗定 洋平, 西谷 雅史, 砂子 一徳, 市川 正和, 佐藤 正士
アイソモーフィックJavaScript
Jason Strimpel, Maxime Najim, 牧野 聡
Publisher Resources
ISBN: 9784873118604
Other