Python method "Update ... 】

Source: Internet
Author: User

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)

    1. Only tuples (tuple) and lists (list);

    2. Once the tuple has been created, it cannot be changed, for example: Aa=tuple (n/a);

    3. Tuples cannot append (append) elements, pop (pop) elements, etc.;

    4. Only the elements in a tuple can be indexed aa[0], and the tuples in them cannot be assigned aa[0]=8;

    5. The advantage of using tuples is that it is more efficient to operate on tuples, which is suitable for storing a set of constants;

    6. 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 ... 】

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.