전체 글

전체 글

    [핸즈온 머신러닝] 공부노트

    각 장마다 등장하는 Keywords와 내가 생각하는 연습문제의 해답을 위주로 글을 작성할 것이다.

    [Pandas] Pandas01 - Occupation 풀이

    Step 1. Import the necessary libraries-> import pandas as pdStep 2. Import the dataset from this address.Step 3. Assign it to a variable called users and use the 'user_id' as index-> url ='https://raw.githubusercontent.com/justmarkham/DAT8/master/data/u.user'data = pd.read_csv(url,'|', index_col='user_id')data.head() A : 해설 : url을 보고 ‘|’로 분리되어 있는 것을 확인. Index_col을 통해 ‘user_id’를 index로 사용함Step 4...

    [Pandas] Pandas01 - Chipotle 풀이

    Step 1. Import the necessary libraries-> import pandas as pd import numpy as np Step 2. Import the dataset from this address.Step 3. Assign it to a variable called chipo.-> url = 'https://raw.githubusercontent.com/justmarkham/DAT8/master/data/chipotle.tsv'chipo = pd.read_csv(url,sep='\t') ‘\t’ 탭/indent를 의미함url을 csv로 읽어온다.Step 4. See the first 10 entries-> chipo.head(10) A : Step 5. What is the n..

    Pandas Exercise

    https://github.com/guipsamora/pandas_exercises 위의 Pandas Exercise 문제 풀이입니다아래의 순서에 따라 진행할 것 입니다. 01 - Getting & Knowing Your Data02 - Filtering & Sorting03 - Grouping04 - Apply05 - Merge06 - Stats07 - Visualization08 - Creating Series and DataFrames09 - Time Series10 - Deleting11 - Indexing

    [Numpy] Numpy 연습문제 11~20

    11. Create a 3x3 identity matrix -> Z = np.eye(3,3) Z A : array([[1., 0., 0.], [0., 1., 0.], [0., 0., 1.]]) 해설 : np.eye를 통해 대각선 행렬성분이 1인 Identity matrix를 생성할 수 있다. (A,B)로 A행 B열로 구성할 수 있다. 12. Create a 3x3x3 array with random values-> Z = np.random.random((3,3,3)) Z A : array([[[0.9849039 , 0.44041333, 0.41412264], [0.13367628, 0.99776952, 0.58991017], [0.01979863, 0.41352766, 0.00831818]], [[0.5..

    [Numpy] Numpy 연습문제 1~10

    1. Import the numpy package under the name-> import numpy as np 2. Print the numpy version and the configuration -> print(np.__version__) 3. Create a null vector of size 10-> z= np.zeros(10) print(z) A : [0. 0. 0. 0. 0. 0. 0. 0. 0. 0.] 해설 : np.zeros를 통해 N개의 0으로 채워진 array를 구성할 수 있다. 4. How to find the memory size of any array-> z = np.zeros((10,10)) print("%d bytes" % (z.size* z.itemsize)) A : 80..