"Introduction to Data Mining" experimental class - a test, data processing of Numpy

A test data processing of Numpy

First, the purpose of the experiment

1. Understand the basic functions of the library numpy

2. mastery of an array of library operations and operations Numpy

Second, the experimental tool:

1. Anaconda

2. Numpy

Three, Numpy Profile

Numpy English full Numerical Python, means for third-party libraries Python numerical calculation. Numpy features that made the expansion for array types Python built-in support of higher dimensional arrays and matrix operations, as well as richer mathematical functions. Numpy Scipy.org is one of the most important library, it also was Pandas, Matplotlib and other third-party libraries we know as the core computing base.
NumPy (Numeric Python) provides many advanced numerical programming tools, such as: matrix data types, vector processing, and precision arithmetic library. Designed for strictly digital processing and production. More for many large financial firms to use, as well as the core of scientific computing organizations such as: Lawrence Livermore, NASA used its handle some tasks originally done in C, etc. ++, Fortran or Matlab.
  Numpy include: 1, a powerful N-dimensional array of objects Array; 2, more mature (broadcast) library; 3, used to integrate C / C ++, and Fortran code toolkit; 4 practical linear algebra, fourier Fourier transform and random number generation function. Numpy and sparse matrix operations scipy package with more convenient.

Fourth, the experiment content

1. Create the array (0 create a full array, a whole array, an array of random numbers)

An array of all zeros
image.png
full array of a
image.png
random array
image.png

2. The properties of the array (see dimension of the array, the number of array elements)

image.png
image.png

3. The operation of the dimension of the array (the column lines of the array variable, returns the last element, the second to the fourth return element for returning an array of reverse)

image.png
image.png
image.png
image.png

4. The combined array (horizontal array combined vertically merged, combined depth)

image.png
image.png
image.png

The resolution of the array (the array of horizontal resolution, vertical resolution, depth resolution)

image.png
image.png
image.png

6. array operation (often with four operations, with the four operations of the array, the array is determined whether or not equal)

image.png
image.png
image.png

7. The common function array (and all array elements, product, average, maximum, minimum, element replacement, variance, standard deviation)

image.png
image.png
image.png
image.png

Five experiments summarized (write harvest this experiment, problems encountered, etc.)

Through this experiment, Numpy a brief review exercise, including the creation of an array of related attributes familiar. Learn array dimension shortcut method and the combined operation of the corresponding function.
Before learning linear algebra, the merger was not in contact with the concept, but it is quite easy to understand by example, the depth of the merger is very interesting. To grasp the depth of the array is not enough, but also to enhance learning mathematics knowledge.

Reproduced in: https: //www.cnblogs.com/wonker/p/11062614.html

Guess you like

Origin blog.csdn.net/weixin_34010949/article/details/93709068