Implement Data Structure
Part 1 Introduction
Short Sentences
Client server software:客户机-服务器软件
Shared file system:共享文件系统
A complete binary tree can be represented by a list instead of using ‘list nested list’ or ‘nodes and references’
The hierarchical nature of the tree derivesgenerate
an important property, that is, part of the tree (subtree) can be moved to another position as a whole without affecting the layers below.
Implement the tree as a recursive data structure
Implement priority queue with stack
Hash Mapping Relations –> deal with conflicts
Open addressing <==> Linear detection
If there is no termination condition, it will enter an endless loop, the program will crash, and the stack will overflow
Complex recursion problem
Calculate the sum of a column of numbers
Three principles of recursion
The base case recursive algorithm must change the state and move closer to the base case
RecursionError: maximum recursion depth exceeded while getting the str of an object
Each element has a position relative to the other elements
lambda variable : variable operation code block
Calculate execution time
The realization of abstract data types is called data structure
Understand the pre-order, middle-order, and post-order expressions
By running the code 10,000 times to find the time required for each method, we conclude that the best method is list(range())
python data structure performance:数据结构的性能
Realize the inventory plan
Examples of heterologous word detection
The number in the computer is expressed in binary, and the leftmost bit is generally used to indicate whether the number is positive or negative. In this case, the number is a signed integer. If the leftmost bit is not used to indicate positive or negative, but is connected with the following to indicate an integer, then it cannot be distinguished whether the number is positive or negative, and it can only be a positive number, which is an unsigned integer.
Comparison with None performed with equality operators
Instance attribute pinA defined outside init
Lowercase variable imported as non lowercase :小写变量导入为非小写
categorical cross entropy :分类交叉熵
Remove redundant parentheses
row –> 行 column |–列
hyper-parameter: parameters set manually
Relu
:rectified linear units layer
The choice depends on the big data and full connected layer based on back propagation.(Convolution Kernel)
The selection of the convolution kernel is not manual operation, but mechanical learning with the help of big data. The key lies in the loss function of the fully connected layer and the principle of back propagation.
Rectified Linear Units layer == Modified linear unit(Relu layer)
back propagation –> down sampling
Modified linear unit(Relu layer)
Relu activation function
–beneficial to–> Gradient descent
The relu function turns negative numbers in the feature map to zero
Activation function
The marginal area will be processed with zero padding
Ability to reduce the data volume of the feature map while retaining the original data
Convolution kernel
Convolutional Neural Network:CNN
gcd: greatest common divisor
Euclid Algorithm:欧几里得算法
1 | def gcd(m, n): |
A common example is to implement a data type of construct class fraction
library root:库根
Image recognition process
representation learning development history
Input layer ==> Hidden layer ==> Output layer
Professional Edition
enhanced CNN
download dataset
Paper framework
Introduction to unsupervised learning
Mechanical learning
Marked data
format specification ==> syntax specification
Exception handling contains[Syntax Error ==> logical error]
Separate ==> Delimiter(sep=””)
Control structure contains Iteration(while) and branch(if/elif/else)
Single branch structure
Absolute value
return a boolean value
Unordered collection
Set does not allow duplicate elements
Heterogeneous data
Tabs:制表符
Newline:换行符
Space:空格
Thought report:思想汇报
Experience:心得体会
Uppercase letter
Lower case letters
Built-in collection data type(set/list/dictionary/hash map/tuple/string)
Built-in atomic data type(binary data type/float/int/ : contains Numerical class Boolean value)
Take an integer ==> a//b
Take the remainder ==> a%b
Object-Oriented Programming
Data perspective independent of reality
The implementation of abstract data types is called data structure
Information hiding
How to learn data structure and abstract data types
Sequential execution == 顺序执行
Decision branch == 决策分支
Loop iteration == 循环迭代
control statement
data type
This is an example of process abstraction
What is programming
square root == Cube
what is the computer science
the process of solving questions
Word List
merge
Framework thinking awareness Hash table Mapping relations
Cache Cookies Recursive call Dynamic programming
Fractal basic situation Key term Programming exercises
Palindrome detector Linked list
logarithm time complexity index
Brute-force Ordinary situation Magnitude
magnitude Worst way List comprehension generate
Architecture nutshell batch filter regression
Modifiable sequence grammar Interactive
encapsulation annotation notation assign
alphabet introduction Objectives of this chapter
getting Started interface Low-level details