SlideShare una empresa de Scribd logo
1 de 35
Descargar para leer sin conexión
2017 10 28 

Web
Twitter: @hamukazu
Python 5
EC 

ASP
• Scipy/Numpy

• 

• 

• 

•
• 

• 

•
scikit-learn TensorFlow 

• 

• 

• 

• 

•
Python
•
Numpy 

• Cython
s = 0
for i in range(1, 100000001):
s += i
print(s)
1 1
s = sum(range(1, 100000001))
print(s)
import numpy as np
a = np.arange(1, 100000001, dtype=np.int64)
print(a.sum())
s = 0
for i in range(1, 100000001):
s += i
print(s)
s = sum(range(1, 100000001))
print(s)
import numpy as np
a = np.arange(1, 100000001, dtype=np.int64)
print(a.sum())
30.21
12.33
0.38
Numpy
• Numpy 

• Numpy 

•
Cython
• Python C 

• 

• Numpy
Cython
def prime(n):
p = [True] * (n + 1)
m = 2
while m < n + 1:
if p[m]:
i = m * 2
while i < n + 1:
p[i] = False
i += m
m += 1
i = n
while not p[i]:
i -= 1
return i
n 

p(10000000)
Python 4.75 Cython 3.04
def prime(n):
p = [True] * (n + 1)
m = 2
while m < n + 1:
if p[m]:
i = m * 2
while i < n + 1:
p[i] = False
i += m
m += 1
i = n
while not p[i]:
i -= 1
return i
def prime(int n):
cdef int i, m
p = [True] * (n + 1)
m = 2
while m < n + 1:
if p[m]:
i = m * 2
while i < n + 1:
p[i] = False
i += m
m += 1
i = n
while not p[i]:
i -= 1
return i
3.04 3.04
def prime(int n):
cdef int m, i
cdef int * p = <int * >malloc((n + 1) * sizeof(int))
for i in range(n + 1):
p[i] = 1
m = 2
while m < n + 1:
if p[m]:
i = m * 2
while i < n + 1:
p[i] = 0
i += m
m += 1
i = n
while not p[i]:
i -= 1
free(p)
return i
3.04 0.17
C
Cython
• 

• 

•
http://bit.ly/kimikazu20140913 http://bit.ly/kimikazu20160204
Python
PyCon JP 2014 2016
…
• 

•
Premature optimization is the root of all evil.
— Donald Knuth
•


•


• 

• XP


•
• 

• 

•
• 

•


•
XP


• 

• ☓ ○


• 

•


•
• 

• 

• 

• 

•


•
Scikit-learn
SpectralClustering
• 

•


• 

•
XT
X
• 

• 

• 

• 

• 

• 

• 

•
x
Softplus f(x) = log(1 + ex
)
f(x) ⇡ x
f(1000)
• 

•


• 

• 

•
• Python 

•


• 

• 

• 

•

Más contenido relacionado

La actualidad más candente

La actualidad más candente (20)

Pythonic Math
Pythonic MathPythonic Math
Pythonic Math
 
Recommendation System --Theory and Practice
Recommendation System --Theory and PracticeRecommendation System --Theory and Practice
Recommendation System --Theory and Practice
 
TensorFlow example for AI Ukraine2016
TensorFlow example  for AI Ukraine2016TensorFlow example  for AI Ukraine2016
TensorFlow example for AI Ukraine2016
 
Machine Intelligence at Google Scale: TensorFlow
Machine Intelligence at Google Scale: TensorFlowMachine Intelligence at Google Scale: TensorFlow
Machine Intelligence at Google Scale: TensorFlow
 
About RNN
About RNNAbout RNN
About RNN
 
About RNN
About RNNAbout RNN
About RNN
 
Tensor flow (1)
Tensor flow (1)Tensor flow (1)
Tensor flow (1)
 
Introduction to Machine Learning with TensorFlow
Introduction to Machine Learning with TensorFlowIntroduction to Machine Learning with TensorFlow
Introduction to Machine Learning with TensorFlow
 
Your first TensorFlow programming with Jupyter
Your first TensorFlow programming with JupyterYour first TensorFlow programming with Jupyter
Your first TensorFlow programming with Jupyter
 
Network Analysis with networkX : Real-World Example-1
Network Analysis with networkX : Real-World Example-1Network Analysis with networkX : Real-World Example-1
Network Analysis with networkX : Real-World Example-1
 
Tensorflow - Intro (2017)
Tensorflow - Intro (2017)Tensorflow - Intro (2017)
Tensorflow - Intro (2017)
 
Hacking Python ASTs, Pycon DE 2017, Suhas
Hacking Python ASTs, Pycon DE 2017, SuhasHacking Python ASTs, Pycon DE 2017, Suhas
Hacking Python ASTs, Pycon DE 2017, Suhas
 
Sergey Shelpuk & Olha Romaniuk - “Deep learning, Tensorflow, and Fashion: how...
Sergey Shelpuk & Olha Romaniuk - “Deep learning, Tensorflow, and Fashion: how...Sergey Shelpuk & Olha Romaniuk - “Deep learning, Tensorflow, and Fashion: how...
Sergey Shelpuk & Olha Romaniuk - “Deep learning, Tensorflow, and Fashion: how...
 
Introducton to Convolutional Nerural Network with TensorFlow
Introducton to Convolutional Nerural Network with TensorFlowIntroducton to Convolutional Nerural Network with TensorFlow
Introducton to Convolutional Nerural Network with TensorFlow
 
TensorFlow Dev Summit 2017 요약
TensorFlow Dev Summit 2017 요약TensorFlow Dev Summit 2017 요약
TensorFlow Dev Summit 2017 요약
 
Pointers lesson 4 (malloc and its use)
Pointers lesson 4 (malloc and its use)Pointers lesson 4 (malloc and its use)
Pointers lesson 4 (malloc and its use)
 
"PyTorch Deep Learning Framework: Status and Directions," a Presentation from...
"PyTorch Deep Learning Framework: Status and Directions," a Presentation from..."PyTorch Deep Learning Framework: Status and Directions," a Presentation from...
"PyTorch Deep Learning Framework: Status and Directions," a Presentation from...
 
Explanation on Tensorflow example -Deep mnist for expert
Explanation on Tensorflow example -Deep mnist for expertExplanation on Tensorflow example -Deep mnist for expert
Explanation on Tensorflow example -Deep mnist for expert
 
Tensorflow in practice by Engineer - donghwi cha
Tensorflow in practice by Engineer - donghwi chaTensorflow in practice by Engineer - donghwi cha
Tensorflow in practice by Engineer - donghwi cha
 
PyTorch for Deep Learning Practitioners
PyTorch for Deep Learning PractitionersPyTorch for Deep Learning Practitioners
PyTorch for Deep Learning Practitioners
 

Destacado

MCMCサンプルの使い方 ~見る・決める・探す・発生させる~
MCMCサンプルの使い方 ~見る・決める・探す・発生させる~MCMCサンプルの使い方 ~見る・決める・探す・発生させる~
MCMCサンプルの使い方 ~見る・決める・探す・発生させる~
. .
 
PoisoningAttackSVM (ICMLreading2012)
PoisoningAttackSVM (ICMLreading2012)PoisoningAttackSVM (ICMLreading2012)
PoisoningAttackSVM (ICMLreading2012)
Hidekazu Oiwa
 

Destacado (20)

映像解析における周辺要素
映像解析における周辺要素映像解析における周辺要素
映像解析における周辺要素
 
オープニングトーク - 創設の思い・目的・進行方針  -データマイニング+WEB勉強会@東京
オープニングトーク - 創設の思い・目的・進行方針  -データマイニング+WEB勉強会@東京オープニングトーク - 創設の思い・目的・進行方針  -データマイニング+WEB勉強会@東京
オープニングトーク - 創設の思い・目的・進行方針  -データマイニング+WEB勉強会@東京
 
Variational Autoencoderの紹介
Variational Autoencoderの紹介Variational Autoencoderの紹介
Variational Autoencoderの紹介
 
対話返答生成における個性の追加反映
対話返答生成における個性の追加反映対話返答生成における個性の追加反映
対話返答生成における個性の追加反映
 
深層学習とベイズ統計
深層学習とベイズ統計深層学習とベイズ統計
深層学習とベイズ統計
 
MCMCサンプルの使い方 ~見る・決める・探す・発生させる~
MCMCサンプルの使い方 ~見る・決める・探す・発生させる~MCMCサンプルの使い方 ~見る・決める・探す・発生させる~
MCMCサンプルの使い方 ~見る・決める・探す・発生させる~
 
20161029 TVI Tokyowebmining Seminar for Share
20161029 TVI Tokyowebmining Seminar for Share20161029 TVI Tokyowebmining Seminar for Share
20161029 TVI Tokyowebmining Seminar for Share
 
アンカンファレンス @ 第50回 データマイニング+WEB @東京
アンカンファレンス @ 第50回 データマイニング+WEB @東京アンカンファレンス @ 第50回 データマイニング+WEB @東京
アンカンファレンス @ 第50回 データマイニング+WEB @東京
 
PL/CUDA - GPU Accelerated In-Database Analytics
PL/CUDA - GPU Accelerated In-Database AnalyticsPL/CUDA - GPU Accelerated In-Database Analytics
PL/CUDA - GPU Accelerated In-Database Analytics
 
動的最適化の今までとこれから
動的最適化の今までとこれから動的最適化の今までとこれから
動的最適化の今までとこれから
 
機械学習ゴリゴリ派のための数学とPython
機械学習ゴリゴリ派のための数学とPython機械学習ゴリゴリ派のための数学とPython
機械学習ゴリゴリ派のための数学とPython
 
20170310_InDatabaseAnalytics_#1
20170310_InDatabaseAnalytics_#120170310_InDatabaseAnalytics_#1
20170310_InDatabaseAnalytics_#1
 
ドローン農業最前線
ドローン農業最前線ドローン農業最前線
ドローン農業最前線
 
計量経済学と 機械学習の交差点入り口 (公開用)
計量経済学と 機械学習の交差点入り口 (公開用)計量経済学と 機械学習の交差点入り口 (公開用)
計量経済学と 機械学習の交差点入り口 (公開用)
 
レコメンド研究のあれこれ
レコメンド研究のあれこれレコメンド研究のあれこれ
レコメンド研究のあれこれ
 
[DL輪読会]Learning by Association - A versatile semi-supervised training method ...
[DL輪読会]Learning by Association - A versatile semi-supervised training method ...[DL輪読会]Learning by Association - A versatile semi-supervised training method ...
[DL輪読会]Learning by Association - A versatile semi-supervised training method ...
 
深層学習の判断根拠を理解するための 研究とその意義 @PRMU 2017熊本
深層学習の判断根拠を理解するための 研究とその意義 @PRMU 2017熊本深層学習の判断根拠を理解するための 研究とその意義 @PRMU 2017熊本
深層学習の判断根拠を理解するための 研究とその意義 @PRMU 2017熊本
 
PoisoningAttackSVM (ICMLreading2012)
PoisoningAttackSVM (ICMLreading2012)PoisoningAttackSVM (ICMLreading2012)
PoisoningAttackSVM (ICMLreading2012)
 
もしその単語がなかったら
もしその単語がなかったらもしその単語がなかったら
もしその単語がなかったら
 
[DLHacks LT] PytorchのDataLoader -torchtextのソースコードを読んでみた-
[DLHacks LT] PytorchのDataLoader -torchtextのソースコードを読んでみた-[DLHacks LT] PytorchのDataLoader -torchtextのソースコードを読んでみた-
[DLHacks LT] PytorchのDataLoader -torchtextのソースコードを読んでみた-
 

Similar a Tokyo webmining 2017-10-28

111015 tokyo scipy2_discussionquestionaire_i_python
111015 tokyo scipy2_discussionquestionaire_i_python111015 tokyo scipy2_discussionquestionaire_i_python
111015 tokyo scipy2_discussionquestionaire_i_python
Shohei Hido
 
Profiling and optimization
Profiling and optimizationProfiling and optimization
Profiling and optimization
g3_nittala
 

Similar a Tokyo webmining 2017-10-28 (20)

Swift for tensorflow
Swift for tensorflowSwift for tensorflow
Swift for tensorflow
 
SFSCON23 - Emily Bourne Yaman Güçlü - Pyccel write Python code, get Fortran ...
SFSCON23 - Emily Bourne Yaman Güçlü - Pyccel  write Python code, get Fortran ...SFSCON23 - Emily Bourne Yaman Güçlü - Pyccel  write Python code, get Fortran ...
SFSCON23 - Emily Bourne Yaman Güçlü - Pyccel write Python code, get Fortran ...
 
Python高级编程(二)
Python高级编程(二)Python高级编程(二)
Python高级编程(二)
 
Actors for Behavioural Simulation
Actors for Behavioural SimulationActors for Behavioural Simulation
Actors for Behavioural Simulation
 
Mpi in-python
Mpi in-pythonMpi in-python
Mpi in-python
 
Writing Faster Python 3
Writing Faster Python 3Writing Faster Python 3
Writing Faster Python 3
 
Recurrences
RecurrencesRecurrences
Recurrences
 
111015 tokyo scipy2_discussionquestionaire_i_python
111015 tokyo scipy2_discussionquestionaire_i_python111015 tokyo scipy2_discussionquestionaire_i_python
111015 tokyo scipy2_discussionquestionaire_i_python
 
Pythran: Static compiler for high performance by Mehdi Amini PyData SV 2014
Pythran: Static compiler for high performance by Mehdi Amini PyData SV 2014Pythran: Static compiler for high performance by Mehdi Amini PyData SV 2014
Pythran: Static compiler for high performance by Mehdi Amini PyData SV 2014
 
Hprec7.1
Hprec7.1Hprec7.1
Hprec7.1
 
Lenguaje python en I+D. Numpy, Sympy y Pandas
Lenguaje python en I+D. Numpy, Sympy y PandasLenguaje python en I+D. Numpy, Sympy y Pandas
Lenguaje python en I+D. Numpy, Sympy y Pandas
 
Introduction to computing Processing and performance.pdf
Introduction to computing Processing and performance.pdfIntroduction to computing Processing and performance.pdf
Introduction to computing Processing and performance.pdf
 
PyTorch 튜토리얼 (Touch to PyTorch)
PyTorch 튜토리얼 (Touch to PyTorch)PyTorch 튜토리얼 (Touch to PyTorch)
PyTorch 튜토리얼 (Touch to PyTorch)
 
Numba: Array-oriented Python Compiler for NumPy
Numba: Array-oriented Python Compiler for NumPyNumba: Array-oriented Python Compiler for NumPy
Numba: Array-oriented Python Compiler for NumPy
 
Time Series Analysis:Basic Stochastic Signal Recovery
Time Series Analysis:Basic Stochastic Signal RecoveryTime Series Analysis:Basic Stochastic Signal Recovery
Time Series Analysis:Basic Stochastic Signal Recovery
 
Xi CBSE Computer Science lab programs
Xi CBSE Computer Science lab programsXi CBSE Computer Science lab programs
Xi CBSE Computer Science lab programs
 
Study material ip class 12th
Study material ip class 12thStudy material ip class 12th
Study material ip class 12th
 
Basic Python Programming: Part 01 and Part 02
Basic Python Programming: Part 01 and Part 02Basic Python Programming: Part 01 and Part 02
Basic Python Programming: Part 01 and Part 02
 
Python profiling
Python profilingPython profiling
Python profiling
 
Profiling and optimization
Profiling and optimizationProfiling and optimization
Profiling and optimization
 

Más de Kimikazu Kato

Más de Kimikazu Kato (20)

Pythonを使った機械学習の学習
Pythonを使った機械学習の学習Pythonを使った機械学習の学習
Pythonを使った機械学習の学習
 
Fast and Probvably Seedings for k-Means
Fast and Probvably Seedings for k-MeansFast and Probvably Seedings for k-Means
Fast and Probvably Seedings for k-Means
 
Pythonで機械学習入門以前
Pythonで機械学習入門以前Pythonで機械学習入門以前
Pythonで機械学習入門以前
 
Pythonによる機械学習
Pythonによる機械学習Pythonによる機械学習
Pythonによる機械学習
 
Introduction to behavior based recommendation system
Introduction to behavior based recommendation systemIntroduction to behavior based recommendation system
Introduction to behavior based recommendation system
 
Pythonによる機械学習の最前線
Pythonによる機械学習の最前線Pythonによる機械学習の最前線
Pythonによる機械学習の最前線
 
Sparse pca via bipartite matching
Sparse pca via bipartite matchingSparse pca via bipartite matching
Sparse pca via bipartite matching
 
正しいプログラミング言語の覚え方
正しいプログラミング言語の覚え方正しいプログラミング言語の覚え方
正しいプログラミング言語の覚え方
 
養成読本と私
養成読本と私養成読本と私
養成読本と私
 
Introduction to NumPy for Machine Learning Programmers
Introduction to NumPy for Machine Learning ProgrammersIntroduction to NumPy for Machine Learning Programmers
Introduction to NumPy for Machine Learning Programmers
 
A Safe Rule for Sparse Logistic Regression
A Safe Rule for Sparse Logistic RegressionA Safe Rule for Sparse Logistic Regression
A Safe Rule for Sparse Logistic Regression
 
特定の不快感を与えるツイートの分類と自動生成について
特定の不快感を与えるツイートの分類と自動生成について特定の不快感を与えるツイートの分類と自動生成について
特定の不快感を与えるツイートの分類と自動生成について
 
Sapporo20140709
Sapporo20140709Sapporo20140709
Sapporo20140709
 
【論文紹介】Approximate Bayesian Image Interpretation Using Generative Probabilisti...
【論文紹介】Approximate Bayesian Image Interpretation Using Generative Probabilisti...【論文紹介】Approximate Bayesian Image Interpretation Using Generative Probabilisti...
【論文紹介】Approximate Bayesian Image Interpretation Using Generative Probabilisti...
 
Zuang-FPSGD
Zuang-FPSGDZuang-FPSGD
Zuang-FPSGD
 
About Our Recommender System
About Our Recommender SystemAbout Our Recommender System
About Our Recommender System
 
ネット通販向けレコメンドシステム提供サービスについて
ネット通販向けレコメンドシステム提供サービスについてネット通販向けレコメンドシステム提供サービスについて
ネット通販向けレコメンドシステム提供サービスについて
 
関東GPGPU勉強会資料
関東GPGPU勉強会資料関東GPGPU勉強会資料
関東GPGPU勉強会資料
 
2012-03-08 MSS研究会
2012-03-08 MSS研究会2012-03-08 MSS研究会
2012-03-08 MSS研究会
 
純粋関数型アルゴリズム入門
純粋関数型アルゴリズム入門純粋関数型アルゴリズム入門
純粋関数型アルゴリズム入門
 

Último

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Último (20)

ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 

Tokyo webmining 2017-10-28