1, Sklearn-train_test_split
Parameters: Test_size represents the proportion of the data in the test section to the total data
2, Np.ones (m,n)
Common one M-row, N-column matrix, filled with "1".
3.
3.1 Numpy.vstack ((one-dimensional matrix A, one-dimensional matrix B)) function
A as the first row of the new matrix, B as the second row of the new matrix
3.2 Numpy.vstack (two-dimensional matrix M, two-dimensional matrix N)
The elements of each row of the m,n matrix are grouped sequentially in order, and eventually combined into a two-dimensional matrix
4. Differences between tuples and lists in Python (https://zhidao.baidu.com/question/305733222936541244.html)
-
Only tuples (tuple) and lists (list);
-
Once the tuple has been created, it cannot be changed, for example: Aa=tuple (n/a);
-
Tuples cannot append (append) elements, pop (pop) elements, etc.;
-
Only the elements in a tuple can be indexed aa[0], and the tuples in them cannot be assigned aa[0]=8;
-
The advantage of using tuples is that it is more efficient to operate on tuples, which is suitable for storing a set of constants;
-
And many of the above can not, using the list is possible.
5, Np.ravel (x)
X is two-dimensional, with x from left to right, from top to bottom in one dimension
6,//Python has two division operators, one is a single slash: for traditional division, and another double slash: for floating-point division, the result is rounded.
Python method "Update ... 】