I just received the book "Artificial Intelligence Practical Tutorial - From Python to Machine Learning" not long ago. Today I would like to share this book with you, sort out the whole book, and share and explain the basics of Python programming. The cover of the book is as follows:
The book is divided into three parts. The first part mainly talks about Python language programming. There are explanations of basic syntax, and gradually move on to Python object-oriented programming and Python advanced programming. This part is very useful for learning and consolidating the Python language, and also lays the necessary foundation for the following two parts. The second part mainly talks about machine learning. There is an overview of the concept of machine learning, the classic algorithms of machine learning, and the regression algorithms of machine learning. The third chapter mainly talks about neural networks. It mainly includes from perception to neural networks; neural network backpropagation algorithm; neural network training methods; convolutional neural networks and expression recognition project examples. The book has a complete structure and is progressive. It is a good auxiliary book for artificial intelligence learning.
This article mainly talks about Python programming. For those who have a certain foundation in Python language, you can skim or review this part.
Python environment, about installation, download the installation package from the official website, during the installation process, remember to check the option to add it to the environment variable, if you forget, you can add it manually. We use the well-known user-friendly PyCharm IDE development environment. The basic syntax of Python includes variable identifiers, keywords, operators, branches and loops, functions, etc. These syntaxes are mainly learned and practiced, and can be written and run in the IDE environment.
Python is an object-oriented language, and its basic object-oriented features are as follows. This section is very valuable for reference for modular programming in Python.
●Class: A collection of objects with the same properties and methods. It defines the properties and methods that are common to each object in the collection. An object is an instance of a class.
●Object: An instance of a data structure defined by a class. An object includes two data members (class variables and instance variables) and methods.
●Class variables: Class variables are common to the entire instantiated object. Class variables are defined in the class and outside the function body. Class variables are usually not used as instance variables.
●Data members: Class variables or instance variables, used to process relevant data of a class and its instance objects.
●Method overriding: If the method inherited from the base class (parent class) does not meet the needs of the derived class (child class), it can be overridden. This process is called method overriding, also known as method overriding. Local variables: Variables defined in a method only apply to the class of the current instance.
●Instance variables: In the class declaration, attributes are represented by variables. This type of variable is called an instance variable, which is declared inside the class declaration and outside other member methods of the class.
● Inheritance: A subclass inherits the fields and methods of its parent class. Inheritance also allows a subclass object to be treated as an object of its parent class. For example, the Dog class is derived from the Animal class, simulating an "is-a" relationship (an object of the Dog class is also an object of the Animal class).
● Instantiation: Creating an instance or concrete object of a class
● Methods: Functions defined in a class.
Advanced Python programming, including Python closures and decorators, Python optional objects, selectors and generators, and Python built-in methods. This section is a more advanced use of the Python language. The concepts, definitions, and uses in it can deepen your understanding and mastery of the Python language.
Learning Python language is a process of combining accumulation and practice. You should practice more, think more and accumulate more about the basic grammar.
Python programming lays a good foundation and start for subsequent machine learning and neural networks.