An introductory talk on scientific computing in Python. Statistics, probability and linear algebra, are important aspects of computing/computer modeling and the same is covered here.
2. Introduction – Speaker Bio
27/10/18 Technology sharing series 2
• Technologist at Zilogic Systems, heading wireless testing
• Hands-on experience in building and maintaining Wireless
communication systems (Satellite, 2G, 4G)
• Interested in applied mathematics for algorithm development in
wireless communications
• Using Python for building simulation models
• More details at :
https://www.linkedin.com/in/ashok-govindarajan-4001717/
• Reachable at gashok2@gmail.com
3. Contents
27/10/18 Technology sharing series 3
• What is Scientific computing?
• Simulation – Model development
• Overview of Numpy, SciPy and matplotlib
• Other constructs in Python often used
• Further scope
• References
4. What is scientific computing?
27/10/18 Technology sharing series 4
"Every American should have above average income, and my Administration is going
to see they get it." This saying is attributed to Bill Clinton on umpteen websites.
Usually, there is no context given, so it is not clear, if he might have meant it as a
"joke". Whatever his intentions might have been, we quoted him to show a
"real" life example of statistics.
Statistics and probability calculation is all around us in real-life situations.
We have to cope with it whenever we have to make a decision from various options.
Can we go for a hike in the afternoon or will it rain?
The weather forecast tells us, that the probability of precipitation will be 30 %.
So what now? Will we go for a hike?
These are real-life example where one can see the use of scientific computing.
Source : https://www.python-course.eu/python_numpy_probability.php
Link between decision making and scientific computing
5. Simulation
27/10/18 Technology sharing series 5
What is simulation?
➢
Modelling real-world phenomena, like say climate, so that
we can predict
➢
Numbers in Numbers out
Why is it needed?
➢
To improve understanding of lesser-know phenomena
➢
Cost effective
How is Python useful for that?
➢
Provides libraries, tools for scientific computation like
NumPy, SciPy etc
What are the limitations?
➢
Real-world modelling is very hard to model as the inter-
linking between the dependednt variables are high. So, the
solutions would only be a crude approximate and may not
be accurate.
➢
We got to be aware of the same
6. NumPy
27/10/18 Technology sharing series 6
• It provides a high-performance multidimensional
array object, and tools for working with these arrays.
• The NumPy library is the core library for scientific
computing in Python. It provides a high-performance
multidimensional array object, and tools for working
with these arrays.
• We can create “n” dimensional arrays, where n can
be 1,2,3 etc
• Strongly linked to list objects
• Array creation, I/O,Searching, sorting, Copy,
indexing, splicing
• Statistics
• Probability, random number generation, PDF
7. SciPy
27/10/18 Technology sharing series 7
• The SciPy library is one of the core packages for
scientific computing that provides mathematical
algorithms and convenience functions built on the
NumPy extension of Python.
• You’ll use the linalg and sparse modules. Note that
scipy.linalg contains and expands on numpy.linalg
• Strongly linked to numpy objects
• Matrix functions and decompositions
• Linear Algebra
• Sparse signal processing
8. Matplotlib
27/10/18 Technology sharing series 8
• Matplotlib is a Python 2D plotting library which
produces publication-quality figures in a variety of
hardcopy formats and interactive environments
across platforms.
• Create plots
• Plotting subrotines for 1 and 2d data
• Customisation – a number of things can be done here
• Save
• Show
9. Other commonly used Python Constructs
27/10/18 Technology sharing series 9
• List Comprehension
constellation = np.array([x for x in
demapping_table.keys()])
• Dictionary Comprehension
demapping_table = {v : k for k, v in
mapping_table.items()}
• Function wrapping
Hest_abs = scipy.interpolate.interp1d(pilotCarriers,
abs(Hest_at_pilots), kind='linear')(allCarriers)
• for qam, hard in zip(QAM_est, hardDecision)
-- iteration over 2 list simulatneously
10. To sum up/Recap….
27/10/18 Technology sharing series 10
• Statistics, Probability and Linear algebra background is important
for scientific computing
• In order to implement the same it is useful have a good
understanding of Python packages
11. Future Scope
27/10/18 Technology sharing series 11
• Investing time in this and building mathematical maturity would
help if one wants to pursue a core career in machine learning, data
sciences
12. References
27/10/18
Technology sharing series 12
➢ https://www.statistics.com/python-for-analytics#fees
➢ https://www.python-course.eu/python_numpy_probability.php
➢ Cheat sheets from various websites on NumPy, SciPy and matplotlib