일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |
- mro()
- decode()
- __sub__
- fileinput
- MySQL
- remove()
- 파이썬
- zipfile
- count()
- HTML
- 오버라이딩
- fnmatch
- JS
- shuffle()
- choice()
- __len__
- CSS
- MySqlDB
- View
- node.js
- randrange()
- __annotations__
- discard()
- locals()
- Database
- __getitem__
- shutil
- items()
- inplace()
- glob
- Today
- Total
목록파이썬 머신러닝, 딥러닝 (17)
흰둥이는 코드를 짤 때 짖어 (왈!왈!왈!왈!왈!왈!왈!왈!왈!왈!왈!)
1. hotel 데이터셋 살펴보기 In [ ]: import numpy as np import pandas as pd import seaborn as sns import matplotlib.pyplot as plt In [ ]: hotel_df = pd.read_csv('/content/drive/MyDrive/KDT/4. 머신러닝과 딥러닝/hotel.csv') In [ ]: hotel_df Out[ ]: hotel is_canceled lead_time arrival_date_year arrival_date_month arrival_date_week_number arrival_date_day_of_month stays_in_weekend_nights stays_in_week_nig..
1. 손글씨 데이터셋 살펴보기 In [ ]: from sklearn.datasets import load_digits In [ ]: digits = load_digits() In [ ]: digits.keys() Out[ ]: dict_keys(['data', 'target', 'frame', 'feature_names', 'target_names', 'images', 'DESCR']) In [ ]: data = digits['data'] data.shape Out[ ]: (1797, 64) In [ ]: data[0] Out[ ]: array([ 0., 0., 5., 13., 9., 1., 0., 0., 0., 0., 13., 15., 10., 15., 5., 0., 0., 3., 15., 2., 0...
1. hr 데이터셋 살펴보기 In [ ]: import numpy as np import pandas as pd import seaborn as sns import matplotlib.pyplot as plt In [ ]: hr_df = pd.read_csv('/content/drive/MyDrive/KDT/4. 머신러닝과 딥러닝/hr.csv') In [ ]: hr_df.head() Out[ ]: employee_id department region education gender recruitment_channel no_of_trainings age previous_year_rating length_of_service awards_won? avg_training_score is_pr..
import numpy as np import pandas as pd import seaborn as sns import matplotlib.pyplot as plt 먼저 bike 데이터셋을 가져와 데이터프레임으로 저장한다. bike_df = pd.read_csv('/content/drive/MyDrive/KDT/4. 머신러닝과 딥러닝/bike.csv') bike_df datetime count holiday workingday temp feels_like temp_min temp_max pressure humidity wind_speed wind_deg rain_1h snow_1h clouds_all weather_main 0 2018-01-01 0:00 34 1 0 -7.17 -..
1. Rent 데이터셋 살펴보기 import numpy as np import pandas as pd import seaborn as sns 먼저 Rent데이터셋을 데이터프레임으로 가져온다. rent_df = pd.read_csv('/content/drive/MyDrive/KDT/4. 머신러닝과 딥러닝/rent.csv') rent_df Posted On BHK Rent Size Floor Area Type Area Locality City Furnishing Status Tenant Preferred Bathroom Point of Contact 0 2022-05-18 2.0 10000 1100.0 Ground out of 2 Super Area Bandel Kolkata Unfur..
1. 캐글(Kaggle) 전세계 데이터 사이언티스트들이 다양한 데이터를 분석하고 토론할 수 있는 커뮤니티를 제공 데이터 분석 및 머신러닝, 딥러닝 대회를 개최 데이터셋, 파이썬 자료, R 자료 등 제곡 캐글 데이콘 import numpy as np import pandas as pd 외부에 존재하는 타이타닉 데이터셋을 csv파일로 가져와 데이터 프레임으로 만든다. df = pd.read_csv('https://bit.ly/fc-ml-titanic') df.head() PassengerId Survived Pclass Name Sex Age SibSp Parch Ticket Fare Cabin Embarked 0 1 0 3 Braund, Mr. Owen Harris male 22.0 1 0 A/5 2117..
1. Iris DataSet 사이킷런 데이터셋 페이지 데이터셋: 특정한 작업을 위해 테이터를 관련성 있게 모아놓은 것 사이킷런에서 제공하는 아이리스에 데이터셋을 가져와 선언한다. from sklearn.datasets import load_iris iris = load_iris() sepal length (cm):꽃받침의 길이 sepal width (cm):꽃받침의 너비 petal length (cm):꽃잎의 길이 petal width (cm),:꽃잎의 너비 데이터 셋 분석 data = iris['data'] data array([[5.1, 3.5, 1.4, 0.2], [4.9, 3. , 1.4, 0.2], [4.7, 3.2, 1.3, 0.2], [4.6, 3.1, 1.5, 0.2], ... [6.5, ..
1. Scikit_learn 모듈 대표적인 파이썬 머신러닝 모듈 다양한 머신러닝 알고리즘을 제공 다양한 샘플 데이터를 제공 머신러닝 결과를 검증하는 기능을 제공 BSD 라이선스이기 때문에 무료로 사용 및 배포가 가능 사이킥런 공식 홈페이지 2. LinearSVC 클래스를 구분으로 하는 분류 문제에서 각 클래스를 잘 구분하는 선을 그려주는 방식을 사용하는 알고리즘 지도학습 알고리즘을 사용하는 학습 전용 데이터와 결과 전용 데이터를 함께 가지고 있어야 사용이 가능 from sklearn.svm import LinearSVC from sklearn.metrics import accuracy_score 학습시킬 입력변수(learn_data)와 출력변수(learn_data)를 준비한다. # 학습 데이터 준비 le..