Python for Machine Learning - Foundations and Tools

section 1 python for machine learning section n.w
1 / 19
Embed
Share

This section covers the foundational aspects of Python programming for machine learning, introducing the Python Programming Language, Scientific Python Ecosystem, and Jupyter Notebook. Topics include Python 3 Language, Python Modes, Pip3 Utility, Scientific Python Ecosystem, and more. Explore the history and philosophy behind the Python Programming Language to gain a deeper understanding of this versatile tool.

  • Python
  • Machine Learning
  • Programming Language
  • Jupyter Notebook

Uploaded on | 0 Views


Download Presentation

Please find below an Image/Link to download the presentation.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author. If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.

You are allowed to download the files provided on this website for personal or commercial use, subject to the condition that they are used lawfully. All files are the property of their respective owners.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author.

E N D

Presentation Transcript


  1. SECTION 1 Python for Machine Learning SECTION 1 Python for Machine Learning

  2. Chapter 1 Getting Started with Python 3 and Chapter 1 Getting Started with Python 3 and Jupyter Jupyter Notebook Notebook The entire field of machine learning and artificial intelligence requires solid knowledge of the tools and frameworks used in the area. This chapter serves as the foundational chapter for Python programming for machine learning that we will cover in this book. It introduces the novice readers to the Python Programming Language, Scientific Python Ecosystem, and Jupyter Notebook for Python programming.

  3. The following is the list of topics that we will learn in this chapter: Python 3 Programming Language Installing Python Python Modes Pip3 Utility Scientific Python Ecosystem Python Implementations and Distributions After studying this chapter, we will be comfortable with the installation, running programs, and Jupyter notebook on Windows and Debian Linux.

  4. Python 3 Programming Language Python 3 Programming Language Python 3 is a modern programming language. It has features of object-oriented and procedural programming. It runs on a variety of platforms. And the major advantage is that the code written on one platform runs on the other platform without any major changes to the code. You can read more about Python at www.python.org.

  5. History of Python Programming Language History of Python Programming Language The ABC language is the predecessor of Python Programming Language. The ABC language was inspired by ALGOL 68 and SETL programming languages. The Python Programming Language was created by Guido Van Rossum as a side project during Christmas vacations in the late 1980s. For all the demonstrations in this book, we will use Python 3.

  6. Philosophy of Python Programming Language Philosophy of Python Programming Language The Zen of Python 1. Beautiful is better than ugly. 2. Explicit is better than implicit. 3. Simple is better than complex. 4. Complex is better than complicated. 5. Flat is better than nested. 6. Sparse is better than dense. 7. Readability counts. 8. Special cases aren t special enough to break the rules. 9. Although practicality beats purity. 10. Errors should never pass silently.

  7. 11. Unless explicitly silenced. 12. In the face of ambiguity, refuse the temptation to guess. 13. There should be one and preferably only one obvious way to do it. 14. Although that way may not be obvious at first unless you re Dutch. 15. Now is better than never. 16. Although never is often better than *right* now. 17. If the implementation is hard to explain, it s a bad idea. 18. If the implementation is easy to explain, it may be a good idea. 19. Namespaces are one honking great idea let s do more of those!

  8. Where Python Is Used Where Python Is Used Python is used in a variety of applications. A few are 1. Education 2. Automation 3. Scientific Computing 4. Computer Vision 5. Animation 6. IoT 7. Web Development 8. Desktop and Mobile Applications 9. Administration

  9. Installing Python Installing Python www.python.org Download and install. Do not forget to check all the checkboxes so that the Python s installation folder can be added to the PATH variable in the Windows environment. Demonstration

  10. Python Modes Python Modes - - Interactive Mode Interactive Mode Python provides us interactive mode. We can invoke Python interactive mode by opening the IDLE (Integrated Development and Learning Editor) program. Demonstration Now we know that IDLE can execute the code line by line or block by block. It is very convenient to run small independent snippets of code here in the interactive prompt.

  11. We can also invoke the interpreter mode without IDLE from the command line by typing in the command in Windows command prompt. Demonstration

  12. Python Modes Python Modes - - Script Mode Script Mode Interactive mode of the Python interpreter is easy to get started with and is very good for prototyping and so on. However, for bigger programs, the best way is to use IDLE. Actually, we can use any editor of our choice to write Python programs. Demonstration From IDLE From command prompts

  13. Pip3 Utility Pip3 Utility Pip stands for pip installs packages or pip installs Python. Pip3 is the Python 3 version of pip. We can use it to install packages for Python 3. In the entire book, we will use it throughout to install libraries. Let us see the usage. pip3 list pip3 install jupyter https://visualstudio.microsoft.com/zh-hant/visual-cpp-build-tools for Microsoft C++ Build Tools

  14. Scientific Python Ecosystem Scientific Python Ecosystem We can use Python for numerical and scientific programming. We have to use the Scientific Python Ecosystem. It has the following core components: 1. Python 2. Jupyter Notebook 3. NumPy 4. SciPy 5. Matplotlib 6. SymPy Jupyter is a web browser based interpreter for Python.

  15. Python Implementations and Distributions Python Implementations and Distributions Many organizations have written their own interpreters that interpret and execute Python code. These interpreters are also known as Implementations of Python. We learned how to download and install Python interpreter (and IDLE) from www.python.org. This interpreter is also known as CPython Implementation. There are several other implementations.

  16. A Python distribution is a Python implementation (interpreter) bundled with useful libraries and tools.

  17. Anaconda Anaconda Since the book is about the topics in the area of machine learning that itself is a part of the broader area of scientific computing, this chapter won t be complete unless we discuss the Anaconda Python distribution. Anaconda distribution is tailored for the needs of the scientific community, and it comes with a large set of libraries, so beginners do not have to install anything to get started with scientific computing. www.anaconda.com/products/individual

  18. Summary Summary In this chapter, we familiarized ourselves with Python, IDLE, and Anaconda. We learned how to use Python interpreter and how to write Python scripts. We also learned how to execute Python programs.

  19. Just make sure that you check the option of adding Anaconda to the PATH variable when asked during the installation. Once installed, you can start programming with a lot of tools and IDEs like PyCharm, Spyder, and Jupyter Notebook. Anaconda Navigator is the unified interface of the Anaconda distribution, and it shows all the tools and utilities in a single window from where we can manage and use them.

More Related Content