Learning record 5 (9th day)

Learning record (9th day)

Start studying: Saturday, December 7th Books used: Miyuki Oshige "Details! Python3 Introductory Note ”(Sotec, 2017)

Resume from [text file (Ch.13 / p.316)](8th day), Finished until [Numpy array (Ch.15 / p.380)](9th day)

Draw a graph

-Use the matplotlib.pyplot module -Although it can be set in plt.plot (X-axis, Y-axis), an error occurred if the number of ** elements did not match. ** ** -Plt.title is the title of the graph, plt.xlabel (ylabel) is the title of the axis -A plot marker can be added to the third argument of plt.plot with marker = "o". ・ Color and linestyle can be set with the 4th and 5th arguments of plt.plot. -A legend can be added with plt.legend (loc = "location"). ・ Bar for vertical bar, barh for horizontal bar, xticks for stacked bar, scatter for scatter plot, pie for circle

Numpy -Create an array with array (). You can create as many matrices as there are arguments. -Fill it into 4 characters with dtype = "<U4".

>>print(np.array([1,2,3], [4,5,6], [7,8,9]))
ValueError: only 2 non-keyword arguments accepted
#argument(arguments)Are you missing two?

>>>print(np.array([[1,2,3], [4,5,6], [7,8,9]]))
#If you do the above, it will be solved, the entire list[]It was big.

-The one-dimensional array output by np.array () can be converted by .reshape (row, column). -You can convert a multidimensional array to a one-dimensional array with ravel () or flatten (). -Np.append (array, value, axis = none) Add a row with axis 0 and a column with 1 -Matrix transpose is .transpose ()

Access to array elements

-Available in array [index number] ・ Slices are possible just like lists -It is possible to specify the numerical value to be taken out by the conditional expression. a [a> = 5] etc. Conditional classification using logical operators. Logical product, logical sum, logical negation

Array operation

-Calculation is possible as usual with operators. With a function called broadcast, it is added or subtracted from all elements. -Can also be applied to 2D vector calculation. Absolute value can be calculated with linalg.norm () -Sum () can be used to get the total sum, sum (0) can be used to get the total for each column, and sum (1) can be used to get the total for each row.

Array creation

-You can create an array with numpy.arrange (open price, close price, skip). Only the closing price cannot be omitted. -You can create an array with the number of divisions specified by numpy.linspace (open price, close price, skip). -Create an identity matrix of X rows and X columns with numpy.identity (X) or eye (X). ・ Poisson distribution can also be created. What is the Poisson distribution ... study required -Data read by read_csv () of pandas () becomes DataFrame type and can be read.

Recommended Posts

Learning record 4 (8th day)
Learning record 9 (13th day)
Learning record 3 (7th day)
Learning record 5 (9th day)
Learning record 6 (10th day)
Learning record 8 (12th day)
Learning record 1 (4th day)
Learning record 7 (11th day)
Learning record 2 (6th day)
Learning record 16 (20th day)
Learning record 22 (26th day)
Learning record No. 21 (25th day)
Learning record 13 (17th day) Kaggle3
Learning record No. 10 (14th day)
Learning record 12 (16th day) Kaggle2
Learning record No. 23 (27th day)
Learning record No. 25 (29th day)
Learning record No. 26 (30th day)
Learning record No. 20 (24th day)
Learning record No. 14 (18th day) Kaggle4
Learning record No. 15 (19th day) Kaggle5
Learning record 11 (15th day) Kaggle participation
Programming learning record day 2
Learning record No. 17 (21st day)
Learning record
Learning record No. 18 (22nd day)
Learning record # 3
Learning record # 1
Learning record # 2
Learning record No. 19 (23rd day)
Learning record No. 29 (33rd day)
Learning record No. 28 (32nd day)
Learning record No. 27 (31st day)
Python learning day 4
Learning record (2nd day) Scraping by #BeautifulSoup
Learning record so far
Go language learning record
Learning record (4th day) #How to get the absolute path from the relative path
Linux learning record ① Plan
Effective Python Learning Memorandum Day 15 [15/100]
<Course> Deep Learning: Day2 CNN
Effective Python Learning Memorandum Day 6 [6/100]
Effective Python Learning Memorandum Day 12 [12/100]
Effective Python Learning Memorandum Day 9 [9/100]
Effective Python Learning Memorandum Day 8 [8/100]
Rabbit Challenge Deep Learning 1Day
Effective Python Learning Memorandum Day 14 [14/100]
Effective Python Learning Memorandum Day 1 [1/100]
Subjects> Deep Learning: Day3 RNN
Rabbit Challenge Deep Learning 2Day
Effective Python Learning Memorandum Day 13 [13/100]
Effective Python Learning Memorandum Day 3 [3/100]
Effective Python Learning Memorandum Day 5 [5/100]
Effective Python Learning Memorandum Day 4 [4/100]
Effective Python Learning Memorandum Day 7 [7/100]
Effective Python Learning Memorandum Day 2 [2/100]
Learning record (3rd day) #CSS selector description method #BeautifulSoup scraping
Learning record (6th day) #Set type #Dictionary type #Mutual conversion of list tuple set #ndarray type #Pandas (DataFrame type)
Thoroughly study Deep Learning [DW Day 0]
Deep Learning Specialization (Coursera) Self-study record (C3W1)
[Rabbit Challenge (E qualification)] Deep learning (day2)